The phone is not able to download the ML Kit Barcode module on some devices running Android 8.1 Go. It happens in some entry-level smartphones like Moto E5 Play, ASUS_X00RD, Vodafone N9 Lite, Samsung Galaxy J2 Core and Nexus One running Android 8.1 Go. Please see also https://github.com/firebase/quickstart-android/issues/805
Curiously, this issue is also present in the old Android Vision barcode reader: https://github.com/googlesamples/android-vision/issues/408
E/BarcodeNativeHandle: Error Loading module error.E/BarcodeNativeHandle: Error Loading module
com.google.android.gms.dynamite.DynamiteModule$LoadingException: No acceptable module found. Local version is 0 and remote version is 0.
at com.google.android.gms.dynamite.DynamiteModule.load(Unknown Source:8)
at com.google.android.gms.internal.vision.zzm.zzq(Unknown Source:28)
at com.google.android.gms.internal.vision.zzg.<init>(Unknown Source:3)
at com.google.android.gms.vision.barcode.BarcodeDetector$Builder.build(Unknown Source:7)
at com.google.android.gms.internal.firebase_ml.zzpk.zzlp(Unknown Source:12)
at com.google.android.gms.internal.firebase_ml.zznx.zzf(Unknown Source:56)
at com.google.android.gms.internal.firebase_ml.zznz.zzls(Unknown Source:7)
at com.google.android.gms.internal.firebase_ml.zznz.call(Unknown Source:24)
at com.google.android.gms.internal.firebase_ml.zznn.zza(Unknown Source:29)
at com.google.android.gms.internal.firebase_ml.zzno.run(Unknown Source:2)
at android.os.Handler.handleCallback(Handler.java:790)
at android.os.Handler.dispatchMessage(Handler.java:99)
at com.google.android.gms.internal.firebase_ml.zzi.dispatchMessage(Unknown Source:6)
at android.os.Looper.loop(Looper.java:164)
at android.os.HandlerThread.run(HandlerThread.java:65)
It may be an issue with Google Play Services?
I found a few problems with this issue:
Same issue as well on Nexus One (8.1.0 Go).
Having the same issue on:
Android device: XiaoMi Redmi Go
Android version: 8.1.0 Go
Google Play services version: 17.7.85 (110306-253824076)
Firebase version: firebase-ml-vision 22.0.0
GMS plugin version: google-services 4.3.0
Note that only the barcode scanner that doesn't work. The others work.
I have the same problem with RNCamera and Google Pixel (Android 8)
Same issue here on Samsung SM-T585 android 8.1.0
Using react-native-camera MLkit exemple. Works fine on ios.
Hello,
hitting the same issue here:
W/DynamiteModule: Local module descriptor class for com.google.android.gms.vision.dynamite.ocr not found.
I/DynamiteModule: Considering local module com.google.android.gms.vision.dynamite.ocr:0 and remote module com.google.android.gms.vision.dynamite.ocr:0
D/TextNativeHandle: Cannot load feature, fall back to load dynamite module.
W/DynamiteModule: Local module descriptor class for com.google.android.gms.vision.ocr not found.
I/DynamiteModule: Considering local module com.google.android.gms.vision.ocr:0 and remote module com.google.android.gms.vision.ocr:0
E/Vision: Error loading module com.google.android.gms.vision.ocr optional module true: com.google.android.gms.dynamite.DynamiteModule$LoadingException: No acceptable module found. Local version is 0 and remote version is 0.
My environment details:
com.google.firebase:firebase-ml-vision:24.0.3
com.google.firebase:firebase-ml-vision-barcode-model:20.0.1
com.google.firebase:firebase-ml-vision-face-model:16.1.1
What I've tried/verified so far:
I am still looking for alternatives to get this working.
Hello,
hitting the same issue here:W/DynamiteModule: Local module descriptor class for com.google.android.gms.vision.dynamite.ocr not found. I/DynamiteModule: Considering local module com.google.android.gms.vision.dynamite.ocr:0 and remote module com.google.android.gms.vision.dynamite.ocr:0 D/TextNativeHandle: Cannot load feature, fall back to load dynamite module. W/DynamiteModule: Local module descriptor class for com.google.android.gms.vision.ocr not found. I/DynamiteModule: Considering local module com.google.android.gms.vision.ocr:0 and remote module com.google.android.gms.vision.ocr:0 E/Vision: Error loading module com.google.android.gms.vision.ocr optional module true: com.google.android.gms.dynamite.DynamiteModule$LoadingException: No acceptable module found. Local version is 0 and remote version is 0.My environment details:
- Firebase Components:
com.google.firebase:firebase-ml-vision:24.0.3 com.google.firebase:firebase-ml-vision-barcode-model:20.0.1 com.google.firebase:firebase-ml-vision-face-model:16.1.1
- Google Play Services version: 19.8.31 (100400-284611645)
- Google Play Services plug-in: com.google.gms:google-services:4.3.3
- Google Play Store version: 15.0.13-all [0] [PR] 249138589
- Android device: Xiaomi
- Android device Model: Redmi Note 5
- Android OS version: 9 PKQ1.180904.001 (MIUI Global 11.0.3 | Stable | 11.0.3.0(PEIMIXM))
What I've tried/verified so far:
- Cleared and updated Google Play Services data as suggested in this SO
- As I am using RNCamera, tried with a non-RN app with the same versions: got the same results
I am still looking for alternatives to get this working.
Hi, from your stacktrace, it seems that you are using ocr(text recognition) instead of barcode in your code. For ocr, we don't have an option to bundle the model with you app. (For barcode, you can bundle it to the app by doing what you are doing here-declaring dependency on: com.google.firebase:firebase-ml-vision-barcode-model:20.0.1)
For ocr, the only option is to use optional module download from google play service. Since google play service gets updated automatically. The supported version of optional module download is a moving window. The current earliest version it supports is 20.04.12. After you have updated your google play service to a version >=20.04.12. Also, after you upgrade, if you are still in a version earlier than 20.12.14, you may need a reboot for the ocr model to be downloaded.
We have fixed many things in version 20.12.14. If you still encounter problems when using text recognition, please let us know!
Thanks!
Hello,
hitting the same issue here:W/DynamiteModule: Local module descriptor class for com.google.android.gms.vision.dynamite.ocr not found. I/DynamiteModule: Considering local module com.google.android.gms.vision.dynamite.ocr:0 and remote module com.google.android.gms.vision.dynamite.ocr:0 D/TextNativeHandle: Cannot load feature, fall back to load dynamite module. W/DynamiteModule: Local module descriptor class for com.google.android.gms.vision.ocr not found. I/DynamiteModule: Considering local module com.google.android.gms.vision.ocr:0 and remote module com.google.android.gms.vision.ocr:0 E/Vision: Error loading module com.google.android.gms.vision.ocr optional module true: com.google.android.gms.dynamite.DynamiteModule$LoadingException: No acceptable module found. Local version is 0 and remote version is 0.My environment details:
- Firebase Components:
com.google.firebase:firebase-ml-vision:24.0.3 com.google.firebase:firebase-ml-vision-barcode-model:20.0.1 com.google.firebase:firebase-ml-vision-face-model:16.1.1
- Google Play Services version: 19.8.31 (100400-284611645)
- Google Play Services plug-in: com.google.gms:google-services:4.3.3
- Google Play Store version: 15.0.13-all [0] [PR] 249138589
- Android device: Xiaomi
- Android device Model: Redmi Note 5
- Android OS version: 9 PKQ1.180904.001 (MIUI Global 11.0.3 | Stable | 11.0.3.0(PEIMIXM))
What I've tried/verified so far:
- Cleared and updated Google Play Services data as suggested in this SO
- As I am using RNCamera, tried with a non-RN app with the same versions: got the same results
I am still looking for alternatives to get this working.
Hi, from your stacktrace, it seems that you are using ocr(text recognition) instead of barcode in your code. For ocr, we don't have an option to bundle the model with you app. (For barcode, you can bundle it to the app by doing what you are doing here-declaring dependency on: com.google.firebase:firebase-ml-vision-barcode-model:20.0.1)
For ocr, the only option is to use optional module download from google play service. Since google play service gets updated automatically. The supported version of optional module download is a moving window. The current earliest version it supports is 20.04.12. After you have updated your google play service to a version >=20.04.12. Also, after you upgrade, if you are still in a version earlier than 20.12.14, you may need a reboot for the ocr model to be downloaded.
We have fixed many things in version 20.12.14. If you still encounter problems when using text recognition, please let us know!
Thanks!
Hey, thanks for your insight! I was able to solve my problem :)
I am using OCR, Face and barcode detection, and thus the dependencies you pointed out, but the only one that was giving me troubles was OCR. It turns out that, despite my Play Store wasn't showing an update for Google Play Services, like you said there were new versions for me to install, so I downloaded and installed manually version 20.18.17 and... voila! Problem solved.
Thanks again!
Hello,
hitting the same issue here:W/DynamiteModule: Local module descriptor class for com.google.android.gms.vision.dynamite.ocr not found. I/DynamiteModule: Considering local module com.google.android.gms.vision.dynamite.ocr:0 and remote module com.google.android.gms.vision.dynamite.ocr:0 D/TextNativeHandle: Cannot load feature, fall back to load dynamite module. W/DynamiteModule: Local module descriptor class for com.google.android.gms.vision.ocr not found. I/DynamiteModule: Considering local module com.google.android.gms.vision.ocr:0 and remote module com.google.android.gms.vision.ocr:0 E/Vision: Error loading module com.google.android.gms.vision.ocr optional module true: com.google.android.gms.dynamite.DynamiteModule$LoadingException: No acceptable module found. Local version is 0 and remote version is 0.My environment details:
- Firebase Components:
com.google.firebase:firebase-ml-vision:24.0.3 com.google.firebase:firebase-ml-vision-barcode-model:20.0.1 com.google.firebase:firebase-ml-vision-face-model:16.1.1
- Google Play Services version: 19.8.31 (100400-284611645)
- Google Play Services plug-in: com.google.gms:google-services:4.3.3
- Google Play Store version: 15.0.13-all [0] [PR] 249138589
- Android device: Xiaomi
- Android device Model: Redmi Note 5
- Android OS version: 9 PKQ1.180904.001 (MIUI Global 11.0.3 | Stable | 11.0.3.0(PEIMIXM))
What I've tried/verified so far:
- Cleared and updated Google Play Services data as suggested in this SO
- As I am using RNCamera, tried with a non-RN app with the same versions: got the same results
I am still looking for alternatives to get this working.
Hi, from your stacktrace, it seems that you are using ocr(text recognition) instead of barcode in your code. For ocr, we don't have an option to bundle the model with you app. (For barcode, you can bundle it to the app by doing what you are doing here-declaring dependency on: com.google.firebase:firebase-ml-vision-barcode-model:20.0.1)
For ocr, the only option is to use optional module download from google play service. Since google play service gets updated automatically. The supported version of optional module download is a moving window. The current earliest version it supports is 20.04.12. After you have updated your google play service to a version >=20.04.12. Also, after you upgrade, if you are still in a version earlier than 20.12.14, you may need a reboot for the ocr model to be downloaded.
We have fixed many things in version 20.12.14. If you still encounter problems when using text recognition, please let us know!
Thanks!Hey, thanks for your insight! I was able to solve my problem :)
I am using OCR, Face and barcode detection, and thus the dependencies you pointed out, but the only one that was giving me troubles was OCR. It turns out that, despite my Play Store wasn't showing an update for Google Play Services, like you said there were new versions for me to install, so I downloaded and installed manually version 20.18.17 and... voila! Problem solved.
Thanks again!
Awesome! Happy to help:)
For ocr, the only option is to use optional module download from google play service. Since google play service gets updated automatically. The supported version of optional module download is a moving window. The current earliest version it supports is 20.04.12. After you have updated your google play service to a version >=20.04.12. Also, after you upgrade, if you are still in a version earlier than 20.12.14, you may need a reboot for the ocr model to be downloaded.
Great!!! Thanks so much @cs-googler
I am using OCR, Face and barcode detection, and thus the dependencies you pointed out, but the only one that was giving me troubles was OCR. It turns out that, despite my Play Store wasn't showing an update for Google Play Services, like you said there were new versions for me to install, so I downloaded and installed manually version 20.18.17 and... voila! Problem solved.
The only problem I see is our users will not figure out that they must update their google play services manually in order to be able to use our ml-kit based app. Maybe a workaround for this is checking if the installed google play services version is at least 20.12.14 after app launch, and suggest users to update their google play services manually on google play.
You can check if google play services min required version is installed this way:
private static final int PLAY_SERVICES_RESOLUTION_REQUEST = 9000;
// Check if Google Play Services is installed and its version is at least 20.12.14
// On Android 8.1 Go devices ML Kit requires at least version 20.12.14 to be able to download models properly without a reboot
int result = GoogleApiAvailability.getInstance().isGooglePlayServicesAvailable(this, 201214000);
if (result != ConnectionResult.SUCCESS) {
if (GoogleApiAvailability.getInstance().isUserResolvableError(result)) {
GoogleApiAvailability.getInstance().getErrorDialog(this, result, PLAY_SERVICES_RESOLUTION_REQUEST).show();
}
}
GoogleApiAvailability docs is available at https://developers.google.com/android/reference/com/google/android/gms/common/GoogleApiAvailability#isGooglePlayServicesAvailable(android.content.Context,%20int)