Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build not passing the "commonly found issues" check on Google Play Console #92

Closed
AdamGerthel opened this issue Dec 13, 2024 · 9 comments
Labels
P1 High priority issue. Ready Ready for release.

Comments

@AdamGerthel
Copy link

I just replaced react-native-fs with this package in order to get new arch support and I'm getting the following error mesage from Google Play:

Kotlin incompatibilities will cause crashes
Your app uses Kotlin's removeFirst() and removeLast() extension functions, which conflict with Java functions in Android 15. This will cause apps to crash on devices on Android 14 or earlier. Your app uses these functions in the following places:
com.drpogodin.reactnativefs.ReactNativeFsModule.copyFileAssets
To avoid crashes, we recommend replacing any Kotlin removeFirst() and removeLast() function calls with removeAt(0) and removeAt(list.lastIndex).

I couldn't find any issues about this. Any idea how to solve it?

@alessandro-bottamedi
Copy link

Same for me... for now you can continue and ignore the error...

@AdamGerthel
Copy link
Author

I did that because I'm only using this package for a very small and niche use-case, but I suspect that if/when that function is called, it will crash on some devices.

@birdofpreyru
Copy link
Owner

Hey @AdamGerthel, do you face it with the latest library version? The issue, indeed, used to be around for some time; however, I've noticed and fixed it back in v2.29.1. Related code now reads:

if (Build.VERSION.SDK_INT >= 35) queue.removeLast()
else queue.removeAt(queue.size - 1)

which is fine as per Android Studio: SDKs >= 35 are supposed to support .removeLast(), while for older SDKs it falls back for older alternative. I wonder, whether Google.Play's code analysis is subpar to the Android Studio, leading to a false positive, or am I missing something here?

@birdofpreyru birdofpreyru added the P4 Perhaps no action needed. label Dec 15, 2024
@AdamGerthel
Copy link
Author

Yes, I'm on 2.30.1. Have not used any older versions as this was the first time I used this fork.

@birdofpreyru
Copy link
Owner

Ok. I believe, it should work as is just fine on all Android versions, despite the warning. I'll keep the ticket open for sometime, just as a reminder to additionally have an eye on it.

@AdamGerthel
Copy link
Author

Ok, thanks. Good to know!

@cixio
Copy link

cixio commented Dec 15, 2024

same here, fixed by ignoring it

@birdofpreyru birdofpreyru added P3 Small issue. and removed P4 Perhaps no action needed. labels Dec 26, 2024
@birdofpreyru
Copy link
Owner

Update: After publishing an update of my Android app, for the first time since you reported this issue, and seeing how this Google.Play check annoyingly interrupts the publishing attempt until explicitly confirmed to proceed, I'll sure will remove the code line triggering that warning in the next library version.

@birdofpreyru birdofpreyru added P1 High priority issue. and removed P3 Small issue. labels Dec 26, 2024
@AdamGerthel
Copy link
Author

Update: After publishing an update of my Android app, for the first time since you reported this issue, and seeing how this Google.Play check annoyingly interrupts the publishing attempt until explicitly confirmed to proceed, I'll sure will remove the code line triggering that warning in the next library version.

Yeah, sometimes you need to wait up to 15 minutes before it finds the issue and aborts the submission 😖

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P1 High priority issue. Ready Ready for release.
Projects
None yet
Development

No branches or pull requests

4 participants