Closed the-unknown closed 9 months ago
Something similar happen with me, but in this case with a specific package @mapbox/mbtiles
If it helps, I've created a small repo where we can reproduce it: https://github.com/lmarcelocc/reactive-native-nodejs
Just need to follow the readme steps. Hope we can find a solution!
Thanks
App will crash/close
What errors do you see in the log? Crashes can be caused by several different reasons.
Also, I am 80% certain that Expo doesn't support nodejs-mobile.
I can share the errors i'm having running on a MacOS Ventura 13.6.1 with a chip Apple M1.
Those are compilation logs, they tell nothing about runtime behavior. Please try to use something like adb logcat
while the app is opening up and truncate the outputs to the relevant sections where the crash occurs.
Sorry, maybe I need to create a new issue to see if you can help me since it's on compilation time and not at runtime.
i can't figuring out what is the error everytime when installed any npm package and it crash
@staltz Here is my error
java.lang.RuntimeException: Node assets copy failed at com.janeasystems.rn_nodejs_mobile.RNNodeJsMobileModule$1.run(RNNodeJsMobileModule.java:106) at java.lang.Thread.run(Thread.java:1012) Caused by: java.io.FileNotFoundException: nodejs-project/node_modules/rxjs/_esm2015/LICENSE.txt at android.content.res.AssetManager.nativeOpenAsset(Native Method) at android.content.res.AssetManager.open(AssetManager.java:914) at android.content.res.AssetManager.open(AssetManager.java:891) at com.janeasystems.rn_nodejs_mobile.RNNodeJsMobileModule.copyAsset(RNNodeJsMobileModule.java:468) at com.janeasystems.rn_nodejs_mobile.RNNodeJsMobileModule.copyNodeJsAssets(RNNodeJsMobileModule.java:408) at com.janeasystems.rn_nodejs_mobile.RNNodeJsMobileModule.-$$Nest$mcopyNodeJsAssets(Unknown Source:0) at com.janeasystems.rn_nodejs_mobile.RNNodeJsMobileModule$1.run(RNNodeJsMobileModule.java:103) ... 1 more
People are commenting here about unrelated bugs, and none of these are clear enough to debug.
The original issue is about Expo, which nodejs-mobile-react-native does not support. Docs need to be updated to reflect this.
Version
v18.17.1
Platform
Linux pixelbox 5.15.0-48-generic https://github.com/nodejs-mobile/nodejs-mobile/issues/54-Ubuntu SMP Fri Aug 26 13:26:29 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
What steps will reproduce the bug?
The app will compile, open and the closes immediately.
How often does it reproduce? Is there a required condition?
Always
What is the expected behavior? Why is that the expected behavior?
App should not close/crash. Example code should execute
What do you see instead?
App will crash/close