Sentry-react-native: Build Fails on PhaseScriptExecution

Created on 19 Jun 2017  路  11Comments  路  Source: getsentry/sentry-react-native

When trying to build my app i get the following error:

error: http error: Invalid token (401)



** BUILD FAILED **


The following build commands failed:
    PhaseScriptExecution Upload\ Debug\ Symbols\ to\ Sentry build/Build/Intermediates/mobile.build/Debug-iphonesimulator/mobile.build/Script-7454699DEA734742B028D477.sh

When building with the xcode gui i get the following:

Debug symbol upload failed
The Sentry build step failed while running in the background. You can ignore this error or view details to attempt to resolve it. Ignoring it might cause your crashes not to be handled properly.

Show Details:
Batch 1
[1/3] Found 1 debug symbol files. Checking for missing symbols on server
error: http error: Invalid token (401)

Most helpful comment

This looks like an sentry-cli error, it seems that your auth token isn't valid.
https://docs.sentry.io/api/auth/
Rerun
react-native unlink react-native-sentry react-native link react-native-sentry
or
change it directly in
sentry.properties file.

All 11 comments

This looks like an sentry-cli error, it seems that your auth token isn't valid.
https://docs.sentry.io/api/auth/
Rerun
react-native unlink react-native-sentry react-native link react-native-sentry
or
change it directly in
sentry.properties file.

Thank you.
That was the reason sentry.properties didn't have a Auth token.
Weird because I set it up as stated in the docs and it worked before.

But maybe something got messed up in my git repo.

I am experiencing the same issue. I did have incorrect auth in the sentry.properties, so I fixed that. But the error is still here:

> Found 1 debug symbol files. Checking for missing symbols on server

error: http error: Invalid token (401)



** BUILD FAILED **


The following build commands failed:
    PhaseScriptExecution Upload\ Debug\ Symbols\ to\ Sentry build/Build/Intermediates/abc.build/Debug-iphonesimulator/abc.build/Script-03376480400F4908919835F2.sh

(1 failure)

Am I missing something? Are there any extra steps?

I'm having the same issue. @HazAT changing sentry.properties or relinking does not work. Evereryting looked fine in the sentry.properties file from the beginning but still it does not work.

Seems related to issue #135 where there is a solution. Though I'm not sure it's the correct one if you have bitcode enabled in Xcode -> Build Settings -> Build Options.
Then maybe this is the solution https://docs.sentry.io/clients/cocoa/dsym/#dsym-with-bitcode
Any ideas on this @HazAT ?

@andidev Are you also getting the error: http error: Invalid token (401) error?
If so are you sure you are using the right auth token?
Because if that's the cast there must be a bug with sentry-cli or Sentry itself if we report invalid token if we use the right one.

Okey sorry I used the DSN instead of the auth token. So I generated a token by going to https://sentry.io/api/.

Though now I get another error:

> Found 1 debug symbol files. Checking for missing symbols on server
error: http error:  (404)
** BUILD FAILED **

So I guess I have to comment the following line in XCode -> Build Phases -> Upload Debug Symbols to Sentry

export SENTRY_PROPERTIES=sentry.properties
# ../node_modules/sentry-cli-binary/bin/sentry-cli upload-dsym

and download/upload the upload Symbols manually instead as described here https://docs.sentry.io/clients/cocoa/dsym/#dsym-with-bitcode

[EDIT] This did the trick!

The problem stays but something changed. When I test my app in dev mode Sentry works fine. Exceptions successfully captured. When I try to assemble release build I get this error: http error: Invalid token (401). Both on android and ios. So, sentry.properties are definitely correct since they work in development.

[email protected]

@hssrrw That does not make sense, if you are on the same machine it has to work.
Changing the target from debug to release doesn't change anything in the env or sentry-cli.

Sorry, we are simply lost in docs and can't find a descriptive example of using Sentry API with custom DSN. Looks like the error 401 was indeed caused by incorrect credentials. Now we get error: http error: generic error (413) which seemed to be due to source map size limit (or something like this). The limit was increased to 20Mb, but the error 413 is still there. Do we have to set even a higher limit? Or is this error related to anything different? 馃

Perform the below steps:

Clean the build.
Go to File -> Workspace Settings
In shared workspace settings select "Legacy Build System" in Build System.
Now try to build and run.

Was this page helpful?
0 / 5 - 0 ratings