react-native-code-push icon indicating copy to clipboard operation
react-native-code-push copied to clipboard

[Android] Codepush crash on downloading update in Samsung devices

Open neeshurajput opened this issue 5 years ago • 5 comments

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?

neeshurajput avatar Feb 05 '21 10:02 neeshurajput

Did you find a solution?

feiyingx avatar May 04 '21 00:05 feiyingx

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

charleston10 avatar May 10 '21 18:05 charleston10

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.

ghost avatar Dec 13 '21 13:12 ghost

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.

ghost avatar Dec 28 '21 18:12 ghost

Hi @neeshurajput did you find any solution for this crash?

rkaartikeyan avatar Mar 27 '25 10:03 rkaartikeyan