Upgrading to React-Native 0.59.9 (current latest) breaks app with `getPropertyAsObject: property '__fbRequireBatchedBridge' is not an Object`
See original GitHub issueAfter upgrading RN from 0.57.x to 0.59.9 (latest) I encounter the following exception:
2019-07-01 23:14:58.434 32586-32625/com.eran.myapp E/unknown:ReactNative: Exception in native call
com.facebook.jni.CppException: getPropertyAsObject: property '__fbRequireBatchedBridge' is not an Object
no stack
at com.facebook.react.bridge.queue.NativeRunnable.run(Native Method)
at android.os.Handler.handleCallback(Handler.java:873)
at android.os.Handler.dispatchMessage(Handler.java:99)
at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:29)
at android.os.Looper.loop(Looper.java:193)
at com.facebook.react.bridge.queue.MessageQueueThreadImpl$4.run(MessageQueueThreadImpl.java:232)
at java.lang.Thread.run(Thread.java:764)
I used rn-diff-repo to try and find out errors and lacks in the upgrade process, but found none.
React Native version:
React Native Environment Info:
System:
OS: macOS 10.14.5
CPU: (4) x64 Intel(R) Core(TM) i5-7600K CPU @ 3.80GHz
Memory: 34.29 MB / 4.00 GB
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 12.4.0 - /usr/local/bin/node
Yarn: 1.16.0 - /usr/local/bin/yarn
npm: 6.9.0 - /usr/local/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
SDKs:
iOS SDK:
Platforms: iOS 12.2, macOS 10.14, tvOS 12.2, watchOS 5.2
IDEs:
Android Studio: 3.4 AI-183.6156.11.34.5522156
Xcode: 10.2.1/10E1001 - /usr/bin/xcodebuild
npmPackages:
react: 16.8.3 => 16.8.3
react-native: 0.59.9 => 0.59.9
npmGlobalPackages:
react-native-app-id: 0.0.5
react-native-cli: 2.0.1
react-native-git-upgrade: 0.2.7
Steps To Reproduce
- Initialize RN 0.57.x application
- Upgrade to RN 0.59.9
Describe what you expected to happen: The application should start normally.
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (1 by maintainers)
Top Results From Across the Web
Unhandled JS Exception: getPropertyAsObject - Stack Overflow
For mac,. I have this error, I believe that you have npm install/yarn add a new package and you will require to Ctrl+C...
Read more >Upgrading a 16 months old react-native project
This is not the first time I've upgraded any react-native projects. I've done it a few times over the years and will be...
Read more >Upgrading React Native to version 0.59 and beyond: a step-by ...
There are a couple of reasons why you should update your React Native app on a regular basis. Some of the most compelling...
Read more >React Native Upgrade Helper
When upgrading, you should replace them with your actual project's name. You can also provide your app name by clicking the settings icon...
Read more >Using Hermes in React Native - LogRocket Blog
Add Hermes, an open-source JavaScript engine, to your React Native application to optimize performance by reducing app launch time.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Hello there 👋 this issue seems to be related to your experience upgrading between versions. We know this has been a long lasting pain for the community so starting v0.59 we have introduced a new flow via the new CLI.
Also, maybe it’s just a matter of some cache not being cleaned properly? Try running:
Given that this is not strictly a bug with the library itself I’ll close this, but if you can create a repro that has this issue with a freshly created
react-native init
project we can reopen it and investigate it further 🤗@eran please, see the React Native upgrade guide. Maybe that can help you