We are developing a library using react native to power a few views inside that library. The react release bundle gets created and put inside the android assets folder at build time. However, when the ReactInstangeManager attempts to loadScriptFromAssets we receive the following exception:
com.facebook.react.bridge.JSExecutionException: ReferenceError: Can't find variable: __fbBatchedBridge (<unknown file>:1)
at com.facebook.react.bridge.ReactBridge.loadScriptFromAssets(Native Method)
at com.facebook.react.bridge.JSBundleLoader$1.loadScript(JSBundleLoader.java:32)
at com.facebook.react.bridge.CatalystInstanceImpl$2.call(CatalystInstanceImpl.java:146)
at com.facebook.react.bridge.CatalystInstanceImpl$2.call(CatalystInstanceImpl.java:137)
at com.facebook.react.bridge.queue.MessageQueueThreadImpl$1.run(MessageQueueThreadImpl.java:73)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:31)
at android.os.Looper.loop(Looper.java:148)
at com.facebook.react.bridge.queue.MessageQueueThreadImpl$3.run(MessageQueueThreadImpl.java:184)
at java.lang.Thread.run(Thread.java:818)
Note: The bundle definitely exists as I have debug the application and run context.getAssets().open("bni-sdk.bundle") just before this line and the file is returned.
Any ideas?
Aucun commentaire:
Enregistrer un commentaire