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

app crashes as soon as compile #13058

Closed
cinder92 opened this issue Mar 21, 2017 · 4 comments
Closed

app crashes as soon as compile #13058

cinder92 opened this issue Mar 21, 2017 · 4 comments
Labels
Resolution: Locked This issue was locked by the bot.

Comments

@cinder92
Copy link

cinder92 commented Mar 21, 2017

Im receiving this issue

03-21 13:42:21.144 20977-21021/com.laRancherita2 E/AndroidRuntime: FATAL EXCEPTION: AsyncTask #2
                                                                   Process: com.laRancherita2, PID: 20977
                                                                   java.lang.RuntimeException: An error occured while executing doInBackground()
                                                                       at android.os.AsyncTask$3.done(AsyncTask.java:300)
                                                                       at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:355)
                                                                       at java.util.concurrent.FutureTask.setException(FutureTask.java:222)
                                                                       at java.util.concurrent.FutureTask.run(FutureTask.java:242)
                                                                       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
                                                                       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
                                                                       at java.lang.Thread.run(Thread.java:818)
                                                                    Caused by: java.lang.NoSuchMethodError: No virtual method setCallWebSocket(Lokhttp3/Call;)V in class Lokhttp3/internal/Internal; or its super classes (declaration of 'okhttp3.internal.Internal' appears in /data/data/com.laRancherita2/files/instant-run/dex/slice-okhttp-3.6.0_4fc54f61c851178d14681b3754ecb1a500425e9b-classes.dex)
                                                                       at okhttp3.ws.WebSocketCall.enqueue(WebSocketCall.java:108)
                                                                       at com.facebook.react.devsupport.InspectorPackagerConnection$Connection.connect(InspectorPackagerConnection.java:243)
                                                                       at com.facebook.react.devsupport.InspectorPackagerConnection.connect(InspectorPackagerConnection.java:44)
                                                                       at com.facebook.react.devsupport.DevServerHelper$3.doInBackground(DevServerHelper.java:159)
                                                                       at com.facebook.react.devsupport.DevServerHelper$3.doInBackground(DevServerHelper.java:155)
                                                                       at android.os.AsyncTask$2.call(AsyncTask.java:288)
                                                                       at java.util.concurrent.FutureTask.run(FutureTask.java:237)
                                                                       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112) 
                                                                       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587) 
                                                                       at java.lang.Thread.run(Thread.java:818) 
03-21 13:42:21.146 20977-21020/com.laRancherita2 I/Process: Sending signal. PID: 20977 SIG:9

i'm not using any native module from npm, here is my package json

{
  "name": "Rancherita",
  "version": "0.0.1",
  "private": true,
  "scripts": {
    "start": "node node_modules/react-native/local-cli/cli.js start"
  },
  "dependencies": {
    "is_js": "^0.9.0",
    "moment": "^2.14.1",
    "react": "^15.4.1",
    "react-native": "^0.39.0",
    "react-native-sortable-listview": "^0.1.1",
    "react-redux": "^4.4.5",
    "redux": "^3.5.2",
    "redux-logger": "^2.7.4",
    "redux-persist": "^3.5.0",
    "redux-thunk": "^2.1.0"
  }
}

when i run my app from terminal i saw this messages

Running dex in-process requires build tools 23.0.2.
For faster builds update this project to use the latest build tools.
Uncaught translation error: java.lang.IllegalArgumentException: already added: Lokhttp3/internal/ws/RealWebSocket$1;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Lokhttp3/internal/ws/RealWebSocket;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Lokhttp3/internal/ws/WebSocketProtocol;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Lokhttp3/internal/ws/WebSocketReader$FrameCallback;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Lokhttp3/internal/ws/WebSocketReader;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Lokhttp3/internal/ws/WebSocketWriter$FrameSink;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Lokhttp3/internal/ws/WebSocketWriter;
7 errors; aborting
:app:transformClassesWithDexForDebug FAILED

any advice?

thanks

@hramos
Copy link
Contributor

hramos commented Mar 21, 2017

Hey, thanks for reporting this issue!

It looks like your description is missing some necessary information. Can you please add all the details specified in the template? This is necessary for people to be able to understand and reproduce the issue being reported.

I am going to close this, but feel free to open a new issue with the additional information provided. Thanks!

@hramos hramos closed this as completed Mar 21, 2017
@cinder92
Copy link
Author

i saw another issue and i just add this line in my gradle

configurations.all {
        // OkHttp 3.5.0+ includes the websockets API, so we need this to prevent a conflict
        exclude module: 'okhttp-ws'
    }

but now, i'm receiving this issue

03-21 15:49:19.241 6130-6130/? I/art: Late-enabling -Xcheck:jni
03-21 15:49:20.089 6130-6130/com.laRancherita2 D/FirebaseApp: com.google.firebase.auth.FirebaseAuth is not linked. Skipping initialization.
03-21 15:49:20.125 6130-6130/com.laRancherita2 D/FirebaseApp: com.google.firebase.crash.FirebaseCrash is not linked. Skipping initialization.
03-21 15:49:20.221 6130-6130/com.laRancherita2 I/FA: App measurement is starting up, version: 10084
03-21 15:49:20.221 6130-6130/com.laRancherita2 I/FA: To enable debug logging run: adb shell setprop log.tag.FA VERBOSE
03-21 15:49:20.279 6130-6130/com.laRancherita2 I/FA: To enable faster debug mode event logging run:
                                                       adb shell setprop debug.firebase.analytics.app com.laRancherita2
03-21 15:49:20.377 6130-6130/com.laRancherita2 I/FirebaseInitProvider: FirebaseApp initialization successful
03-21 15:49:20.725 6130-6188/com.laRancherita2 D/libc-netbsd: [getaddrinfo]: hostname=xxxxx; servname=(null); cache_mode=(null), netid=0; mark=0
03-21 15:49:20.725 6130-6188/com.laRancherita2 D/libc-netbsd: [getaddrinfo]: ai_addrlen=0; ai_canonname=xxxxx; ai_flags=4; ai_family=0
03-21 15:49:20.736 6130-6188/com.laRancherita2 D/libc-netbsd: [getaddrinfo]: hostname=xxxxx; servname=(null); cache_mode=(null), netid=0; mark=0
03-21 15:49:20.736 6130-6188/com.laRancherita2 D/libc-netbsd: [getaddrinfo]: ai_addrlen=0; ai_canonname=xxxxx; ai_flags=4; ai_family=0
03-21 15:49:20.800 6130-6130/com.laRancherita2 D/ContextHelper: convertTheme. context->name=com.laRancherita2 themeResourceId=2131296430
03-21 15:49:20.861 6130-6130/com.laRancherita2 I/PhoneWindow: [generateLayout] setColorNavigationBar => color=0x ff000001
03-21 15:49:20.892 6130-6140/com.laRancherita2 W/art: Suspending all threads took: 17.085ms
03-21 15:49:20.917 6130-6130/com.laRancherita2 D/PhoneWindowEx: [PWEx][generateLayout] setNavigationBarColor2 : colors=0xfff5f5f5
03-21 15:49:20.917 6130-6130/com.laRancherita2 I/PhoneWindow: [setNavigationBarColor2] color=0x fff5f5f5
03-21 15:49:20.926 6130-6130/com.laRancherita2 I/Timeline: Timeline: Activity_launch_request id:com.laRancherita2 time:14496192
03-21 15:49:20.993 6130-6145/com.laRancherita2 W/art: Suspending all threads took: 16.457ms
03-21 15:49:21.005 6130-6130/com.laRancherita2 D/ContextHelper: convertTheme. context->name=com.laRancherita2 themeResourceId=2131296383
03-21 15:49:21.069 6130-6130/com.laRancherita2 V/fb-UnpackingSoSource: locked dso store /data/data/com.laRancherita2/lib-main
03-21 15:49:21.070 6130-6130/com.laRancherita2 I/fb-UnpackingSoSource: dso store is up-to-date: /data/data/com.laRancherita2/lib-main
03-21 15:49:21.070 6130-6130/com.laRancherita2 V/fb-UnpackingSoSource: releasing dso store lock for /data/data/com.laRancherita2/lib-main
03-21 15:49:21.090 6130-6130/com.laRancherita2 I/art: Rejecting re-init on previously-failed class java.lang.Class<com.facebook.react.devsupport.JSPackagerWebSocketClient>
03-21 15:49:21.091 6130-6130/com.laRancherita2 I/art: Rejecting re-init on previously-failed class java.lang.Class<com.facebook.react.devsupport.JSPackagerWebSocketClient>
03-21 15:49:21.091 6130-6130/com.laRancherita2 I/art: Rejecting re-init on previously-failed class java.lang.Class<com.facebook.react.devsupport.JSPackagerWebSocketClient>
03-21 15:49:21.092 6130-6130/com.laRancherita2 I/art: Rejecting re-init on previously-failed class java.lang.Class<com.facebook.react.devsupport.JSPackagerWebSocketClient>
03-21 15:49:21.092 6130-6130/com.laRancherita2 I/art: Rejecting re-init on previously-failed class java.lang.Class<com.facebook.react.devsupport.JSPackagerWebSocketClient>
03-21 15:49:21.092 6130-6130/com.laRancherita2 I/art: Rejecting re-init on previously-failed class java.lang.Class<com.facebook.react.devsupport.JSPackagerWebSocketClient>
03-21 15:49:21.092 6130-6130/com.laRancherita2 I/art: Rejecting re-init on previously-failed class java.lang.Class<com.facebook.react.devsupport.JSPackagerWebSocketClient>
03-21 15:49:21.096 6130-6130/com.laRancherita2 I/art: Rejecting re-init on previously-failed class java.lang.Class<com.facebook.react.devsupport.JSPackagerWebSocketClient>
03-21 15:49:21.097 6130-6130/com.laRancherita2 I/art: Rejecting re-init on previously-failed class java.lang.Class<com.facebook.react.devsupport.JSPackagerWebSocketClient>
03-21 15:49:21.102 6130-6130/com.laRancherita2 D/SensorManager: found sensor: ACCELEROMETER, handle=1
03-21 15:49:21.102 6130-6130/com.laRancherita2 D/SensorManager: found sensor: PROXIMITY, handle=8
03-21 15:49:21.102 6130-6130/com.laRancherita2 D/SensorManager: found sensor: LIGHT, handle=5
03-21 15:49:21.102 6130-6130/com.laRancherita2 D/SensorManager: found sensor: ORIENTATION, handle=3
03-21 15:49:21.102 6130-6130/com.laRancherita2 D/SensorManager: found sensor: MAGNETOMETER, handle=2
03-21 15:49:21.103 6130-6130/com.laRancherita2 I/SensorManager: registerListenerImpl() [Sensor: ACCELEROMETER, Rate: 66667, SensorEventListener: com.facebook.react.common.ShakeDetector@7b10481] by com.facebook.react.common.ShakeDetector.start():61
03-21 15:49:21.118 6130-6130/com.laRancherita2 I/art: Rejecting re-init on previously-failed class java.lang.Class<com.facebook.react.devsupport.JSPackagerWebSocketClient>
03-21 15:49:21.120 6130-6200/com.laRancherita2 I/art: Rejecting re-init on previously-failed class java.lang.Class<com.facebook.react.devsupport.JSPackagerWebSocketClient>
03-21 15:49:21.122 6130-6201/com.laRancherita2 I/art: Rejecting re-init on previously-failed class java.lang.Class<com.facebook.react.devsupport.InspectorPackagerConnection$Connection>
03-21 15:49:21.122 6130-6201/com.laRancherita2 I/art: Rejecting re-init on previously-failed class java.lang.Class<com.facebook.react.devsupport.InspectorPackagerConnection$Connection>
03-21 15:49:21.123 6130-6200/com.laRancherita2 E/AndroidRuntime: FATAL EXCEPTION: AsyncTask #1
                                                                 Process: com.laRancherita2, PID: 6130
                                                                 java.lang.RuntimeException: An error occured while executing doInBackground()
                                                                     at android.os.AsyncTask$3.done(AsyncTask.java:300)
                                                                     at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:355)
                                                                     at java.util.concurrent.FutureTask.setException(FutureTask.java:222)
                                                                     at java.util.concurrent.FutureTask.run(FutureTask.java:242)
                                                                     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
                                                                     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
                                                                     at java.lang.Thread.run(Thread.java:818)
                                                                  Caused by: java.lang.NoClassDefFoundError: com.facebook.react.devsupport.JSPackagerWebSocketClient
                                                                     at com.facebook.react.devsupport.DevServerHelper$1.doInBackground(DevServerHelper.java:122)
                                                                     at com.facebook.react.devsupport.DevServerHelper$1.doInBackground(DevServerHelper.java:119)
                                                                     at android.os.AsyncTask$2.call(AsyncTask.java:288)
                                                                     at java.util.concurrent.FutureTask.run(FutureTask.java:237)
                                                                     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112) 
                                                                     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587) 
                                                                     at java.lang.Thread.run(Thread.java:818) 
03-21 15:49:21.130 6130-6201/com.laRancherita2 I/art: Rejecting re-init on previously-failed class java.lang.Class<com.facebook.react.devsupport.InspectorPackagerConnection$Connection>
03-21 15:49:21.130 6130-6201/com.laRancherita2 I/art: Rejecting re-init on previously-failed class java.lang.Class<com.facebook.react.devsupport.InspectorPackagerConnection$Connection>
03-21 15:49:21.131 6130-6201/com.laRancherita2 I/art: Rejecting re-init on previously-failed class java.lang.Class<com.facebook.react.devsupport.InspectorPackagerConnection$Connection>
03-21 15:49:21.131 6130-6201/com.laRancherita2 I/art: Rejecting re-init on previously-failed class java.lang.Class<com.facebook.react.devsupport.InspectorPackagerConnection$Connection>
03-21 15:49:21.132 6130-6201/com.laRancherita2 I/art: Rejecting re-init on previously-failed class java.lang.Class<com.facebook.react.devsupport.InspectorPackagerConnection$Connection>
03-21 15:49:21.132 6130-6201/com.laRancherita2 I/art: Rejecting re-init on previously-failed class java.lang.Class<com.facebook.react.devsupport.InspectorPackagerConnection$Connection>
03-21 15:49:21.137 6130-6201/com.laRancherita2 W/unknown:React: You seem to be running on device. Run 'adb reverse tcp:8081 tcp:8081' to forward the debug server's port to the device.
03-21 15:49:21.137 6130-6130/com.laRancherita2 W/unknown:React: You seem to be running on device. Run 'adb reverse tcp:8081 tcp:8081' to forward the debug server's port to the device.
03-21 15:49:21.137 6130-6201/com.laRancherita2 I/art: Rejecting re-init on previously-failed class java.lang.Class<com.facebook.react.devsupport.InspectorPackagerConnection$Connection>
03-21 15:49:21.138 6130-6201/com.laRancherita2 I/Process: Sending signal. PID: 6130 SIG: 9

@cinder92
Copy link
Author

@hramos here is using guide lines

@JuanbingTeam
Copy link

@cinder92 same issue ~

any suggestion?

@facebook facebook locked as resolved and limited conversation to collaborators May 24, 2018
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Jul 18, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

4 participants