Open rachitgupta98 opened 4 years ago
Hi,
Did you get any errors through adb logcat
that could help?
Hey @jaimecbernardo Server is successfully started but when I used ngrok and send the url through rn_bridge , app crashes with the following error.
How to solve this ???
E/nodejs: events.js:287 throw er; // Unhandled 'error' event ^
Error: spawn ./ngrok EACCES
at Process.ChildProcess._handle.onexit (internal/child_process.js:267:19)
at onErrorNT (internal/child_process.js:469:16)
at processTicksAndRejections (internal/process/task_queues.js:84:21)
Emitted 'error' event on ChildProcess instance at:
at Process.ChildProcess._handle.onexit (internal/child_process.js:273:12)
at onErrorNT (internal/child_process.js:469:16)
at processTicksAndRejections (internal/process/task_queues.js:84:21) {
errno: 'EACCES',
code: 'EACCES',
syscall: 'spawn ./ngrok',
path: './ngrok',
spawnargs: [ 'start', '--none', '--log=stdout' ]
}
D/: HostConnection::get() New Host Connection established 0xd22aa5c0, tid 8764 E/NODEJS-MOBILE: terminating with uncaught exception of type std::ndk1::system_error: pthread_setspecific failed: Invalid argument 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::ndk1::system_error: pthread_setspecific failed: Invalid argument" failed A/libc: /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::__ndk1::system_error: pthread_setspecific failed: Invalid argument" failed A/libc: Fatal signal 6 (SIGABRT), code -6 in tid 8679 (FlipperEventBas), pid 8643 (com.rn_node) Process 8643 terminated.
Hi @rachitgupta98 ,
Looks like it's trying to spawn a new process, which is not supported. The error might be due to that or due to trying to access ./ngrok
and you might not have permissions to the current working directory, which is /
on most Android environments.
Hi @jaimecbernardo I added read write permission in manifest.xml file but still getting the same Can you suggest any solution?
Spawning processes is not supported, thought it might sort of work with with Android.
Try to start nrgok from the full path name instead of ./nrgok
.
Either way, this is not a supported scenario.
When i am trying to start the server by a button ,App crashes. Can anyone suggest the solution. @jaimecbernardo Here is my Main.js code
App.js code
<Button title="Server" onPress={() => nodejs.channel.send('server')} />