Closed emirhankolver closed 3 years ago
I fixed this issue by re-creating the project with downgrading react-native
version to 0.61.5
. it worked well!
nodejs-mobile-react-native
Doesn't working at latest version of react-native
.
I got the same issue (bad cast) with 0.63.4, and then download to 0.61.5, the bad cast issue disappear, but still get below crash:
--------- beginning of crash
01-11 13:52:21.464 29638 29900 E AndroidRuntime: FATAL EXCEPTION: FlipperEventBaseThread
01-11 13:52:21.464 29638 29900 E AndroidRuntime: Process: com.newapp, PID: 29638
01-11 13:52:21.464 29638 29900 E AndroidRuntime: java.lang.UnsatisfiedLinkError: couldn't find DSO to load: libflipper.so caused by: dlopen failed: library "libfbjni.so" not found result: 0
01-11 13:52:21.464 29638 29900 E AndroidRuntime: at com.facebook.soloader.SoLoader.doLoadLibraryBySoName(SoLoader.java:896)
01-11 13:52:21.464 29638 29900 E AndroidRuntime: at com.facebook.soloader.SoLoader.loadLibraryBySoNameImpl(SoLoader.java:725)
01-11 13:52:21.464 29638 29900 E AndroidRuntime: at com.facebook.soloader.SoLoader.loadLibraryBySoName(SoLoader.java:649)
01-11 13:52:21.464 29638 29900 E AndroidRuntime: at com.facebook.soloader.SoLoader.loadLibrary(SoLoader.java:629)
01-11 13:52:21.464 29638 29900 E AndroidRuntime: at com.facebook.soloader.SoLoader.loadLibrary(SoLoader.java:577)
01-11 13:52:21.464 29638 29900 E AndroidRuntime: at com.facebook.flipper.android.EventBase.<clinit>(EventBase.java:19)
01-11 13:52:21.464 29638 29900 E AndroidRuntime: at com.facebook.flipper.android.FlipperThread.run(FlipperThread.java:25)
any idea?
I am also getting the bad_cast error with exactly the same set as @Alonew0lfxx. Same settings except RN 0.63.3. Everything is working fine in iOS. In logcat I am able to console.log the imported nodejs object as
{ "channel": { "_subscriber": { "_subscriptionsForType": {}, "_currentSubscription": null }, "name": "_EVENTS_" } }
Any help would be awesome :-)
I am also getting the bad_cast error with exactly the same set as @Alonew0lfxx. Same settings except RN 0.63.3. Everything is working fine in iOS. In logcat I am able to console.log the imported nodejs object as
{ "channel": { "_subscriber": { "_subscriptionsForType": {}, "_currentSubscription": null }, "name": "_EVENTS_" } }
Any help would be awesome :-)
Hello I fixed most of problems by using ndk-r21b
For Linux https://dl.google.com/android/repository/android-ndk-r21b-linux-x86_64.zip For Windows https://dl.google.com/android/repository/android-ndk-r21b-windows-x86_64.zip For Mac https://dl.google.com/android/repository/android-ndk-r21b-darwin-x86_64.zip
I am also getting the bad_cast error with exactly the same set as @Alonew0lfxx. Same settings except RN 0.63.3. Everything is working fine in iOS. In logcat I am able to console.log the imported nodejs object as
{ "channel": { "_subscriber": { "_subscriptionsForType": {}, "_currentSubscription": null }, "name": "_EVENTS_" } }
Any help would be awesome :-)Hello I fixed most of problems by using ndk-r21b
For Linux https://dl.google.com/android/repository/android-ndk-r21b-linux-x86_64.zip For Windows https://dl.google.com/android/repository/android-ndk-r21b-windows-x86_64.zip For Mac https://dl.google.com/android/repository/android-ndk-r21b-darwin-x86_64.zip
This worked.....thank you so much 🥇
Works for me too!!!! I downgrade to using ndk-r21e (was using latest ndk-r22)
Thanks so much, hope it to be compatible with latest NDK in future.
I did everything one by one in Official NodeJS-Mobile Guide but when I execute the
nodejs.start('main.js');
code my app closes without any react-native error or warning. Only throws few lines from logcat. My React-Native version:0.63.4
My Not working project on GithubMy
App.js
fileLogcat output by searching
NODEJS-RN
(logcat from the time that I executed the nodejs.start(main.js) line):Full Logcat (logcat from the time that I executed the nodejs.start(main.js) line):
Metro.Config File:
project\nodejs-assets\nodejs-project\main.js File:
project\nodejs-assets\nodejs-project\package.json File