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

Critical Security - Upgrade @sentry/react-native to 1.3.9 #112

Closed
celandro opened this issue May 21, 2020 · 28 comments
Closed

Critical Security - Upgrade @sentry/react-native to 1.3.9 #112

celandro opened this issue May 21, 2020 · 28 comments

Comments

@celandro
Copy link

celandro commented May 21, 2020

I received an email just now:

Last week we were notified of a security issue related to our React Native iOS SDK that could potentially lead to access to your source map in applications that use this iOS SDK. This vulnerability does not impact Android users.

As a matter of best practice, Sentry strongly encourages you update your app to protect your source maps, updating your React Native SDK to 1.3.9.

Update @sentry/react-native to 1.3.9, which you can find here: https://github.com/getsentry/sentry-react-native/releases/tag/1.3.9

@chrismin
Copy link

Our team would really appreciate this being handled asap!

@mkveksas
Copy link

Thanks for filling out this issue, @celandro.

It would be highly appreciated if the Expo team could follow up on this as soon as possible. Thanks!

@fractalgelfo
Copy link

update on npm?

@rvieceli
Copy link

After update (from 2.0.0 to 2.0.4) expo install sentry-expo I got this message:
Sentry Logger [Log]: Failed to get device context from native: SentryError: Native Client is not available, can't start on native.

@tevonsb
Copy link

tevonsb commented May 26, 2020

I'm getting the same error as @rvieceli after upgrading from 2.0.1 to 2.0.4.

@jvivaspatternag
Copy link

Same error on a fresh installation. It breaks the app as it is instantiated.

@cruzach
Copy link
Contributor

cruzach commented Jun 3, 2020

if you clear your yarn.lock file, this will be updated. sentry-expov2.0.4 uses "@sentry/react-native": "^1.0.0", which will resolve up to version 1.9.9. That said, we've merged a PR that upgrades this to ^1.3.9, and will publish a new version soon.

@rvieceli what does your sentry config look like? It's really helpful if you can provide a method to reproduce your error, rather than just the message. That probably belongs in a new issue

@cruzach cruzach closed this as completed Jun 3, 2020
@rvieceli
Copy link

rvieceli commented Jun 4, 2020

@cruzach Sorry for that, the config is the simple. but we're using npm (I will test deleting package-lock.json)

  const config = {
    dsn: environment.sentryDsn,
    debug: true,
    environment: `${environment.environment}`
  }

and then

Sentry.init(config)

@cruzach
Copy link
Contributor

cruzach commented Jun 4, 2020

@rvieceli it looks like that's caused by Sentry's Device context integration, which is added by default (although it's not listed in their default integrations). This is not particular to [email protected], i tested 2.0.0 and the same occurs, so it's related to the version of sentry-react-native. Just committed a fix that will fix that issue

@andrewkryshtal
Copy link

andrewkryshtal commented Jun 5, 2020

"@sentry/react-native": {
       "version": "1.4.3",
},

with

"sentry-expo": {
        "version": "2.1.0",
},

still not working for me. Should i wait for further fix?

@cruzach
Copy link
Contributor

cruzach commented Jun 5, 2020

what, exactly, isn't working?

@outaTiME
Copy link

outaTiME commented Jun 5, 2020

@cruzach same here using the following version with Expo SDK36:

sentry-expo: ^2.1.1
@sentry/react-native: 1.4.4

i cant make it work, i try to rollback and im stuck here: #120

@davidwadge
Copy link

Also having this issue.

@obviouscreations
Copy link

Same issue here

@cruzach
Copy link
Contributor

cruzach commented Jun 5, 2020

if you use @sentry/[email protected], this error won't occur. It looks like this may have been introduced in getsentry/sentry-react-native#902

@cruzach
Copy link
Contributor

cruzach commented Jun 5, 2020

just published sentry-expo v2.1.2 which comes with that version pinned ^

note that you'll need to remove node_modules and yarn.lock and then reinstall

@andrewkryshtal
Copy link

image
still have an on-start error after updating sentry-expo package, version of @sentry/react-native still 1.4.2. The fix is in a 1.4.5 version, isn't it?

@cruzach
Copy link
Contributor

cruzach commented Jun 9, 2020

The issue was introduced in v1.4.3, now that it's fixed we can upgrade in the next release, but @sentry/react-nativev1.4.2 is okay

@andrewkryshtal you'll need to remove node_modules and your lock file to update appropriately. If you still hit the issue, please create a new ticket including a minimal reproducible demo, thanks!

@special-character
Copy link

Just ran into this and I am using expo. I fixed it by updating sentry-expo to: "sentry-expo": "^2.1.2",.

@luizjr
Copy link

luizjr commented Jun 10, 2020

I have the last version and this appear for me:
Failed to get device context from native: SentryError: Native Client is not available, can't start on native.

@davidwadge
Copy link

Hi @luizjr. I had the same issue and had to do the clear cache dance to get it working:

watchman watch-del-all && rm -rf node_modules/ && yarn cache clean && yarn install && yarn start -- --reset-cache

@luizjr
Copy link

luizjr commented Jun 10, 2020

Hi @luizjr. I had the same issue and had to do the clear cache dance to get it working:

watchman watch-del-all && rm -rf node_modules/ && yarn cache clean && yarn install && yarn start -- --reset-cache

I ran the commands you recommended to me, and it doesn't seem to have worked.
image

image

Thanks for listening, if anyone else could help.

@davidwadge
Copy link

@luizjr I definitely had this error and resolved it somehow. The only other thing I did was reset the iPhone simulator (erase all data). Perhaps that will help?

@ovidiuch
Copy link

FYI I just followed the guide at https://docs.expo.io/guides/using-sentry, installed latest sentry-expo (2.1.2) and am getting the same error:

Sentry Logger [Log]: Failed to get device context from native: SentryError: Native Client is not available, can't start on native.

Reset caches, even though I had just installed sentry related packages, but to no avail.

Is there some linking required?

Would definitely appreciate if this was looked into.

@ovidiuch
Copy link

Note that errors do get reported to Sentry, even though the Sentry Logger error is printed on every Sentry.captureException call.

@luizjr
Copy link

luizjr commented Jun 12, 2020

@luizjr I definitely had this error and resolved it somehow. The only other thing I did was reset the iPhone simulator (erase all data). Perhaps that will help?

I reinstalled the package, cleared caches, checked the version ... but so far, nothing has really solved that.

@xmflsct
Copy link

xmflsct commented Jan 20, 2021

Same here. Reinstalled dependencies doesn't help. It happens after first app start.

@allandiego
Copy link

allandiego commented Feb 16, 2021

Got this same error after ejecting expo, using "sentry-expo": "^3.0.4". With managed workflow it was working fine, and fixed after add "@sentry/react-native": "^2.2.0", clear app data / uninstall app and reinstall apk

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