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

Upgrading to React-Native 0.59.9 (current latest) breaks app with getPropertyAsObject: property '__fbRequireBatchedBridge' is not an Object #25455

Closed
ghost opened this issue Jul 2, 2019 · 6 comments
Labels
Bug Resolution: Locked This issue was locked by the bot.

Comments

@ghost
Copy link

ghost commented Jul 2, 2019

After 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

  1. Initialize RN 0.57.x application
  2. Upgrade to RN 0.59.9

Describe what you expected to happen:
The application should start normally.

@ghost ghost added the Bug label Jul 2, 2019
@ecreeth
Copy link
Contributor

ecreeth commented Jul 2, 2019

@eran please, see the React Native upgrade guide. Maybe that can help you

@kelset
Copy link
Contributor

kelset commented Jul 2, 2019

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:

rm -rf node_modules;
rm -rf $TMPDIR/react-native-packager-cache-*;
rm -rf $TMPDIR/metro-*;
rm -rf $TMPDIR/react-*;
rm -rf $TMPDIR/haste-*;
watchman watch-del-all;
yarn;
yarn start --reset-cache; (for starting the bundler)

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 🤗

@kelset kelset closed this as completed Jul 2, 2019
@skizzo
Copy link

skizzo commented Jul 28, 2019

Hey @eran- , did you manage to solve your issue? I'm on RN 0.59.10 and this also happens to me.

@ghost
Copy link
Author

ghost commented Jul 29, 2019

Hey @eran- , did you manage to solve your issue? I'm on RN 0.59.10 and this also happens to me.

I didn't try much, my project was thin so I simply created a new React Naive CLI project on the latest version, added my components and required node modules, and it worked.

@t-gao
Copy link

t-gao commented Aug 6, 2019

any update please?

@JofBigHealth
Copy link

JofBigHealth commented Sep 23, 2019

Often react-native start --reset-cache is enough. It seems to occur when you rename files between .js and .ios.js etc and back again or mess with babel config in unexpected ways.

@facebook facebook locked as resolved and limited conversation to collaborators Jul 2, 2020
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Jul 2, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

6 participants