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

Fix NPE when invoking `copyNecessaryFilesFromCurrentPackage()` method on Android

Open robxyy opened this issue 2 years ago • 1 comments

Fix #2087. It looks like NPE is caused by CodePushUpdateManager.java#L79. When invoking copyNecessaryFilesFromCurrentPackage() method, If currentPackageFolderPath is null, copying currentPackageFolderPath to newUpdateFolderPath will be discarded.

robxyy avatar Aug 17 '23 03:08 robxyy

Hi @robxyy , thank you for the contribution! Let me leave a couple of comments on your change.

DmitriyKirakosyan avatar Aug 17 '23 06:08 DmitriyKirakosyan

Hi @robxyy these changes were reverted from release 8.3.0 of rn-codepush and latest 8.3.1 hotfix doesn't include them. Reason behind this is that customers reported rollbacks of update and I traced it back to these changes. If you wish to keep these changes and resolve this issue take a look https://github.com/microsoft/react-native-code-push/issues/2725

DordeDimitrijev avatar Jul 29 '24 08:07 DordeDimitrijev

Hi @robxyy these changes were reverted from release 8.3.0 of rn-codepush and latest 8.3.1 hotfix doesn't include them. Reason behind this is that customers reported rollbacks of update and I traced it back to these changes. If you wish to keep these changes and resolve this issue take a look #2725

Sorry to hear that. I missed FileUtils.copyDirectoryContents(currentPackageFolderPath, newPackageFolderPath);, and I will push a PR later.

robxyy avatar Jul 29 '24 11:07 robxyy