Closed gonzalo-rivas closed 2 years ago
Hi! Which version of nodejs-mobile and nodejs-mobile-react-native are you using?
nodejs-mobile-react-native@0.6.2 nodejs-mobile-gyp@0.3.1
nodejs-mobile dunno, i guess nodejs-mobile-react-native@0.6.2 has one specifically
In 0.6.3 it also crashes
0.6.2 had this crash and the main reason why I made 0.6.3 was to fix the crash. Can you make sure you installed it correctly? It should be using nodejs-mobile 0.3.3 which fixes this crash. I use targetSdk 30 for my app Manyverse and it's working correctly on Android 11.
:( now it crashes even earlier. Error is:
NODEJS-MOBILE: terminating with uncaught exception of type std::bad_cast: std::bad_cast 11-22 22:48:36.624 11259 11336 E NODEJS-MOBILE: /usr/local/google/buildbot/src/android/ndk-release-r20/external/libcxx/../../external/libcxxabi/src/abort_message.cpp:73: abort_message: assertion "terminating with uncaught exception of type std::bad_cast: std::bad_cast" failed
node --version
v14.15.4
java --version
openjdk 12.0.2 2019-07-16
OpenJDK Runtime Environment AdoptOpenJDK (build 12.0.2+10)
OpenJDK 64-Bit Server VM AdoptOpenJDK (build 12.0.2+10, mixed mode)
Android Studio Arctic Fox | 2020.3.1 Patch 3
Build #AI-203.7717.56.2031.7784292, built on October 1, 2021
Runtime version: 11.0.10+0-b96-7281165 x86_64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Gradle 6.7 (installed with Android Studio, confirm version)
Java 1.8
ext {
buildToolsVersion = "30.0.2"
minSdkVersion = 23
compileSdkVersion = 30
targetSdkVersion = 30
supportLibVersion = "30.0.2"
}
classpath("com.android.tools.build:gradle:3.5.4")
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
ndkVersion "20.0.5594570" // ndkVersion "22.1.7171670" crashes too
Try buildToolsVersion = "29.0.3"
and ndkVersion = "21.4.7075529"
.
Nothing changes :(. Should i also try upgrading to react-native 0.65+? or is not supported yet?
NODEJS-MOBILE: terminating with uncaught exception of type std::bad_cast: std::bad_cast 11-22 22:48:36.624 11259 11336 E NODEJS-MOBILE: /usr/local/google/buildbot/src/android/ndk-release-r20/external/libcxx
I'm wondering about this directory /usr/local/google/buildbot/src
... it seems unusual for a mobile device. Where are you running your app on?
Its the emulator of Android Studio Arctic Fox. Is curious because compiling in terminal and uploading it to appcenter lets the real device to install and execute it, it doesnt crash on real device.
Yeah, I would assume that nodejs-mobile does not properly support emulators. Since it does not crash on a real device, I'll close this issue.
Hello!!! thank your for your great job:).
Play Console has now a rule to only accept compilations with targetSdk in 30 (Android 11). Paradoxically, when compiling with this setting, ony Android 11 crashes on nodejs startup. Maybe its the NDK version? Anyone has compiled succesfully in with targetsdk=30?.
*Note: im using react-native so im using nodejs-react-native that, i guess, it uses this package internally.
*Note2: In iOS it works properly
My versions: