Sentry-react-native: Build fails on iOS, error: bad json: EOF while parsing a value at line 1 column 0

Created on 3 Jul 2017  ·  12Comments  ·  Source: getsentry/sentry-react-native

Hello,

After installing Sentry, configuring it following the instructions in the documentation the build for iOS is now working anymore.

It throws this error:

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

error: bad json: EOF while parsing a value at line 1 column 0

** BUILD FAILED **

The following build commands failed:

    PhaseScriptExecution Upload\ Debug\ Symbols\ to\ Sentry build/Build/Intermediates/Olhos.build/Debug-iphonesimulator/Olhos.build/Script-CD6E5E94B95B4B5192C5AAC8.sh
(1 failure)

Anybody knows how to solve it ? Thanks

Most helpful comment

EDIT: I looked into /Users/distiller/Library/Logs/gym/mobile-mobile.log inside CircleCI container, and saw that the real issue was "Error:fseventsunavailable (this watcher can only be used on Darwin)". I do brew install watchman and now the issue is gone

I am currently having this issue. Enabled debug level logs for sentry, but still
no clue.

node v11.0.0
sentry-cli 1.37.1
react-native 0.57.5
react-native-sentry 0.39.1
Using CircleCI with Xcode 10.1.0. There is no nvm involved.

▸ Running script 'Bundle React Native code and images'
the transform cache was reset.

❌  error: EOF while parsing a value at line 1 column 0


** ARCHIVE FAILED **


The following build commands failed:
PhaseScriptExecution Bundle\ React\ Native\ code\ and\ images /Users/distiller/Library/Developer/Xcode/DerivedData/mobile-aacuhcnqhpzojtfjnelqujdbjoae/Build/Intermediates.noindex/ArchiveIntermediates/mobile/IntermediateBuildFilesPath/mobile.build/Release-iphoneos/mobile.build/Script-00DD1BFF1BD5951E006B06BC.sh
(1 failure)
[07:46:40]: Exit status: 65
[07:46:40]: 
[07:46:40]: Maybe the error shown is caused by using the wrong version of Xcode
[07:46:40]: Found multiple versions of Xcode in '/Applications/'
[07:46:40]: Make sure you selected the right version for your project
[07:46:40]: This build process was executed using '/Applications/Xcode-10.1.app'
[07:46:40]: If you want to update your Xcode path, either
[07:46:40]: 
[07:46:40]: - Specify the Xcode version in your Fastfile
[07:46:40]: ▸ xcversion(version: "8.1") # Selects Xcode 8.1.0
[07:46:40]: 
[07:46:40]: - Specify an absolute path to your Xcode installation in your Fastfile
[07:46:40]: ▸ xcode_select "/Applications/Xcode8.app"
[07:46:40]: 
[07:46:40]: - Manually update the path using
[07:46:40]: ▸ sudo xcode-select -s /Applications/Xcode.app
[07:46:40]: 

+---------------+------------------------------+
|              Build environment               |
+---------------+------------------------------+
| xcode_path    | /Applications/Xcode-10.1.app |
| gym_version   | 2.104.0                      |
| export_method | app-store                    |
| sdk           | iPhoneOS12.1.sdk             |
+---------------+------------------------------+

[07:46:40]: ▸ + [[ ! -f /Users/distiller/Library/Developer/Xcode/DerivedData/mobile-aacuhcnqhpzojtfjnelqujdbjoae/Build/Intermediates.noindex/ArchiveIntermediates/mobile/BuildProductsPath/Release-iphoneos/mobile.app/main.jsbundle ]]
[07:46:40]: ▸   DEBUG   2018-12-14 07:46:37.791786 -08:00 error: running update nagger
[07:46:40]: ▸   DEBUG   2018-12-14 07:46:37.791846 -08:00 skipping update nagger because session is not attended
[07:46:40]: ▸ error: EOF while parsing a value at line 1 column 0
[07:46:40]: ▸   DEBUG   2018-12-14 07:46:37.792409 -08:00 client close; no transport to shut down  (from sentry)
[07:46:40]:

might be relevant also:

bash-3.2$ cat /Users/distiller/Library/Developer/Xcode/DerivedData/mobile-aacuhcnqhpzojtfjnelqujdbjoae/Build/Intermediates.noindex/ArchiveIntermediates/mobile/IntermediateBuildFilesPath/mobile.build/Release-iphoneos/mobile.build/Script-00DD1BFF1BD5951E006B06BC.sh
#!/bin/sh
export SENTRY_PROPERTIES=sentry.properties
export NODE_BINARY=node
export SENTRY_LOG_LEVEL=debug
/usr/local/bin/sentry-cli react-native xcode ../node_modules/react-native/scripts/react-native-xcode.sh

any ideas @HazAT ?

All 12 comments

Does this happen every time?
We're pretty sure that's an error on our server, but we are still trying to figure out the exact circumstances when this occurs.

Yes, it happens every time.

I figured out how to avoid this error, maybe a workaround.

In xCode > Build Phases > Upload Debug Symbols to Sentry there is only:

export SENTRY_PROPERTIES=sentry.properties

And now no error is shown. Hope this help you guys to figure out what is going on.

Was getting a similar error.

Xcode build phase was

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

and I changed it to

export NODE_BINARY=node
export SENTRY_PROPERTIES=sentry.properties
../node_modules/sentry-cli-binary/bin/sentry-cli react-native xcode \
../node_modules/react-native/packager/react-native-xcode.sh

via the docs here for RN < 0.46 (using 0.45). Looks like react-native link react-native-sentry doesn't add this properly.

it happens for me too, every time.
if i compile from inside xcode, its fine.
if i compile from fastlane, i get this error.

@pvinis did you find a solution to allow it to compile with fastlane with Sentry?

I ditched sentry and use bugsnag for a while now. I'm happy with it.

To @MrHubble and future weary travellers from Google...

I had this issue when building with Sentry for iOS but I only saw it in a CI environment. The solution for me was to add a default alias for nvm in the CI installation step, i.e:

nvm install 10
+nvm alias default 10

This will only work if you're using nvm in CI. If you installed it differently, try ensuring the node binary is present when Xcode calls your build scripts.

EDIT: I looked into /Users/distiller/Library/Logs/gym/mobile-mobile.log inside CircleCI container, and saw that the real issue was "Error:fseventsunavailable (this watcher can only be used on Darwin)". I do brew install watchman and now the issue is gone

I am currently having this issue. Enabled debug level logs for sentry, but still
no clue.

node v11.0.0
sentry-cli 1.37.1
react-native 0.57.5
react-native-sentry 0.39.1
Using CircleCI with Xcode 10.1.0. There is no nvm involved.

▸ Running script 'Bundle React Native code and images'
the transform cache was reset.

❌  error: EOF while parsing a value at line 1 column 0


** ARCHIVE FAILED **


The following build commands failed:
PhaseScriptExecution Bundle\ React\ Native\ code\ and\ images /Users/distiller/Library/Developer/Xcode/DerivedData/mobile-aacuhcnqhpzojtfjnelqujdbjoae/Build/Intermediates.noindex/ArchiveIntermediates/mobile/IntermediateBuildFilesPath/mobile.build/Release-iphoneos/mobile.build/Script-00DD1BFF1BD5951E006B06BC.sh
(1 failure)
[07:46:40]: Exit status: 65
[07:46:40]: 
[07:46:40]: Maybe the error shown is caused by using the wrong version of Xcode
[07:46:40]: Found multiple versions of Xcode in '/Applications/'
[07:46:40]: Make sure you selected the right version for your project
[07:46:40]: This build process was executed using '/Applications/Xcode-10.1.app'
[07:46:40]: If you want to update your Xcode path, either
[07:46:40]: 
[07:46:40]: - Specify the Xcode version in your Fastfile
[07:46:40]: ▸ xcversion(version: "8.1") # Selects Xcode 8.1.0
[07:46:40]: 
[07:46:40]: - Specify an absolute path to your Xcode installation in your Fastfile
[07:46:40]: ▸ xcode_select "/Applications/Xcode8.app"
[07:46:40]: 
[07:46:40]: - Manually update the path using
[07:46:40]: ▸ sudo xcode-select -s /Applications/Xcode.app
[07:46:40]: 

+---------------+------------------------------+
|              Build environment               |
+---------------+------------------------------+
| xcode_path    | /Applications/Xcode-10.1.app |
| gym_version   | 2.104.0                      |
| export_method | app-store                    |
| sdk           | iPhoneOS12.1.sdk             |
+---------------+------------------------------+

[07:46:40]: ▸ + [[ ! -f /Users/distiller/Library/Developer/Xcode/DerivedData/mobile-aacuhcnqhpzojtfjnelqujdbjoae/Build/Intermediates.noindex/ArchiveIntermediates/mobile/BuildProductsPath/Release-iphoneos/mobile.app/main.jsbundle ]]
[07:46:40]: ▸   DEBUG   2018-12-14 07:46:37.791786 -08:00 error: running update nagger
[07:46:40]: ▸   DEBUG   2018-12-14 07:46:37.791846 -08:00 skipping update nagger because session is not attended
[07:46:40]: ▸ error: EOF while parsing a value at line 1 column 0
[07:46:40]: ▸   DEBUG   2018-12-14 07:46:37.792409 -08:00 client close; no transport to shut down  (from sentry)
[07:46:40]:

might be relevant also:

bash-3.2$ cat /Users/distiller/Library/Developer/Xcode/DerivedData/mobile-aacuhcnqhpzojtfjnelqujdbjoae/Build/Intermediates.noindex/ArchiveIntermediates/mobile/IntermediateBuildFilesPath/mobile.build/Release-iphoneos/mobile.build/Script-00DD1BFF1BD5951E006B06BC.sh
#!/bin/sh
export SENTRY_PROPERTIES=sentry.properties
export NODE_BINARY=node
export SENTRY_LOG_LEVEL=debug
/usr/local/bin/sentry-cli react-native xcode ../node_modules/react-native/scripts/react-native-xcode.sh

any ideas @HazAT ?

Same problem as @cihati when run on CI. Any solution yet?

we are having this problem on circleci when we moved to pod and xcworkspaces

is there a workaround?

Also seeing this on CI

Thanks @cihati! Had the exact same error when running on Travis. Had to add watchman to my travis.yml file

before_install:
    ...       
    - brew install watchman
Was this page helpful?
0 / 5 - 0 ratings