ReactNative app crashes FATAL EXCEPTION: OkHttp Dispatcher

Viewed 507

I am making a request to the api with axios and after getting the results, the app crashes. I mention that the request returns only json text.

The request finishes successfully, promise returns success, only thing is that the app crashes without debug logs, only the provided logcat log.

    Process: host.exp.exponent, PID: 23720
    java.lang.OutOfMemoryError: Failed to allocate a 25090000 byte allocation with 6291456 free bytes and 18MB until OOM, max allowed footprint 390069440, growth limit 402653184
        at java.lang.StringBuilder.toString(StringBuilder.java:410)
        at android.util.JsonReader.nextString(JsonReader.java:894)
        at android.util.JsonReader.nextValue(JsonReader.java:708)
        at android.util.JsonReader.objectValue(JsonReader.java:691)
        at android.util.JsonReader.peek(JsonReader.java:347)
        at abi31_0_0.com.facebook.react.devsupport.JSDebuggerWebSocketClient.onMessage(JSDebuggerWebSocketClient.java:187)
        at expolib_v1.a.a.i.a.b(RealWebSocket.java:307)
        at expolib_v1.a.a.i.c.e(WebSocketReader.java:222)
        at expolib_v1.a.a.i.c.a(WebSocketReader.java:101)
        at expolib_v1.a.a.i.a.b(RealWebSocket.java:262)
        at expolib_v1.a.a.i.a$2.onResponse(RealWebSocket.java:201)
        at expolib_v1.a.y$a.c(RealCall.java:135)
        at expolib_v1.a.a.b.run(NamedRunnable.java:32)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
        at java.lang.Thread.run(Thread.java:764)

I expected it to work... instead, I get this error message.

0 Answers
Related