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

Immediate crash on Android #1

Open
rfestag opened this issue Feb 28, 2021 · 3 comments
Open

Immediate crash on Android #1

rfestag opened this issue Feb 28, 2021 · 3 comments

Comments

@rfestag
Copy link

rfestag commented Feb 28, 2021

Hi @vjpr

Thanks for the work you've done figuring out how to get this working! I'm not sure if I'm doing something wrong, but I tried using this repo to test out pnpm workspaces with RN. First I needed to manually install @react-native-community/cli-platform-android. After that, I'm able to generate a build and have it download to my phone. Unfortunately, as soon as the download completes, the application crashes. I don't get any warnings, errors, or anything obvious. Any idea what might be going wrong? I notice your example shows using IOS, have you successfully tested it on android?

@rfestag
Copy link
Author

rfestag commented Feb 28, 2021

Update: It looks like react-native dependencies aren't being installed/loaded, particularly jsc-android. I don't see the jsc-android anywhere in any of my node_modules. If I use npm instead, I see it installed in my node_modules. I would have thought it would be nested under packages/react-native/node_modules/react-native/node_modules, or perhaps way up at the root node_module, but maybe I'm missing something?

02-28 10:54:34.820 23526 23579 E SoLoader: couldn't find DSO to load: libhermes.so
02-28 10:54:34.820 23526 23579 E SoLoader: 	SoSource 0: com.facebook.soloader.ApkSoSource[root = /data/user/0/com.myproject/lib-main flags = 1]
02-28 10:54:34.820 23526 23579 E SoLoader: 	SoSource 1: com.facebook.soloader.DirectorySoSource[root = /data/app/~~sGE8nCPkS2zitanFiDVx_Q==/com.myproject-dagz_j5G2xB2oqDyeD4nzQ==/lib/arm64 flags = 0]
02-28 10:54:34.820 23526 23579 E SoLoader: 	SoSource 2: com.facebook.soloader.DirectorySoSource[root = /vendor/lib64 flags = 2]
02-28 10:54:34.820 23526 23579 E SoLoader: 	SoSource 3: com.facebook.soloader.DirectorySoSource[root = /system/lib64 flags = 2]
02-28 10:54:34.820 23526 23579 E SoLoader: 	Native lib dir: /data/app/~~sGE8nCPkS2zitanFiDVx_Q==/com.myproject-dagz_j5G2xB2oqDyeD4nzQ==/lib/arm64
02-28 10:54:34.820 23526 23579 E SoLoader:  result: 0
02-28 10:54:34.821 23526 23579 E AndroidRuntime: FATAL EXCEPTION: create_react_context
02-28 10:54:34.821 23526 23579 E AndroidRuntime: Process: com.myproject, PID: 23526
02-28 10:54:34.821 23526 23579 E AndroidRuntime: java.lang.UnsatisfiedLinkError: couldn't find DSO to load: libhermes.so
02-28 10:54:34.821 23526 23579 E AndroidRuntime: 	SoSource 0: com.facebook.soloader.ApkSoSource[root = /data/user/0/com.myproject/lib-main flags = 1]
02-28 10:54:34.821 23526 23579 E AndroidRuntime: 	SoSource 1: com.facebook.soloader.DirectorySoSource[root = /data/app/~~sGE8nCPkS2zitanFiDVx_Q==/com.myproject-dagz_j5G2xB2oqDyeD4nzQ==/lib/arm64 flags = 0]
02-28 10:54:34.821 23526 23579 E AndroidRuntime: 	SoSource 2: com.facebook.soloader.DirectorySoSource[root = /vendor/lib64 flags = 2]
02-28 10:54:34.821 23526 23579 E AndroidRuntime: 	SoSource 3: com.facebook.soloader.DirectorySoSource[root = /system/lib64 flags = 2]
02-28 10:54:34.821 23526 23579 E AndroidRuntime: 	Native lib dir: /data/app/~~sGE8nCPkS2zitanFiDVx_Q==/com.myproject-dagz_j5G2xB2oqDyeD4nzQ==/lib/arm64
02-28 10:54:34.821 23526 23579 E AndroidRuntime:  result: 0
02-28 10:54:34.821 23526 23579 E AndroidRuntime: 	at com.facebook.soloader.SoLoader.doLoadLibraryBySoName(SoLoader.java:896)
02-28 10:54:34.821 23526 23579 E AndroidRuntime: 	at com.facebook.soloader.SoLoader.loadLibraryBySoNameImpl(SoLoader.java:725)
02-28 10:54:34.821 23526 23579 E AndroidRuntime: 	at com.facebook.soloader.SoLoader.loadLibraryBySoName(SoLoader.java:649)
02-28 10:54:34.821 23526 23579 E AndroidRuntime: 	at com.facebook.soloader.SoLoader.loadLibrary(SoLoader.java:629)
02-28 10:54:34.821 23526 23579 E AndroidRuntime: 	at com.facebook.soloader.SoLoader.loadLibrary(SoLoader.java:577)
02-28 10:54:34.821 23526 23579 E AndroidRuntime: 	at com.facebook.hermes.reactexecutor.HermesExecutor.<clinit>(HermesExecutor.java:20)
02-28 10:54:34.821 23526 23579 E AndroidRuntime: 	at com.facebook.hermes.reactexecutor.HermesExecutorFactory.create(HermesExecutorFactory.java:29)
02-28 10:54:34.821 23526 23579 E AndroidRuntime: 	at com.facebook.react.ReactInstanceManager$5.run(ReactInstanceManager.java:1017)
02-28 10:54:34.821 23526 23579 E AndroidRuntime: 	at java.lang.Thread.run(Thread.java:923)
02-28 10:54:34.855 23526 23574 E libc    : Access denied finding property "vendor.gralloc.disable_ahardware_buffer"
02-28 10:54:34.885   708   708 E Layer   : [Surface(name=Task=1)/@0x5746128 - animation-leash#0] No local sync point found
02-28 10:54:34.885   708   708 E Layer   : [Surface(name=Task=33779)/@0x1d72036 - animation-leash#0] No local sync point found
02-28 10:54:34.992  1577 11277 E libc    : Access denied finding property "vendor.debug.egl.changepixelformat"
02-28 10:54:35.004  1577 11277 E libc    : Access denied finding property "vendor.debug.egl.swapinterval"
02-28 10:54:35.019  1577 11277 E libc    : Access denied finding property "vendor.debug.egl.changepixelformat"
02-28 10:54:35.023  1577 11277 E libc    : Access denied finding property "vendor.debug.egl.swapinterval"

@rfestag
Copy link
Author

rfestag commented Feb 28, 2021

I was able to get around this by installing jsc-android directly into the example application. So, for anyone else that runs into this, you may need to manually install both @react-native-community/cli-platform-android and jsc-android

@tyanbiao
Copy link

I was able to get around this by installing jsc-android directly into the example application. So, for anyone else that runs into this, you may need to manually install both @react-native-community/cli-platform-android and jsc-android

Thank you, it works for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants