[Android] Codepush crash on downloading update in Samsung devices
My app is crashing in samsung devices while downloading the update.
Devices crashing on : Galaxy S10+ Galaxy C9 Pro Galaxy J2 Pro Galaxy S9+ Galaxy S7 Galaxy A9 (2018) Galaxy A7 (2018)
Library versions : React Native : 0.62.2 react-native-code-push : 6.3.0
Crash Log : Caused by java.lang.IllegalStateException: closed at com.android.okhttp.okio.RealBufferedSink.emitCompleteSegments(RealBufferedSink.java:175) at com.android.okhttp.internal.http.HttpEngine$2.read(HttpEngine.java:1025) at com.android.okhttp.okio.RealBufferedSource$1.read(RealBufferedSource.java:397) at com.google.firebase.perf.network.InstrHttpInputStream.read(InstrHttpInputStream.java:121) at java.io.BufferedInputStream.read1(BufferedInputStream.java:286) at java.io.BufferedInputStream.read(BufferedInputStream.java:347) at com.microsoft.codepush.react.CodePushUpdateManager.downloadPackage(CodePushUpdateManager.java:181) at com.microsoft.codepush.react.CodePushNativeModule$3.doInBackground(CodePushNativeModule.java:290) at com.microsoft.codepush.react.CodePushNativeModule$3.doInBackground(CodePushNativeModule.java:284) at android.os.AsyncTask$3.call(AsyncTask.java:378) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) at java.lang.Thread.run(Thread.java:919)
Can anyone help me out in knowing what's leading to this crash?
Did you find a solution?
My cellphone is Samsumg S10 with Android 11
I had this problem on android I went to the lib and changed a line of code and stopped crashing
Class: CodePushNativeModule
This block is inside the method loadBundle Comment this line //instanceManager.recreateReactContextInBackground() And add this line -> resetReactRootViews(instanceManager)
This is a workaround, but it works
This issue has been automatically marked as stale because it has not had any activity for 60 days. It will be closed if no further activity occurs within 15 days of this comment.
This issue will now be closed because it hasn't had any activity for 15 days after stale. Please feel free to open a new issue if you still have a question/issue or suggestion.
Hi @neeshurajput did you find any solution for this crash?