Closed natioskar closed 4 months ago
We received the same error in Bugsnag, on a Samsung Galaxy A5(2017) (SM-A520F) on Android 8.0.0
java.lang.RuntimeException: An error occurred while executing doInBackground()
at android.os.AsyncTask$3.done(AsyncTask.java:353)
at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:383)
at java.util.concurrent.FutureTask.setException(FutureTask.java:252)
at java.util.concurrent.FutureTask.run(FutureTask.java:271)
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)
Caused by: java.lang.NullPointerException
at java.io.File.<init>(File.java:282)
at com.microsoft.codepush.react.FileUtils.copyDirectoryContents(FileUtils.java:19)
at com.microsoft.codepush.react.CodePushUpdateUtils.copyNecessaryFilesFromCurrentPackage(CodePushUpdateUtils.java:100)
at com.microsoft.codepush.react.CodePushUpdateManager.downloadPackage(CodePushUpdateManager.java:228)
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$2.call(AsyncTask.java:333)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
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)
Seems to be happening for me as well. 2 isolated events in devices from different manufacturers. Same stack trace as posted above.
We are receiving the same error in Crashlytics for different devices (Samsung, Motorola, Xiaomi, LGE) on Android 8, 9, 10 and 11.
Fatal Exception: java.lang.RuntimeException An error occurred while executing doInBackground() android.os.AsyncTask$4.done (AsyncTask.java:399) java.util.concurrent.FutureTask.finishCompletion (FutureTask.java:383) java.util.concurrent.FutureTask.setException (FutureTask.java:252) java.util.concurrent.FutureTask.run (FutureTask.java:271) java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1167) java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:641) java.lang.Thread.run (Thread.java:919)
Exception java.io.File.<init> (File.java:283) com.microsoft.codepush.react.FileUtils.copyDirectoryContents (FileUtils.java:19) com.microsoft.codepush.react.CodePushUpdateUtils.copyNecessaryFilesFromCurrentPackage (CodePushUpdateUtils.java:100) com.microsoft.codepush.react.CodePushUpdateManager.downloadPackage (CodePushUpdateManager.java:228) com.microsoft.codepush.react.CodePushNativeModule$3.doInBackground (CodePushNativeModule.java:217) com.microsoft.codepush.react.CodePushNativeModule$3.doInBackground (CodePushNativeModule.java:211)
I have the exact same error, for those devices at the moment
Update (12/6) Its been a month now, and the issue is not recreating for me (but still no answer from Microsoft guys).. can I assume is was it was a single case? is it still happening to you guys?
Same here, happened twice on the 10th of May and then never again...
Same here, the last time it happened was on 12th of May.
Just had this issue reported from Sentry, occurred Aug 7, 2021 1:22:58 AM UTC. Identical stack trace as previous comments, affected device was Samsung SM-T395, Android 9.
Same as original author, there would have been NO update available.
Getting this error as well..any updates on this?
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 is still happening for us, albeit very infrequently.
We mitigated the issue by patching FileUtils.java which is located in
node_modules/react-native-code-push/android/app/src/main/java/com/microsoft/codepush/react/FileUtils.java
@geof90 @LittleXianyu @andreidubov Please include the following code in the code base or figure out the root cause of the issue.
[Do this after npm ci or install]
try {
sourceDir = new File(sourceDirectoryPath);
destDir = new File(destinationDirectoryPath);
} catch (NullPointerException e) {
throw new CodePushUnknownException("Error creating directories", e);
}
java.lang.RuntimeException: An error occurred while executing doInBackground()
at android.os.AsyncTask$4.done(AsyncTask.java:415)
at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:383)
at java.util.concurrent.FutureTask.setException(FutureTask.java:252)
at java.util.concurrent.FutureTask.run(FutureTask.java:271)
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:920)
Caused by: java.lang.NullPointerException
at java.io.File.
"react-native": "0.66.4", "react-native-code-push": "^7.0.4",
Any update on this issue ? We are also facing the same. This happened once and not repeated for the users.
This issue popped up for the first time 2 days ago (our app is ~2 years old) after an OTA update.
A corrupted download of the zip file due to network issues on microsoft servers?
Facing the same issue, any fix?
Is anyone still facing this issue? If so, could you try the patch from this pull request and see if it helps?
Closing due to inactivity.
it's 2024 and the issue still happening on "react-native-code-push": "~8.3.1"
It's not a good reason to close an issue due to inactivity when there are questions left unanswered :(
Steps to Reproduce
I wasn't able to reproduce it myself due to lack of this kind of device, but according to the Crashlytics & Sentry stack trace its only happening on
Huawei P30 lite
right after the code push update check (with no new pending updates)Expected Behavior
Just normal update check and continue app loading, with the result of no new update
Actual Behavior
App crashed with the following -
Reproducible Demo
I don't have a reproducible Demo, but the way I use code push -
Environment
Sorry for the lack of reproducible demo and more specific steps, this only started when we rolled out to production