Skip to content
This repository was archived by the owner on May 20, 2025. It is now read-only.
This repository was archived by the owner on May 20, 2025. It is now read-only.

Caused by java.lang.NullPointerException: java.io.File.<init> (File.java:262) #910

@andrepcg

Description

@andrepcg

Description

React native app on Android fails to restart after an update, crashing.

Reproduction

Running a release version of an app, issuing a code push update makes device crash when applying the update.

Exception java.lang.RuntimeException: An error occurred while executing doInBackground()
android.os.AsyncTask$3.done (AsyncTask.java:318)
java.util.concurrent.FutureTask.finishCompletion (FutureTask.java:354)
java.util.concurrent.FutureTask.setException (FutureTask.java:223)
java.util.concurrent.FutureTask.run (FutureTask.java:242)
java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1133)
java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:607)
java.lang.Thread.run (Thread.java:762)
arrow_drop_down
Caused by java.lang.NullPointerException:
java.io.File.<init> (File.java:262)
com.microsoft.codepush.react.FileUtils.copyDirectoryContents (FileUtils.java:19)
com.microsoft.codepush.react.CodePushUpdateUtils.copyNecessaryFilesFromCurrentPackage (CodePushUpdateUtils.java:71)
com.microsoft.codepush.react.CodePushUpdateManager.downloadPackage (CodePushUpdateManager.java:226)
com.microsoft.codepush.react.CodePushNativeModule$3.doInBackground (CodePushNativeModule.java:230)
com.microsoft.codepush.react.CodePushNativeModule$3.doInBackground (CodePushNativeModule.java:224)
android.os.AsyncTask$2.call (AsyncTask.java:304)
java.util.concurrent.FutureTask.run (FutureTask.java:237)
java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1133)
java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:607)
java.lang.Thread.run (Thread.java:762)

Additional Information

  • react-native-code-push version: 3.0.0-beta
  • react-native version: 0.45.1
  • iOS/Android/Windows version: Android 7.0
  • Does this reproduce on a debug build or release build? Release
  • Does this reproduce on a simulator, or only on a physical device? Physical

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions