getsentry / sentry-react-native

Official Sentry SDK for React Native
https://sentry.io
MIT License
1.57k stars 337 forks source link

[ANDROID ONLY] Sentry is failing to upload Sourcemap to existing release. #485

Closed fmonsalvo closed 6 years ago

fmonsalvo commented 6 years ago

OS:

Platform:

Output of node -v && npm -v && npm ls --prod --depth=0

v10.7.0
6.1.0
ironthrone@0.0.1 /Users/franco/Projects/ironthrone
├── @babel/runtime@7.0.0
├── @okgrow/react-native-copilot@2.4.1 invalid
├── date-fns@2.0.0-alpha.18
├── kalmanjs@1.0.0-beta
├── lodash@4.17.11
├── lottie-react-native@2.5.8
├── node-forge@0.7.6
├── normalizr@3.2.4
├── UNMET PEER DEPENDENCY prop-types@15.6.2
├── rasti@3.2.3
├── UNMET PEER DEPENDENCY react@16.5.0
├── UNMET PEER DEPENDENCY react-native@0.57.0
├── react-native-beacons-manager@1.1.0 invalid
├── react-native-branch@2.3.3
├── react-native-camera@1.3.0
├── react-native-config@0.11.5
├── react-native-connectivity-status@1.5.0
├── react-native-contacts@2.2.3
├── react-native-device-brightness@1.2.0 invalid
├── react-native-device-info@0.21.5
├── react-native-fabric@0.5.2
├── react-native-fabric-crashlytics@0.1.8
├── react-native-fast-image@5.0.10
├── react-native-fs@2.11.17
├── react-native-haptic-feedback@1.2.0
├── react-native-image-resizer@1.0.0
├── react-native-keyboard@2.0.1 (git+https://github.com/beefe/react-native-keyboard.git#e79e1eace4d0dab225ea07e7c3d02a2b7fb80b07)
├── react-native-keyboard-aware-scroll-view@0.4.4
├── react-native-keyboard-spacer@0.4.1
├── react-native-keychain@2.0.0
├── react-native-modal@6.1.0
├── react-native-permissions@1.0.6
├── react-native-progress@3.5.0
├── react-native-push-notification@3.0.2 invalid
├── react-native-qrcode-svg@5.1.1
├── react-native-render-html@3.10.0
├── react-native-sentry@0.39.0
├── react-native-snap-carousel@3.7.4
├── react-native-svg@6.5.2
├── react-native-switch-selector@1.1.8
├── react-native-twilio-programmable-voice@2.0.0 invalid
├── react-native-user-defaults@0.1.5
├── react-native-vector-icons@4.6.0
├── react-navigation@1.5.11
├── react-navigation-redux-helpers@1.1.2
├── react-redux@5.0.7
├── redux@3.7.2
├── redux-actions@1.2.2
├── redux-logger@2.10.2
├── redux-persist@4.10.2
├── redux-persist-transform-filter@0.0.9
├── redux-thunk@2.3.0
├── reselect@3.0.1
├── totp-generator@0.0.5
└── validator@7.2.0

npm ERR! peer dep missing: prop-types@15.6.0, required by react-native-fs@2.11.17
npm ERR! peer dep missing: react@16.2.0, required by rasti@3.2.3
npm ERR! peer dep missing: react-native@0.53.0, required by rasti@3.2.3
npm ERR! invalid: @okgrow/react-native-copilot@2.4.1 /Users/franco/Projects/ironthrone/node_modules/@okgrow/react-native-copilot
npm ERR! extraneous: hoist-non-react-statics@3.0.1 /Users/franco/Projects/ironthrone/node_modules/@okgrow/react-native-copilot/node_modules/hoist-non-react-statics
npm ERR! invalid: react-native-beacons-manager@1.1.0 /Users/franco/Projects/ironthrone/node_modules/react-native-beacons-manager
npm ERR! invalid: react-native-device-brightness@1.2.0 /Users/franco/Projects/ironthrone/node_modules/react-native-device-brightness
npm ERR! invalid: react-native-push-notification@3.0.2 /Users/franco/Projects/ironthrone/node_modules/react-native-push-notification
npm ERR! invalid: react-native-twilio-programmable-voice@2.0.0 /Users/franco/Projects/ironthrone/node_modules/react-native-twilio-programmable-voice
npm ERR! peer dep missing: prop-types@15.6.0, required by react-native-fs@2.11.17
npm ERR! peer dep missing: prop-types@15.6.0, required by react-native-fs@2.11.17
npm ERR! invalid: react-native-modal@5.0.0 /Users/franco/Projects/ironthrone/node_modules/rasti/node_modules/react-native-modal
npm ERR! extraneous: prop-types@15.6.0 /Users/franco/Projects/ironthrone/node_modules/rasti/node_modules/react-native-modal/node_modules/prop-types
npm ERR! peer dep missing: prop-types@15.6.0, required by react-native-fs@2.11.17
npm ERR! peer dep missing: prop-types@15.6.0, required by react-native-fs@2.11.17
npm ERR! peer dep missing: prop-types@15.6.0, required by react-native-fs@2.11.17
npm ERR! peer dep missing: prop-types@15.6.0, required by react-native-fs@2.11.17
npm ERR! peer dep missing: prop-types@15.6.0, required by react-native-fs@2.11.17
npm ERR! peer dep missing: prop-types@15.6.0, required by react-native-fs@2.11.17
npm ERR! peer dep missing: prop-types@15.6.0, required by react-native-fs@2.11.17
npm ERR! peer dep missing: prop-types@15.6.0, required by react-native-fs@2.11.17
npm ERR! peer dep missing: prop-types@15.6.0, required by react-native-fs@2.11.17
npm ERR! missing: react-native-tab-view@github:react-navigation/react-native-tab-view, required by react-navigation@1.5.11
npm ERR! peer dep missing: prop-types@15.6.0, required by react-native-fs@2.11.17

Config:

Sentry.config('https://...@sentry.io/...', {
....
}).install()

I have following issue: I have updated to latest RN (0.57.0) and now Sentry is not able to upload sourcemaps to self hosted sentry server. Here is Gradle's log:

The TaskInternal.execute() method has been deprecated and is scheduled to be removed in Gradle 5.0. There are better ways to re-use task logic, see https://docs.gradle.org/4.4/userguide/custom_tasks.html#sec:reusing_task_logic.
    at sentry_ehv5hxxi05nl7smtytpso27ql$_run_closure1$_closure4$_closure11.doCall(/Users/franco/Projects/ironthrone/node_modules/react-native-sentry/sentry.gradle:176)
    (Run with --stacktrace to get the full stack trace of this deprecation warning.)
  INFO    2018-09-28 17:56:20.287240 -03:00 Loaded config from /Users/franco/.sentryclirc
  INFO    2018-09-28 17:56:20.289821 -03:00   bundle path: /Users/franco/Projects/ironthrone/android/app/build/generated/assets/react/qa/index.android.bundle
Processing react-native sourcemaps for Sentry upload.
  INFO    2018-09-28 17:56:20.289845 -03:00   sourcemap path: /Users/franco/Projects/ironthrone/android/app/build/generated/assets/react/qa/index.android.bundle.map
> Analyzing 2 sources
> Rewriting sources
> Adding source map references
  DEBUG   2018-09-28 17:56:21.179856 -03:00 request POST https://sentry.keenvil.com/api/0/projects/keenvil/ironthrone/releases/
  DEBUG   2018-09-28 17:56:21.179896 -03:00 using token authentication
  DEBUG   2018-09-28 17:56:21.179919 -03:00 sending JSON data (69 bytes)
  DEBUG   2018-09-28 17:56:21.909718 -03:00 > POST /api/0/projects/keenvil/ironthrone/releases/ HTTP/1.1
  DEBUG   2018-09-28 17:56:21.909750 -03:00 > Host: sentry.keenvil.com
  DEBUG   2018-09-28 17:56:21.909761 -03:00 > Accept: */*
  DEBUG   2018-09-28 17:56:21.909784 -03:00 > Connection: TE
  DEBUG   2018-09-28 17:56:21.909794 -03:00 > TE: gzip
  DEBUG   2018-09-28 17:56:21.909805 -03:00 > User-Agent: sentry-cli/1.36.0
  DEBUG   2018-09-28 17:56:21.910762 -03:00 > Authorization: Bearer ***
  DEBUG   2018-09-28 17:56:21.910786 -03:00 > Content-Type: application/json
  DEBUG   2018-09-28 17:56:21.910802 -03:00 > Content-Length: 69
  DEBUG   2018-09-28 17:56:22.100883 -03:00 < HTTP/1.1 208 ALREADY REPORTED
  DEBUG   2018-09-28 17:56:22.100934 -03:00 < Date: Fri, 28 Sep 2018 20:56:22 GMT
  DEBUG   2018-09-28 17:56:22.100960 -03:00 < Content-Type: application/json
  DEBUG   2018-09-28 17:56:22.100977 -03:00 < Content-Length: 441
  DEBUG   2018-09-28 17:56:22.100994 -03:00 < Connection: keep-alive
  DEBUG   2018-09-28 17:56:22.101008 -03:00 < X-XSS-Protection: 1; mode=block
Uploading sourcemaps for release com.keenvil.ironthrone-1.0.11 distribution 35
  DEBUG   2018-09-28 17:56:22.101024 -03:00 < Content-Language: en
  DEBUG   2018-09-28 17:56:22.101086 -03:00 < X-Content-Type-Options: nosniff
  DEBUG   2018-09-28 17:56:22.101133 -03:00 < Vary: Accept-Language, Cookie
  DEBUG   2018-09-28 17:56:22.101187 -03:00 < Allow: GET, POST, HEAD, OPTIONS
  DEBUG   2018-09-28 17:56:22.101204 -03:00 < X-Frame-Options: deny
  DEBUG   2018-09-28 17:56:22.101274 -03:00 response: 208
  DEBUG   2018-09-28 17:56:22.101301 -03:00 body: {"lastDeploy": null, "dateCreated": "2018-08-16T03:15:05.246Z", "lastEvent": "2018-09-28T20:48:47Z", "shortVersion": "1.0.11", "authors": [], "owner": null, "newGroups": 27, "data": {}, "projects": [{"slug": "ironthrone", "name": "Ironthrone"}], "dateReleased": null, "url": null, "deployCount": null, "commitCount": null, "version": "com.keenvil.ironthrone-1.0.11", "firstEvent": "2018-08-16T03:15:05.246Z", "lastCommit": null, "ref": null}
  DEBUG   2018-09-28 17:56:22.101510 -03:00 request GET https://sentry.keenvil.com/api/0/projects/keenvil/ironthrone/releases/com.keenvil.ironthrone-1.0.11/files/cursor=
  DEBUG   2018-09-28 17:56:22.101529 -03:00 using token authentication
  DEBUG   2018-09-28 17:56:22.101658 -03:00 > GET /api/0/projects/keenvil/ironthrone/releases/com.keenvil.ironthrone-1.0.11/files/cursor= HTTP/1.1
  DEBUG   2018-09-28 17:56:22.101676 -03:00 > Host: sentry.keenvil.com
  DEBUG   2018-09-28 17:56:22.101692 -03:00 > Accept: */*
  DEBUG   2018-09-28 17:56:22.101708 -03:00 > Connection: TE
  DEBUG   2018-09-28 17:56:22.101723 -03:00 > TE: gzip
  DEBUG   2018-09-28 17:56:22.101740 -03:00 > User-Agent: sentry-cli/1.36.0
  DEBUG   2018-09-28 17:56:22.101770 -03:00 > Authorization: Bearer ***
  DEBUG   2018-09-28 17:56:22.270864 -03:00 < HTTP/1.1 404 NOT FOUND
  DEBUG   2018-09-28 17:56:22.270913 -03:00 < Date: Fri, 28 Sep 2018 20:56:22 GMT
  DEBUG   2018-09-28 17:56:22.270934 -03:00 < Content-Type: text/html; charset=utf-8
  DEBUG   2018-09-28 17:56:22.270950 -03:00 < Content-Length: 0
  DEBUG   2018-09-28 17:56:22.270970 -03:00 < Connection: keep-alive
  DEBUG   2018-09-28 17:56:22.270985 -03:00 < X-XSS-Protection: 1; mode=block
  DEBUG   2018-09-28 17:56:22.271001 -03:00 < Content-Language: en
  DEBUG   2018-09-28 17:56:22.271016 -03:00 < X-Content-Type-Options: nosniff
  DEBUG   2018-09-28 17:56:22.271031 -03:00 < Vary: Accept-Language, Cookie
  DEBUG   2018-09-28 17:56:22.271104 -03:00 < X-Frame-Options: deny
  DEBUG   2018-09-28 17:56:22.271191 -03:00 response: 404
  DEBUG   2018-09-28 17:56:22.274652 -03:00 skipping update nagger because session is not attended
error: release not found
  DEBUG   2018-09-28 17:56:22.276958 -03:00 client close; no transport to shut down  (from sentry)
:app:bundleQaJsAndAssets FAILED

Steps to reproduce:

Actual result:

Expected result:

HazAT commented 6 years ago

Hey, can you please upgrade you dependencies, we released a new version of sentry-cli 1.36.1 which could fix this issue.

fmonsalvo commented 6 years ago

Hey, @HazAT I'm using sentry-cli 1.36.1 and react-native-sentry 0.39.0, but when building using gradle it is still using sentry-cli 1.36.0. Do you know why could this be happening?

fmonsalvo commented 6 years ago

I was able to install sentry-cli 1.36.1 in my node_modules but I had to add it as a dependency to my project as react-native-sentry keeps installing 1.36.0. With 1.36.1 the issue is solved.