Out of memory issue with large response
Out of memory issue with large response
Can you provide a bit more details? How large is the response for example? Is it a response you are interested in? If not, you can add it to the blacklist to prevent it being stored on the client.
this is what i recorded in crash log and response size was around 100MB
com.icapps.niddler.util.Base64.encode Base64.java, line 158 java.lang.OutOfMemoryError: Failed to allocate a 131787080 byte allocation with 16777216 free bytes and 20MB until OOM
java.lang.StringFactory.newStringFromChars StringFactory.java:218 java.lang.StringFactory.newStringFromBytes StringFactory.java:203 java.lang.StringFactory.newStringFromBytes StringFactory.java:63 com.icapps.niddler.util.Base64.encode Base64.java:158 com.icapps.niddler.util.Base64.encodeUrl Base64.java:130 com.icapps.niddler.util.StringUtil.toString StringUtil.java:30 com.icapps.niddler.core.MessageBuilder.createBody MessageBuilder.java:194 com.icapps.niddler.core.MessageBuilder.initGeneric MessageBuilder.java:178 com.icapps.niddler.core.MessageBuilder.buildMessageJson MessageBuilder.java:85 com.icapps.niddler.core.MessageBuilder.buildMessage MessageBuilder.java:71 com.icapps.niddler.core.Niddler.logResponse Niddler.java:63 com.icapps.niddler.interceptor.okhttp.NiddlerOkHttpInterceptor.intercept NiddlerOkHttpInterceptor.java:209 okhttp3.internal.http.RealInterceptorChain.proceed RealInterceptorChain.kt:100 okhttp3.internal.connection.ConnectInterceptor.intercept ConnectInterceptor.kt:34 okhttp3.internal.http.RealInterceptorChain.proceed RealInterceptorChain.kt:100 okhttp3.internal.cache.CacheInterceptor.intercept CacheInterceptor.kt:82 okhttp3.internal.http.RealInterceptorChain.proceed RealInterceptorChain.kt:100 okhttp3.internal.http.BridgeInterceptor.intercept BridgeInterceptor.kt:83 okhttp3.internal.http.RealInterceptorChain.proceed RealInterceptorChain.kt:100 okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept RetryAndFollowUpInterceptor.kt:76 okhttp3.internal.http.RealInterceptorChain.proceed RealInterceptorChain.kt:100 okhttp3.internal.connection.RealCall.getResponseWithInterceptorChain$okhttp RealCall.kt:197 okhttp3.internal.connection.RealCall$AsyncCall.run RealCall.kt:502 java.util.concurrent.ThreadPoolExecutor.runWorker ThreadPoolExecutor.java:1133 java.util.concurrent.ThreadPoolExecutor$Worker.run ThreadPoolExecutor.java:607 java.lang.Thread.run Thread.java:761
Hmm yes, it is trying to serialize the body to a string form for storing/sending. In this case, you are dropping out because the string is at least 125MiB, which is excessive for storing things on mobile.
I will ponder updates to the client library to prevent responses from running out of memory by truncating/omitting bodies if they are too long. This will need changes in the plugin as well to handle these scenarios.
For now you should probably exclude the requests from being logged in niddler by adding the specific patterns/urls to the blacklist until I find a clean solution for this