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

[Android] custom release/version/dist is set to null after event is sent #331

Closed
2 of 5 tasks
Zycon42 opened this issue Jan 16, 2018 · 1 comment
Closed
2 of 5 tasks

Comments

@Zycon42
Copy link
Contributor

Zycon42 commented Jan 16, 2018

OS:

  • Windows
  • MacOS
  • Linux

Platform:

  • iOS
  • Android

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

v9.3.0
5.6.0
[email protected] /Users/honza/Projects/pzrb2b
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected] invalid
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
└── [email protected]

npm ERR! invalid: [email protected] /Users/honza/Projects/pzrb2b/node_modules/react-native-mixpanel

Config:

Sentry.config('https://[email protected]/...').install()

I have following issue:

On android (ios is fine) after first event is sent the custom values for release/version/dist are set null so next subsequent events have release and dist values null.

This is caused by function stripInternalSentry defined RNSentryModule.java:415 which clears version variables each time event is sent. This behaviour is inconsistent with ios, which retains those values for the whole time.

Steps to reproduce:

  • Sentry.setVersion('1.1.0-foobar')
  • Sentry.captureException(new Error('First error'))
  • Sentry.captureException(new Error('Second error'))

Actual result:
On sentry.io I see two events with releases

  • 'First error' with release org.sample.pzrb2b-1.1.0-foobar
  • 'Second error' with release org.sample.pzrb2b-null

Expected result:

  • 'First error' with release org.sample.pzrb2b-1.1.0-foobar
  • 'Second error' with release org.sample.pzrb2b-1.1.0-foobar
@Zycon42
Copy link
Contributor Author

Zycon42 commented Jan 16, 2018

My workaround around this is to reset new release variables after each event.

Sentry.setEventSentSuccessfully(event => {
  Sentry.setRelease(event.release);
  Sentry.setDist(event.dist);
});

HazAT added a commit that referenced this issue Jan 18, 2018
@HazAT HazAT mentioned this issue Jan 25, 2018
HazAT added a commit that referenced this issue Jan 26, 2018
* fix: Use shared client instead of variable

* fix: Remove strip internal vars

Fixes #331

* fix: Bump sentry wizard
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

1 participant