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

Fix NPE when invoking copyNecessaryFilesFromCurrentPackage() method on Android - #2566

Merged
Dmitriy Kirakosyan (DmitriyKirakosyan) merged 4 commits into
microsoft:masterfrom
robxyy:robx.20230817.npe
Jul 8, 2024
Merged

Fix NPE when invoking copyNecessaryFilesFromCurrentPackage() method on Android#2566
Dmitriy Kirakosyan (DmitriyKirakosyan) merged 4 commits into
microsoft:masterfrom
robxyy:robx.20230817.npe

Conversation

@robxyy

Copy link
Copy Markdown
Contributor

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
Rob X (robxyy) requested a review from a team as a code ownerAugust 17, 2023 03:33
@DmitriyKirakosyan

Copy link
Copy Markdown
Contributor

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

@DordeDimitrijev

Copy link
Copy Markdown
Contributor

Hi Rob X (@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

@robxyy

Copy link
Copy Markdown
ContributorAuthor

Hi Rob X (@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.

Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

6 participants

@robxyy@DmitriyKirakosyan@DordeDimitrijev@DergachevE@MikhailSuendukov@AnatolyPristensky