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

Build Fails on PhaseScriptExecution #108

Closed
dburgmann opened this issue Jun 19, 2017 · 12 comments
Closed

Build Fails on PhaseScriptExecution #108

dburgmann opened this issue Jun 19, 2017 · 12 comments
Assignees

Comments

@dburgmann
Copy link

dburgmann commented Jun 19, 2017

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)
@HazAT
Copy link
Member

HazAT commented Jun 19, 2017

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.

@HazAT HazAT self-assigned this Jun 19, 2017
@dburgmann
Copy link
Author

dburgmann commented Jun 19, 2017

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.

@HazAT HazAT closed this as completed Jun 19, 2017
@hssrrw
Copy link
Contributor

hssrrw commented Jul 31, 2017

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?

@andidev
Copy link

andidev commented Aug 6, 2017

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.

@andidev
Copy link

andidev commented Aug 6, 2017

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 ?

@HazAT
Copy link
Member

HazAT commented Aug 7, 2017

@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.

@andidev
Copy link

andidev commented Aug 7, 2017

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!

@hssrrw
Copy link
Contributor

hssrrw commented Sep 22, 2017

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.

react-native-sentry@0.23.2

@HazAT
Copy link
Member

HazAT commented Sep 22, 2017

@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.

@hssrrw
Copy link
Contributor

hssrrw commented Oct 2, 2017

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? 🤔

@lucasluca
Copy link

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.

@samih-dev
Copy link

similar error happen for me after changing project name on Sentry web portal - changing the project name on sentry.properties fixed the issue for me

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

No branches or pull requests

6 participants