I updated to RN 26 (from 25) and I am getting this error. I'm not quite sure what is wrong, but it worked before in previous version.
Sigh. So, Raven.js 3.x instruments setTimeout
(and other built ins), which I guess has become read only as of React Native 0.26.
I don't have an easy solution at the moment. React Native has been a moving target and I'm not sure we can keep up with their non-stop API / behavior changes.
CC @grabbou
I was trying to integrate Sentry to my app that's using react-native 0.26. Removing 'use strict'; from raven.js helped me going on.
This is not a real solution but i wanted to point that out if anyone else needs a temp one.
@benvinegar Sorry about the breakage. I'm releasing React Native 0.26.2 to npm now with this fix:
https://github.com/facebook/react-native/pull/7704
Would what do you think about contributing unit tests to React Native that would catch breakages like this? We also release an rc roughly 2 weeks before each release, testing the rc and reporting bugs to us would be very valuable.
We also release an rc roughly 2 weeks before each release, testing the rc and reporting bugs to us would be very valuable.
When I first saw this issue I didn't really think it was a bug per say. At a glance I just thought it was a decision the team had made to make built-ins read-only. In hindsight, I should have done more investigation and reported it. This is my bad.
FWIW, we have done some minor contributions to React/React Native, including issues [1, 2], patches, etc. We're trying :)
@halilb Thanks for that hack, it worked for me. Hopefully RN 0.27 will merge this fix in.
To summarize for anyone else with this problem. You can fix it temporarily by opening node_modules/raven-js/src/raven.js
and commenting out the line that looks like this 'use strict';
. However, this should be fixed in the next version of React Native, at which point you should probably undo that change.
@mcrowe: we published 0.26.2 which fixes the problem. It's live. If you can try it out that would be great
@vjeux It does, indeed, work on 0.26.2. To be honest, I'm too nervous to release an update of my app on a point release of RN. Are they considered solid releases?
Point releases are our hotfixes. We only cherry-pick things that are terribly broken. You can see the list here:
https://github.com/facebook/react-native/commits/0.26-stable
0.26.1 contains three small commits and 0.26.2 contains one commit: the one to fix this bug.
I understand your fear though, we've done a pretty bad job at upgrading releases where we break a ton of stuff all the time.
@vjeux That's awesome, actually. Now that I understand that convention, I feel a lot better about upgrading. Thanks!
Thanks for all the hard work on RN, by the way. Sure some updates have been tough. But I still feel that making quick progress is more important.
Most helpful comment
@vjeux That's awesome, actually. Now that I understand that convention, I feel a lot better about upgrading. Thanks!
Thanks for all the hard work on RN, by the way. Sure some updates have been tough. But I still feel that making quick progress is more important.