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

[iOS] Upload Debug Symbols to Sentry #3582

Closed
5 of 11 tasks
skinnynpale opened this issue Feb 7, 2024 · 22 comments
Closed
5 of 11 tasks

[iOS] Upload Debug Symbols to Sentry #3582

skinnynpale opened this issue Feb 7, 2024 · 22 comments

Comments

@skinnynpale
Copy link

skinnynpale commented Feb 7, 2024

OS:

  • Windows
  • MacOS
  • Linux

Platform:

  • iOS
  • Android

SDK:

  • @sentry/react-native (>= 1.0.0)
  • react-native-sentry (<= 0.43.2)

SDK version: 5.18.0

react-native version: 0.73.3

Are you using Expo?

  • Yes
  • No

Are you using sentry.io or on-premise?

  • sentry.io (SaaS)
  • on-premise

I have the following issue:

[Description]

Steps to reproduce:

  • Step 1
  • Step 2

Actual result:

The Sentry logging itself works fine, but when I enable upload Upload Debug Symbols to project.pbxproj with a build in xcode 15.2 I get the error "Command PhaseScriptExecution failed with a nonzero exit code".
We use new arch + hermes

image image image image

Expected result:

[Expected result]

@latobibor
Copy link

On Android I have the same problem:
Process 'command '/Users/XXX/XXX/node_modules/@sentry/cli/bin/sentry-cli'' finished with non-zero exit value 1

@aliza-khu
Copy link

What went wrong?

API request failed
caused by: sentry reported an error: request failure (http status: 500)
Object({"detail": String("Internal Error"), "errorId": String("xxx")})

@deepanshu-sharma09
Copy link

error: API request failed
caused by: sentry reported an error: request failure (http status: 500)
Object {"detail": String("Internal Error"), "errorId": String("xxxx")}

  • Where:
    Script '.../app/node_modules/@sentry/react-native/sentry.gradle' line: 142

  • What went wrong:
    Execution failed for task ':app:bundleReleaseJsAndAssets_SentryUpload_com.app'.
    Process 'command '.../app/node_modules/@sentry/cli/bin/sentry-cli'' finished with non-zero exit value 1

@pax-k
Copy link

pax-k commented Feb 8, 2024

Edit: now all is good, thanks

Same here, trying to build an iOS app on Expo.

› Executing DevKin » Upload Debug Symbols to Sentry

❌  error: API request failed

⚠️  Script has ambiguous dependencies causing it to run on every build.
   To fix, go to: Xcode » DevKin/DevKin » Build Phases » 'Upload Debug Symbols to Sentry'
   Either: Uncheck "Based on dependency analysis", or select output files to trigger the script
▸ ** ARCHIVE FAILED **
▸ The following build commands failed:
▸ 	PhaseScriptExecution Upload\ Debug\ Symbols\ to\ Sentry /Users/expo/Library/Developer/Xcode/DerivedData/DevKin-aczgjgpuztfeptgjumyzymjcejrl/Build/Intermediates.noindex/ArchiveIntermediates/DevKin/IntermediateBuildFilesPath/DevKin.build/Debug-iphoneos/DevKin.build/Script-50BEE7372E3D4B0A9587D43A.sh (in target 'DevKin' from project 'DevKin')
▸ (1 failure)
** ARCHIVE FAILED **

Yesterday was ok.

Deps:

"@sentry/react-native": "5.17.0",
"react-native": "0.73.4",
"expo": "~50.0.6",

@skinnynpale
Copy link
Author

On Android I have the same problem: Process 'command '/Users/XXX/XXX/node_modules/@sentry/cli/bin/sentry-cli'' finished with non-zero exit value 1

#3585

@aliza-khu
Copy link

The issue is resolved now.

@skinnynpale
Copy link
Author

The issue is resolved now.

iOS is work now?

@aliza-khu
Copy link

aliza-khu commented Feb 9, 2024

@skinnynpale, I am using CI/CD for build generation and only found an issue under the Android platform which is resolved now. For iOS it was already working.

@krystofwoldrich
Copy link
Member

Hello everyone,
we experienced a degradation of service on the file-based API yesterday, more information here https://status.sentry.io/incidents/5k3pjs416qnn.

Can anyone confirm the 500 API errors are not happening anymore?

@krystofwoldrich
Copy link
Member

@skinnynpale Thank you for the detailed screenshots of your changes. Everything is correct.

Was your issue related to the 500 server response?

In case it wasn't could you add export SENTRY_CLI_EXTRA_ARGS="--force-foreground --log-level=debug" to your environment and share with us the log output of the build phase so we can investigate the issue?

@AlejandroGutierrezB
Copy link

AlejandroGutierrezB commented Feb 23, 2024

This is failing on my end to:
"@sentry/react-native": "4.15.2",
"expo": "~48.0.21",
"react-native": "0.71.14",
"sentry-expo": "~6.2.2"

@AlejandroGutierrezB
Copy link

This is failing on my end to: "@sentry/react-native": "4.15.2", "expo": "~48.0.21", "react-native": "0.71.14", "sentry-expo": "~6.2.2"

update latest and it persists
"@sentry/react-native": "5.19.0"
"sentry-expo": "7.1.1"

I am inclined to think it is an API outage?

@krystofwoldrich
Copy link
Member

Hi @AlejandroGutierrezB,
thank you for the message, are you getting a status 500 response?

@AlejandroGutierrezB
Copy link

Hi @AlejandroGutierrezB, thank you for the message, are you getting a status 500 response?

@krystofwoldrich the issue is that that is the only thing I get from the cli:

› Executing myapp » Upload Debug Symbols to Sentry

❌  error: API request failed

CommandError: Failed to build iOS project. "xcodebuild" exited with error code 65.
CommandError: Failed to build iOS project. "xcodebuild" exited with error code 65.
    at Object.buildAsync (/user/myapp/node_modules/@expo/cli/build/src/run/ios/XcodeBuild.js:241:19)
    at async runIosAsync (/user/myappnode_modules/@expo/cli/build/src/run/ios/runIosAsync.js:56:25)
   

@krystofwoldrich
Copy link
Member

krystofwoldrich commented Feb 27, 2024

The failing requests were caused by an API incident, https://status.sentry.io/incidents/bt27tt1h1wsd

This was resolved now, uploads are working.

We will close the issue. Feel free to comment here in case this happens again.

@coopersamuel
Copy link

coopersamuel commented Apr 24, 2024

Hello @krystofwoldrich, I think I'm running into this issue. Could there have been a regression?

Expo EAS build is failing both on the EAS server and locally. However, it does work locally when I pass SENTRY_ALLOW_FAILURE=true as an env var. Here is a screenshot of my build logs (without the added env var). Any help would be appreciated!

image

Edit: Also, here are relevant logs from the successful build with SENTRY_ALLOW_FAILURE=true

› Generating debug TheAIBible » TheAIBible.app.dSYM
› Executing TheAIBible » Bundle React Native code and images

❌  error: API request failed


› Executing TheAIBible » [CP] Copy Pods Resources
› Executing TheAIBible » Upload Debug Symbols to Sentry

❌  error: API request failed


› Executing TheAIBible » [CP] Embed Pods Frameworks
› Signing   TheAIBible » TheAIBible.app
⚠️  Script has ambiguous dependencies causing it to run on every build.
   To fix, go to: Xcode » TheAIBible/TheAIBible » Build Phases » 'Upload Debug Symbols to Sentry'
   Either: Uncheck "Based on dependency analysis", or select output files to trigger the script

› Build Succeeded

@appsgenie
Copy link

I've also just received this error that @coopersamuel reported, building with Expos EAS and SDK 49.
Does anyone know how to fix this?

@anshul-flyfin
Copy link

anshul-flyfin commented May 12, 2024

@krystofwoldrich this issue seems to be happening again, can you confirm if there is a regression ?

error: API request failed
  caused by: sentry reported an error: request failure (http status: 500)
  Object {"detail": String("Internal Error"), "errorId": String("eb2d2943a6404dfd99c16faff66e30b3")}

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.

GenerateDSYMFile /Users/runner/Library/Developer/Xcode/DerivedData/flyfinApp-ghsymviuejdlwkgwtreqwuzdlnvh/Build/Intermediates.noindex/ArchiveIntermediates/flyfinApp-org-production/BuildProductsPath/Org\ Production\ Release-iphoneos/FlyFin.app.dSYM /Users/runner/Library/Developer/Xcode/DerivedData/flyfinApp-ghsymviuejdlwkgwtreqwuzdlnvh/Build/Intermediates.noindex/ArchiveIntermediates/flyfinApp-org-production/InstallationBuildProductsLocation/Applications/FlyFin.app/FlyFin (in target 'flyfinApp' from project 'flyfinApp')
    cd /Users/runner/work/1/s/ios
    /Applications/Xcode_15.2.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/dsymutil /Users/runner/Library/Developer/Xcode/DerivedData/flyfinApp-ghsymviuejdlwkgwtreqwuzdlnvh/Build/Intermediates.noindex/ArchiveIntermediates/flyfinApp-org-production/InstallationBuildProductsLocation/Applications/FlyFin.app/FlyFin -o /Users/runner/Library/Developer/Xcode/DerivedData/flyfinApp-ghsymviuejdlwkgwtreqwuzdlnvh/Build/Intermediates.noindex/ArchiveIntermediates/flyfinApp-org-production/BuildProductsPath/Org\ Production\ Release-iphoneos/FlyFin.app.dSYM

warning: Run script build phase 'Start Packager' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'flyfinApp' from project 'flyfinApp')
warning: Run script build phase 'Bundle React Native code and images' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'flyfinApp' from project 'flyfinApp')
warning: Run script build phase 'Upload Debug Symbols to Sentry' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'flyfinApp' from project 'flyfinApp')
warning: Run script build phase '[CP-User] [RNFB] Core Configuration' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'flyfinApp' from project 'flyfinApp')
warning: Run script build phase '[CP-User] [RNFB] Crashlytics Configuration' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'flyfinApp' from project 'flyfinApp')
warning: Run script build phase 'Create Symlinks to Header Folders' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'fmt' from project 'Pods')
warning: Run script build phase 'Create Symlinks to Header Folders' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'React-bridging' from project 'Pods')
warning: Run script build phase 'Create Symlinks to Header Folders' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'React-Codegen' from project 'Pods')
warning: Run script build phase 'Create Symlinks to Header Folders' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'RCT-Folly' from project 'Pods')
** ARCHIVE FAILED **


The following build commands failed:
	PhaseScriptExecution Upload\ Debug\ Symbols\ to\ Sentry /Users/runner/Library/Developer/Xcode/DerivedData/flyfinApp-ghsymviuejdlwkgwtreqwuzdlnvh/Build/Intermediates.noindex/ArchiveIntermediates/flyfinApp-org-production/IntermediateBuildFilesPath/flyfinApp.build/Org\ Production\ Release-iphoneos/flyfinApp.build/Script-13606D41F60548F7B47E3F63.sh (in target 'flyfinApp' from project 'flyfinApp')
(1 failure)
##[error]Error: /usr/bin/xcodebuild failed with return code: 65

@coopersamuel
Copy link

I was able to fix it on my end. My build process was not pulling my SENTRY_AUTH_TOKEN in properly. Make sure your build is providing the token correctly

@appsgenie
Copy link

I was able to build once, not sure if it was just a retry or an updated token, but now I am getting A required debug information file was missing. Did you get this issue as well @coopersamuel?

@charlestbell
Copy link

Happening again today.

@sergioisidoro
Copy link

sergioisidoro commented Sep 18, 2024

I think it is quite unacceptable that a service makes uploading the source code and symbols (a non critical task) fail the entire build if the step fails. The same happens if some error like Project not found. Please check that you entered the project and organization slugs correctly.

It's effectively making thousands of build processes dependent on Sentry's service availability.

This should be a warning, not a failure, or should be SENTRY_ABORT_BUILD_IF_FAIL or something similar.

Furthermore, I am working with multiple organizations, which have different access tokens, making the secret management quite challenging.

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

No branches or pull requests