-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
[Bug report] MLKit Subject Segmentation crashes intermittently after Google Play services storage data deletion #858
Comments
Hi, Why do you need to delete all Storage data for Google Play services? This is unusual operation and It may cause unforeseen errors as Google Play services might need some time to init everything as pre-setup. Sometimes it needs a reboot as well. |
@SilverDestiny |
From the error log:
It looks like Google Play services package is somehow not found, but this is hard to tell what was wrong. To ensure the module is available before running inference, I'd recommend using Google Play services module install API to check and verify: https://developers.google.com/android/guides/module-install-apis
|
@SilverDestiny moduleInstallClient
.installModules(moduleInstallRequest)
.addOnSuccessListener {
if (it.areModulesAlreadyInstalled()) {
// Modules are already installed when the request is sent.
}
}
.addOnFailureListener {
// Handle failure…
} Despite having this check in place, we're still encountering the issue where the Google Play services package appears to |
We submitted the fix for the Please try again later and thanks a lot for reporting the bug! |
@SilverDestiny Could you please let me know which version include this fix? |
The fix should be in version |
Describe the bug
MLKit Subject Segmentation crashes intermittently after Google Play services storage data is deleted.
The issue occurs during the processing of Subject Segmentation.
Our app already implements proactive checks for Google Play services API availability before using MLKit features.
GoogleApiAvailability.isGooglePlayServicesAvailable(context)
The crash is not consistently reproducible, suggesting a race condition for timing-related issue.
The following error log appears after deleting Google Play services storage data.
This error likely causes the crash, I guess.
Error log:
Failed to get service from broker. java.lang.SecurityException: Unknown calling package name 'com.google.android.gms'. at android.os.Parcel.createExceptionOrNull(Parcel.java:3183) at android.os.Parcel.createException(Parcel.java:3167) at android.os.Parcel.readException(Parcel.java:3150) at android.os.Parcel.readException(Parcel.java:3092) at m.gg.q(:com.google.android.gms.optional_mlkit_subject_segmentation@[email protected] (100400-0):198) at m.fe.run(:com.google.android.gms.optional_mlkit_subject_segmentation@[email protected] (100400-0):54) at android.os.Handler.handleCallback(Handler.java:959) at android.os.Handler.dispatchMessage(Handler.java:100) at android.os.Looper.loopOnce(Looper.java:232) at android.os.Looper.loop(Looper.java:317) at android.os.HandlerThread.run(HandlerThread.java:85)
To Reproduce
Example Steps to reproduce the behavior in sample app:
Expected behavior
The Subject Segmentation should process the image successfully or handle the error gracefully without crashing.
SDK Info:
com.google.android.gms:play-services-mlkit-subject-segmentation:16.0.0-beta1
Smartphone:
Development Environment:
(For Android issue feel free to skip this section)
This issue is unlikely in real-world usage as users rarely delete Google Play services data manually.
However, we would appreciate any insights or potential solutions to this issue; even a workaround is welcome.
Please let me know if you need any additional information or if there are any specific diagnostic steps we can take to assist in resolving this issue.
Thank you.
The text was updated successfully, but these errors were encountered: