Skip to content

Conversation

Saikedo
Copy link

@Saikedo Saikedo commented Nov 5, 2022

We observed that some Android phones were crashing when executing ReactNativeBlobUtil.MediaCollection.copyToMediaStore.

The crash log was showing

Attempt to invoke virtual method 'boolean java.lang.String.isEmpty()' on a null object reference.

Unfortunately, none of the devices I have were crashing in this manner, and trying to debug on the few phones that the crash was observed on was impossible for us.

In this push, I am just adding a null check in all the places that perform .isEmpty() check. I already tested the implementation and indeed, one of these .isEmpty() checks was responsible for the crash.

Just in case if this will be of any help, one of the phones that were crashing is a Samsung Galaxy S8 running Android 8.

@RonRadtke RonRadtke merged commit c39962b into RonRadtke:master Nov 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants