简体   繁体   中英

API call hangs on prod for React Native app on Android, works on debug mode, iOS, etc. - how to troubleshoot?

We're having a bug that's been difficult for us to troubleshoot with React Native and Android. Part of what makes it hard to troubleshoot is that it's only showing up on the production release.

It also just seems to be for now, just a specific user - maybe it's more but we can easily, consistently reproduce it with the single user across multiple devices.

What's happening is when do an API call to retrieve a list of user items on a list, the request hangs. The worst part of it is that the problem does not happen when we are on debug mode (on emulator, or on device).

How can we troubleshoot this?

We do have a stack trace on AppCenter which we use to manage releases, but the message is Java-related, not JavaScript.

React Native version 0.61.1

Stack traces

okio.RealBufferedSource.require RealBufferedSource.java:61
okio.RealBufferedSource.readByte RealBufferedSource.java:74
okhttp3.internal.ws.WebSocketReader.readHeader WebSocketReader.java:117
okhttp3.internal.ws.WebSocketReader.processNextFrame WebSocketReader.java:101
okhttp3.internal.ws.RealWebSocket.loopReader RealWebSocket.java:274
okhttp3.internal.ws.RealWebSocket$2.onResponse RealWebSocket.java:214
okhttp3.RealCall$AsyncCall.execute RealCall.java:206
okhttp3.internal.NamedRunnable.run NamedRunnable.java:32
java.util.concurrent.ThreadPoolExecutor.runWorker ThreadPoolExecutor.java:1167
java.util.concurrent.ThreadPoolExecutor$Worker.run ThreadPoolExecutor.java:641
java.lang.Thread.run Thread.java:764


com.facebook.react.devsupport.WebsocketJavaScriptExecutor.executeJSCall WebsocketJavaScriptExecutor.java:174
com.facebook.react.bridge.queue.NativeRunnable.run NativeRunnable.java
android.os.Handler.handleCallback Handler.java:873
android.os.Handler.dispatchMessage Handler.java:99
com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage MessageQueueThreadHandler.java:26
android.os.Looper.loop Looper.java:214
com.facebook.react.bridge.queue.MessageQueueThreadImpl$4.run MessageQueueThreadImpl.java:225
java.lang.Thread.run Thread.java:764

com.facebook.react.bridge.DefaultNativeModuleCallExceptionHandler.handleException DefaultNativeModuleCallExceptionHandler.java:19
com.facebook.react.devsupport.DevSupportManagerImpl.handleException DevSupportManagerImpl.java:261
com.facebook.react.bridge.CatalystInstanceImpl.onNativeException CatalystInstanceImpl.java:600
com.facebook.react.bridge.CatalystInstanceImpl.access$1000 CatalystInstanceImpl.java:45
com.facebook.react.bridge.CatalystInstanceImpl$NativeExceptionHandler.handleException CatalystInstanceImpl.java:618
com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage MessageQueueThreadHandler.java:28
android.os.Looper.loop Looper.java:214
com.facebook.react.bridge.queue.MessageQueueThreadImpl$4.run MessageQueueThreadImpl.java:225
java.lang.Thread.run Thread.java:764

Okay. Figured it out. We had a negative number that came back as a part of the list of user items that for some reason was causing the hang.

Thank you for looking!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM