orhan / react-native-openpgp

OpenPGP.js adaptation for React-Native
http://openpgpjs.org
39 stars 13 forks source link

Crashes when connected to remote debugger #5

Open morelazers opened 7 years ago

morelazers commented 7 years ago

Stack trace from android monitor:

E/AndroidRuntime: FATAL EXCEPTION: OkHttp Dispatcher
 Process: com.tomnash.nlimited.debug, PID: 17698
 java.lang.IllegalStateException: Expected a name but was NUMBER
     at android.util.JsonReader.nextName(JsonReader.java:390)
     at com.facebook.react.devsupport.JSDebuggerWebSocketClient.onMessage(JSDebuggerWebSocketClient.java:196)
     at okhttp3.internal.ws.RealWebSocket$1.onMessage(RealWebSocket.java:62)
     at okhttp3.internal.ws.WebSocketReader.readMessageFrame(WebSocketReader.java:242)
     at okhttp3.internal.ws.WebSocketReader.processNextFrame(WebSocketReader.java:108)
     at okhttp3.internal.ws.RealWebSocket.readMessage(RealWebSocket.java:97)
     at okhttp3.ws.WebSocketCall.createWebSocket(WebSocketCall.java:152)
     at okhttp3.ws.WebSocketCall.access$000(WebSocketCall.java:41)
     at okhttp3.ws.WebSocketCall$1.onResponse(WebSocketCall.java:97)
     at okhttp3.RealCall$AsyncCall.execute(RealCall.java:126)
     at okhttp3.internal.NamedRunnable.run(NamedRunnable.java:32)
     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
     at java.lang.Thread.run(Thread.java:818)

I've linked and included the library, as well as react-native-randombytes, and I can't get it to work. Connecting to the remote debugger to try to find the problem causes an instant crash on app load.

Looking in the module's package.json, it's specifying the main file as src/openpgp.js. Is this correct? At a glance it appears as though the file it should be pointing to is src/index.js.

Thanks!

Edit: RN 0.40, Android

Matko95 commented 7 years ago

I'm having the same issue, has this been resolved in the meantime?

srinivasdamam commented 7 years ago

Even I'm having same issue, bumping react-native to 0.42 also didn't fix.