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

EOF while parsing a value at line 1 column 0 #374

Closed
mbabker opened this issue Sep 7, 2018 · 16 comments
Closed

EOF while parsing a value at line 1 column 0 #374

mbabker opened this issue Sep 7, 2018 · 16 comments
Assignees

Comments

@mbabker
Copy link

mbabker commented Sep 7, 2018

One of my iOS apps is missing a debug file, so I copied the command from the processing issues page for that project and whenever I run it I always get the "EOF while parsing a value at line 1 column 0" error message.

I have tried installing sentry-cli via Homebrew and the automatic installation script from https://docs.sentry.io/learn/cli/installation/#automatic-installation, as well as completely deleting sentry-cli and letting the script that the processing issues page instructs me to download and execute install its own version of sentry-cli, and in all cases the same error occurs.

I am using a late 2014 Mac Mini running OS X 10.12.6.

@mikemliu
Copy link

mikemliu commented Sep 7, 2018

Yeah same. I'm invoking sentry-cli via fastlane. Was working until I switched machines.

Prob related to #94

@mikemliu
Copy link

mikemliu commented Sep 7, 2018

Worked. I think latest version expects a path to uncompressed .DSYMs

Once I point it to a path and not a zip file, worked. Still, the fastlane plugin is broken since it's feeding the upload-dif command a zip file arg.

This works

sentry-cli --auth-token *** upload-dif --org *** --project *** ./

This doesn't

sentry-cli --auth-token *** upload-dif --org *** --project *** ./xyz.dSYM.zip

@mbabker
Copy link
Author

mbabker commented Sep 7, 2018

Thanks for the pointer. So after downloading the script that I was being pointed to, it's trying to run this command in essence:

sentry-cli --auth-token <token> upload-dsym --derived-data --no-zips --uuid <uuid> --require-all

Seems the script must be run in the same directory as the dSYM files, because passing a full path fails too:

sentry-cli --auth-token <token> upload-dsym --derived-data --no-zips --uuid <uuid> --require-all ~/Library/Developer/Xcode/Archives/2018-09-06/<app>/dSYMs/

But this does work:

cd ~/Library/Developer/Xcode/Archives/2018-09-06/<app>/dSYMs/
sentry-cli --auth-token <token> upload-dsym --derived-data --no-zips --uuid <uuid> --require-all

I don't recall seeing anything in the documentation about a requirement to be in the same directory as the dSYM files, so I'd suggest two things:

  • One of the following:
    • An improvement to the docs to clarify this bit
    • A code fix to allow a full path to be provided (which seems to be a documented argument in the help output for the command)
  • If being in the same directory is a hard requirement, updating the script you are instructing me to download to move into this directory, or adding some clarity/instructions to make it clear I need to run the command from the right directory
Michaels-Mac-mini:dSYMs mbabker$ sentry-cli upload-dsym --help
sentry-cli-upload-dsym 
DEPRECATED: Upload Mac debug symbols to a project.

USAGE:
    sentry-cli upload-dsym [OPTIONS] [--] [PATH]...

@evfemist
Copy link

had same EOF while parsing. Ended up with using sentry-cli directly in Fastfile

ipa_path = gym(scheme: scheme, configuration: configuration, ...)
dsym_path = ipa_path.sub('.ipa', '.app.dSYM.zip')
sh("sentry-cli --auth-token YOUR_AUTH_TOKEN upload-dsym --org YOUR_ORG_SLUG --project YOUR_PROJECT_SLUG #{dsym_path}")

@jan-auer
Copy link
Member

jan-auer commented Sep 25, 2018

@mikemliu Any chance you could send one of those ZIPs to jan.auer@sentry.io? Seems like we might have a bug in unpacking ZIPs.

We are aware that the reprocessing script might currently fail under some circumstances. It was not intended to have the requirement of running in the same directory. Instead, it should look in XCode's derived data folder (hence --derived-data) for the debug files.

Regardless, you should always be able to pass custom paths to sentry-cli upload-dif. Could you please post which errors you are getting when trying to pass a path as opposed to not passing one?

@jan-auer jan-auer self-assigned this Sep 25, 2018
@mikemliu
Copy link

mikemliu commented Oct 3, 2018

It is indeed a path issue, since if I execute the command giving it the current directory ./ it finds the zipped symbol file as expected. My project is using bitcode so requires downloading the dsym zip prior to uploading (hence the fastlane plugin).

@cihati
Copy link

cihati commented Dec 14, 2018

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

I am having this error, but not related to dsym. Explained here getsentry/sentry-react-native#135 (comment) in detail. Any ideas? @jan-auer

@anniewey
Copy link

anniewey commented Jan 4, 2019

@mikemliu Can you share the path that you used?

@skizzo
Copy link

skizzo commented May 12, 2019

Having this issue too, from one day to the other, without updating anything. After running this command

sentry-cli --auth-token MY-AUTH-TOKEN-REPLACED-FOR-GITHUB --log-level=debug react-native codepush 'reimmund3-ios' ios ./dist/codepush/ios/CodePush --deployment Production --org 'nerdybirdy' --project 'reimmund3-ios'

My terminal output is:

  INFO    2019-05-12 12:30:23.767290 +02:00 Loaded config from /Users/steff/.sentryclirc
  DEBUG   2019-05-12 12:30:23.767540 +02:00 sentry-cli version: 1.42.0, platform: "darwin", architecture: "x86_64"
  INFO    2019-05-12 12:30:23.767559 +02:00 sentry-cli was invoked with the following command line: "sentry-cli" "--auth-token" "MY-AUTH-TOKEN-REPLACED-FOR-GITHUB" "--log-level=debug" "react-native" "codepush" "reimmund3-ios" "ios" "./dist/codepush/ios/CodePush" "--deployment" "Production" "--org" "nerdybirdy" "--project" "reimmund3-ios"
> Fetching latest code-push package info
  DEBUG   2019-05-12 12:30:27.795272 +02:00 error: running update nagger
  INFO    2019-05-12 12:30:27.795474 +02:00 Running update nagger update check
  DEBUG   2019-05-12 12:30:27.795512 +02:00 request GET https://release-registry.services.sentry.io/apps/sentry-cli/latest
  DEBUG   2019-05-12 12:30:27.795533 +02:00 retry number 0, max retries: 0
  DEBUG   2019-05-12 12:30:28.287535 +02:00 > GET /apps/sentry-cli/latest HTTP/1.1
  DEBUG   2019-05-12 12:30:28.287562 +02:00 > Host: release-registry.services.sentry.io
  DEBUG   2019-05-12 12:30:28.287571 +02:00 > Accept: */*
  DEBUG   2019-05-12 12:30:28.287579 +02:00 > Connection: TE
  DEBUG   2019-05-12 12:30:28.287587 +02:00 > TE: gzip
  DEBUG   2019-05-12 12:30:28.287594 +02:00 > User-Agent: sentry-cli/1.42.0
  DEBUG   2019-05-12 12:30:28.420191 +02:00 < HTTP/1.1 200 OK
  DEBUG   2019-05-12 12:30:28.420229 +02:00 < Server: nginx
  DEBUG   2019-05-12 12:30:28.420244 +02:00 < Date: Sun, 12 May 2019 10:30:28 GMT
  DEBUG   2019-05-12 12:30:28.420257 +02:00 < Content-Type: application/json
  DEBUG   2019-05-12 12:30:28.420270 +02:00 < Content-Length: 721
  DEBUG   2019-05-12 12:30:28.420281 +02:00 < Connection: close
  DEBUG   2019-05-12 12:30:28.420292 +02:00 < Strict-Transport-Security: max-age=2592000
  DEBUG   2019-05-12 12:30:28.420975 +02:00 response status: 200
  INFO    2019-05-12 12:30:28.421017 +02:00 Looking for file named: sentry-cli-Darwin-x86_64
  DEBUG   2019-05-12 12:30:28.421025 +02:00 body: {"canonical":"app:sentry-cli","file_urls":{"sentry-cli-Darwin-x86_64":"https://downloads.sentry-cdn.com/sentry-cli/1.42.0/sentry-cli-Darwin-x86_64","sentry-cli-Linux-i686":"https://downloads.sentry-cdn.com/sentry-cli/1.42.0/sentry-cli-Linux-i686","sentry-cli-Linux-x86_64":"https://downloads.sentry-cdn.com/sentry-cli/1.42.0/sentry-cli-Linux-x86_64","sentry-cli-Windows-i686.exe":"https://downloads.sentry-cdn.com/sentry-cli/1.42.0/sentry-cli-Windows-i686.exe","sentry-cli-Windows-x86_64.exe":"https://downloads.sentry-cdn.com/sentry-cli/1.42.0/sentry-cli-Windows-x86_64.exe"},"main_docs_url":"https://docs.sentry.io/learn/cli","name":"Sentry CLI","repo_url":"https://github.com/getsentry/sentry-cli","version":"1.42.0"}

  INFO    2019-05-12 12:30:28.421060 +02:00 Found asset sentry-cli-Windows-i686.exe
  INFO    2019-05-12 12:30:28.421067 +02:00 Found asset sentry-cli-Linux-x86_64
  INFO    2019-05-12 12:30:28.421074 +02:00 Found asset sentry-cli-Linux-i686
  INFO    2019-05-12 12:30:28.421095 +02:00 Found asset sentry-cli-Windows-x86_64.exe
  INFO    2019-05-12 12:30:28.421107 +02:00 Found asset sentry-cli-Darwin-x86_64
error: EOF while parsing a value at line 1 column 0
  DEBUG   2019-05-12 12:30:28.422064 +02:00 client close; no transport to shut down  (from sentry)

Anybody has an idea? I can't update any of my apps any more, need to solve this immediately.

@sibelius
Copy link

is there any workaround?

@ghost
Copy link

ghost commented Jul 12, 2019

Getting this same error. Not sure how to solve this

@sregg
Copy link

sregg commented Jul 16, 2019

For me the issue was happening when I was building a different scheme (e.g. staging).
I fixed it by checking that I'm running the sentry-cli script only for the prod scheme.

I replaced the Bundle React Native code and images build phase script with this:

export DEVELOPMENT_BUILD_CONFIGURATIONS="+(Dev.Debug|Stage.Debug|Debug)"
export NODE_BINARY=node
# disable sentry-cli for stage and dev schemes
# only run it for prod scheme
if [ "${CONFIGURATION}" == "Release" ]; then
    echo 'running sentry-cli'
    export SENTRY_PROPERTIES=sentry.properties

    ../node_modules/@sentry/cli/bin/sentry-cli --log-level=debug react-native xcode --force-foreground ../node_modules/react-native-schemes-manager/lib/react-native-xcode.sh
    exit 0
fi

echo 'skipping sentry-cli'
 ../node_modules/react-native-schemes-manager/lib/react-native-xcode.sh

and if you're like me and you're using react-native-schemes-manager you have to put that script in package.json in xcodeSchemes.settings.fix-script.nodeCommand

"settings": {
  "fix-script": {
    "nodeCommand": "# disable sentry-cli for stage and dev schemes\\n# only run it for prod scheme\\nif [ \\\"${CONFIGURATION}\\\" == \\\"Release\\\" ]; then\\n    echo 'running sentry-cli'\\n    export SENTRY_PROPERTIES=sentry.properties\\n\\n    ../node_modules/@sentry/cli/bin/sentry-cli --log-level=debug react-native xcode --force-foreground ../node_modules/react-native-schemes-manager/lib/react-native-xcode.sh\\n    exit 0\\nfi\\n\\necho 'skipping sentry-cli'\\n"
  }
}

@kamilogorek
Copy link
Contributor

Closing the issue, as it seems like the original issue has been partially resolved or there is a working solution. I'd prefer someone to create a new issue with a fresh description if it's still an issue.
Please do not hesitate to ping me if it is still relevant, and I will happily reopen and work on it.
Cheers!

@nturpin
Copy link

nturpin commented Aug 3, 2020

@kamilogorek we just started getting the error described here. I opened a new issue linking to this one. Please let us know about any possible workarounds or fixes.

@cannc4
Copy link

cannc4 commented Feb 5, 2021

Same here. Really odd and feels unstable to see this error pop up every once in a while.

@kamilogorek
Copy link
Contributor

I suggest upgrading to 1.64.0 which has a more descriptive error message and should make debugging easier. Cheers!

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