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

Fails with sentry-expo 3.0 #25

Open
mattrabe opened this issue Oct 5, 2020 · 1 comment
Open

Fails with sentry-expo 3.0 #25

mattrabe opened this issue Oct 5, 2020 · 1 comment

Comments

@mattrabe
Copy link

mattrabe commented Oct 5, 2020

sentry-expo 3.0 is about to be released (current is 3.0.0-rc4). That release will include a breaking change wherein exports are now namespaced. That change leads to this package failing with sentry-expo 3.0:

IMG_FE9FF7B4E3C4-1

The fix is simple... instead of:

import * as Sentry from 'sentry-expo'

...

Sentry.captureException(error)

we now need to do:

import { Native as Sentry } from 'sentry-expo'

...

Sentry.captureException(error)

Please note that this applies to all/many methods, but does not apply to init.

I discovered this while tracking down changes required in order to upgrade a project to Expo SDK 39, which includes React 0.63, and therefore includes the change from YellowBox to LogBox. It seems that sentry-expo used YellowBox pre-3.0, and soon everyone using Expo is therefore going to upgrade that package to avoid YellowBox warnings. The relevant ticket is here: expo/expo#10300

@mattrabe
Copy link
Author

mattrabe commented Oct 5, 2020

At second glance, this issue is not a bug in this package, and only requires a simple change for developers.

I felt it warranted a documentation change, since it's not immediately obvious to developers which version of the object they are going to want to pass to createSentryMiddleware(). Not sure if you'll want to merge it, but I opened a PR with that documentation change which you can see above. Thanks!

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