Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sentry: Unrecognized auth token format! #2494

Closed
anudit opened this issue Aug 14, 2024 · 4 comments
Closed

Sentry: Unrecognized auth token format! #2494

anudit opened this issue Aug 14, 2024 · 4 comments

Comments

@anudit
Copy link

anudit commented Aug 14, 2024

Build/Submit details page URL

https://expo.dev/accounts/anuditnagar/projects/omnid-app/builds/a3617877-5ee5-4440-a9fb-31a8f3fccf01

Summary

EAS Build works locally with the same token but not on EAS. I have added the SENTRY_AUTH_TOKEN as an account secret.

Build logs

> Task :app:createBundleReleaseJsAndAssets_SentryUpload_com.cupoc.omnid@1.0.0+1_1
Copy `debugId` from packager source map to Hermes source map...
Done.
Check generated source map for Debug ID: 7ca05721-6ee4-4815-9782-bfeba7e08983
Sentry Source Maps upload will include the release name and dist.
Sentry-CLI arguments: [/home/expo/workingdir/build/node_modules/@sentry/cli/bin/sentry-cli, react-native, gradle, --bundle, /home/expo/workingdir/build/android/app/build/generated/assets/createBundleReleaseJsAndAssets/index.android.bundle, --sourcemap, /home/expo/workingdir/build/android/app/build/generated/sourcemaps/react/release/index.android.bundle.map, --release, [email protected]+1, --dist, 1]
Processing react-native sourcemaps for Sentry upload.
> Analyzing 2 sources
INFO    2024-08-14 03:26:43.349354735 +00:00 Loaded file referenced by SENTRY_PROPERTIES (/home/expo/workingdir/build/android/sentry.properties)
  WARN    2024-08-14 03:26:43.362943418 +00:00 Unrecognized auth token format!
	Hint: Did you copy your token correctly?
> Task :expo-dev-menu-interface:compileReleaseJavaWithJavac
> Task :expo-dev-menu-interface:bundleLibCompileToJarRelease
> Task :expo-updates-interface:compileReleaseKotlin
> Task :expo-updates-interface:compileReleaseJavaWithJavac
> Task :expo-updates-interface:bundleLibCompileToJarRelease
> Task :app:createBundleReleaseJsAndAssets_SentryUpload_com.cupoc.omnid@1.0.0+1_1 FAILED
> Rewriting sources
> Adding source map references
error: API request failed
  caused by: sentry reported an error: Invalid org token (http status: 401)
Add --log-level=[info|debug] or export SENTRY_LOG_LEVEL=[info|debug] to see more output.
Please attach the full debug log to all bug reports.
> Task :app:createBundleReleaseJsAndAssets_SentryUploadCleanUp SKIPPED

FAILURE: Build failed with an exception.
* Where:
Script '/home/expo/workingdir/build/node_modules/@sentry/react-native/sentry.gradle' line: 142
* What went wrong:
Execution failed for task ':app:createBundleReleaseJsAndAssets_SentryUpload_com.cupoc.omnid@1.0.0+1_1'.
> Process 'command '/home/expo/workingdir/build/node_modules/@sentry/cli/bin/sentry-cli'' finished with non-zero exit value 1
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org.
BUILD FAILED in 7m 22s
Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.
You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
For more on this, please refer to https://docs.gradle.org/8.6/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.
716 actionable tasks: 716 executed
Error: Gradle build failed with unknown error. See logs for the "Run gradlew" phase for more information.

Managed or bare?

Managed

Environment

Creating new worker instance
Intel, 4 vCPUs, 16 GB RAM
Using image "ubuntu-22.04-jdk-17-ndk-26.1.10909125" based on "ubuntu-2204-jammy-v20240614"
Installed software:

  • NDK 26.1.10909125
  • Node.js 18.18.0
  • Bun 1.1.13
  • Yarn 1.22.21
  • pnpm 9.3.0
  • npm 9.8.1
  • Java 17
  • node-gyp 10.1.0
    Resolved builder image to 'sdk-51'.
    Environment secrets:
    SENTRY_AUTH_TOKEN=********
    EAS Build environment variables:
    SHELL=/bin/sh
    NVM_INC=/home/expo/.nvm/versions/node/v18.18.0/include/node
    JAVA_HOME=/usr/lib/jvm/java-17-openjdk-amd64
    PWD=/usr/local/eas-build-worker
    LOGNAME=expo
    SYSTEMD_EXEC_PID=745
    HOME=/home/expo
    LANG=en_US.UTF-8
    INVOCATION_ID=65122af1fc0742edae70c77535edac76
    ANDROID_NDK_HOME=/home/expo/Android/Sdk/ndk/26.1.10909125
    NVM_DIR=/home/expo/.nvm
    ANDROID_HOME=/home/expo/Android/Sdk
    USER=expo
    SHLVL=0
    ANDROID_SDK_ROOT=/home/expo/Android/Sdk
    JOURNAL_STREAM=8:20007
    PATH=/home/expo/workingdir/bin:/home/expo/.nvm/versions/node/v18.18.0/bin:/opt/bundletool:/home/expo/Android/Sdk/build-tools/29.0.3:/home/expo/Android/Sdk/ndk/26.1.10909125:/home/expo/Android/Sdk/cmdline-tools/tools/bin:/home/expo/Android/Sdk/tools:/home/expo/Android/Sdk/tools/bin:/home/expo/Android/Sdk/platform-tools:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin:/home/expo/.bun/bin
    NVM_BIN=/home/expo/.nvm/versions/node/v18.18.0/bin
    EAS_BUILD_WORKER_DIR=/home/expo/eas-build-worker
    _=/home/expo/.nvm/versions/node/v18.18.0/bin/node
    CI=1
    MAESTRO_DRIVER_STARTUP_TIMEOUT=120000
    EAS_BUILD=true
    EAS_BUILD_RUNNER=eas-build
    EAS_BUILD_PLATFORM=android
    NPM_CACHE_URL=http://10.4.0.19:4873/
    NVM_NODEJS_ORG_MIRROR=http://10.4.0.203:8081/
    EAS_BUILD_NPM_CACHE_URL=http://10.4.0.19:4873/
    EAS_BUILD_PROFILE=production
    EAS_BUILD_GIT_COMMIT_HASH=b5898d99d99bf57a5b523dbd046e0ee887160809
    EAS_BUILD_ID=a3617877-5ee5-4440-a9fb-31a8f3fccf01
    EAS_BUILD_WORKINGDIR=/home/expo/workingdir/build
    EAS_BUILD_PROJECT_ID=36f03bb5-6dde-49e8-8655-444bf2d7eed7
    GRADLE_OPTS=-Dorg.gradle.jvmargs="-Xmx14g -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8" -Dorg.gradle.parallel=true -Dorg.gradle.daemon=false
    EAS_BUILD_USERNAME=anuditnagar
    __EAS_BUILD_ENVS_DIR=/home/expo/workingdir/env
    Builder is ready, starting build

Error output

No response

Reproducible demo or steps to reproduce from a blank project

@anudit anudit added the needs review Issue is ready to be reviewed by a maintainer label Aug 14, 2024
@szdziedzic
Copy link
Member

Hi @anudit,

As a sanity check can you try to run npx -y @sentry/cli info

  1. locally using the SENTRY_AUTH_TOKEN you use for local builds
  2. during the build process in the pre-install hook while using a build that uses SENTRY_AUTH_TOKEN secret

?

@szdziedzic szdziedzic added needs more info eas build and removed needs review Issue is ready to be reviewed by a maintainer labels Aug 19, 2024
Copy link

This issue is stale because it has been open for 30 days with no activity. If there is no activity in the next 7 days, the issue will be closed.

@github-actions github-actions bot added the stale label Sep 19, 2024
Copy link

This issue was closed because it has been inactive for 7 days since being marked as stale. Please open a new issue if you believe you are encountering a related problem.

@henrynewman
Copy link

For those looking for solution to this in the future this doc has everything - https://docs.expo.dev/guides/using-sentry/

For those using eas build make sure you have set your SENTRY_AUTH_TOKEN

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants