I am trying to implement the Google Mobile Vision TextRecogniser API into my app, to read text off a given Image. When I try to use the feature, I get this error:
W/DynamiteModule: Local module descriptor class for com.google.android.gms.vision.dynamite not found.
I/DynamiteModule: Considering local module com.google.android.gms.vision.dynamite:0 and remote module com.google.android.gms.vision.dynamite:801
I/DynamiteModule: Selected remote version of com.google.android.gms.vision.dynamite, version >= 801
W/System: ClassLoader referenced unknown path: /data/user_de/0/com.google.android.gms/app_chimera/m/00000005/n/arm64-v8a
D/ApplicationLoaders: ignored Vulkan layer search path /data/app/com.google.android.gms-1/lib/arm64:/system/fake-libs64:/data/app/com.google.android.gms-1/base.apk!/lib/arm64-v8a for namespace 0x7a2e8c60f0
I/Vision: Loading libocr library
I/Vision: libocr load status: false
I/TextRecognizerCreatorImpl: Requesting download for native text recognizer
W/TextNativeHandle: Native handle not yet available. Reverting to no-op handle.
Meaning, I believe, that the library wasnt downloaded to the phone.
I have troubleshooted for common error sources, including missing internet connection, lack of memory, missing dependencies, rebooting the phone, updating Google play services, waiting a while etc. Google repository and Play services are also updated in Android studio.
Yet, I still get the same error, even when trying my App on different devices.
I believe that the download is performed by the Google Play Service App. The Libraries are downloaded as a zip file in the folder
/data/data/com.google.android.gms/cache/downloadservice
and are extracted to
/data/data/com.google.android.gms/files/com.google.android.gms.vision
and our app always check for the library in path
06-02 22:43:53.379 30258-30419/pzy64.searchbot I/Vision: Loading library libocr.so
which shows the error if the files are absent
06-02 22:43:53.475 30258-30419/pzy64.searchbot I/Vision: libocr.so library load status: false
otherwise
06-03 09:42:33.372 23451-24679/pzy64.searchbot I/Vision: libocr.so library load status: true
After download,
In my case (ARM) the folder size of
/data/data/com.google.android.gms/files/com.google.android.gms.vision
is around 5MB.(So the file downloaded is less than this size, The size may vary for different architecture .It took more time to download in my Asus Phone (x86)).
See my Logcat - (filter using 'Vision').
06-02 22:45:45.489 14970-31705/? I/Vision: Registration status ocr_armeabi_v7a.zip: The download is in progress.
06-02 22:45:45.542 14970-31705/? I/Vision: Download status ocr_armeabi_v7a.zip: The download is in progress.
06-02 22:43:53.379 30258-30419/pzy64.searchbot I/Vision: Loading library libocr.so
06-02 22:43:53.387 30258-30419/pzy64.searchbot I/Vision: libocr.so library load status: false
06-02 22:43:53.410 30258-30419/pzy64.searchbot I/Vision: Loading library libocr.so
06-02 22:43:53.411 30258-30419/pzy64.searchbot I/Vision: libocr.so library load status: false
06-02 22:43:53.475 30258-30419/pzy64.searchbot I/Vision: Loading library libocr.so
06-02 22:43:53.475 30258-30419/pzy64.searchbot I/Vision: libocr.so library load status: false
................... ..............
................... ..............
06-02 22:51:08.364 14970-3424/? I/Vision: Finished download ocr_armeabi_v7a.zip
06-02 22:51:08.421 14970-3424/? I/Vision: Unzipping /data/data/com.google.android.gms/cache/downloadservice/ocr_armeabi_v7a.zip to /data/data/com.google.android.gms/files/com.google.android.gms.vision/ocr
06-02 22:51:08.645 14970-3424/? I/Vision: Time to download ocr: 436558
06-02 22:51:09.142 3303-3489/pzy64.searchbot I/Vision: Loading library libocr.so
06-02 22:51:09.149 3303-3489/pzy64.searchbot I/Vision: libocr.so library load status: true
06-02 22:51:09.149 3303-3489/pzy64.searchbot I/Vision: Reading ocr models from /data/data/com.google.android.gms/files/com.google.android.gms.vision/ocr/data/models
The app i'm working on
I do "Clear Data" of the Google Play Service app and it works!
I think you missed out adding the "meta-data" tag in manifest file of your application. This meta-data tag tells your application to download and integrate the library to your application. Try adding a meta-data tag in your "application" tag above "activity" tag in the manifest file. See below:
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:supportsRtl="true"
android:theme="#style/AppTheme">
<meta-data android:name="com.google.android.gms.version" android:value="#integer/google_play_services_version"/>
<meta-data android:name="com.google.android.gms.vision.DEPENDENCIES" android:value="barcode"/>
<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
This might solve your issue.
I don't know if I am too late, but guys, after hours of challenges for me the problem was solved by Updating Google Play Services to version (12.6.85). I restarted the device and guess what? The app worked fine.
For updating this Google play service these instructions.
after some trials I figured out that in the gradle file you have to add these lines, too:
compile 'com.android.support:support-v4:24+'
compile 'com.android.support:design:24+'
So apart from this one
compile 'com.google.android.gms:play-services-vision:10.2.1'
the other two lines are important, too.
I had the exact same problem. As soon as I logged in to Google Play service then it downloaded and the barcode detector worked in the camera.
Related
When I fetch data from Firebase Firestore, data is not shown. And it gives me this problem. Is it related to Firebase or anything else?
W/DynamiteModule( 4887): Local module descriptor class for com.google.android.gms.providerinstaller.dynamite not found.
I/DynamiteModule( 4887): Considering local module com.google.android.gms.providerinstaller.dynamite:0 and remote module com.google.android.gms.providerinstaller.dynamite:0
W/ProviderInstaller( 4887): Failed to load providerinstaller module: No acceptable module com.google.android.gms.providerinstaller.dynamite found. Local version is 0 and remote version is 0.
W/ProviderInstaller( 4887): Failed to report request stats: com.google.android.gms.common.security.ProviderInstallerImpl.reportRequestStats [class android.content.Context, long, long]
There is no predefined solution to this issue which you are having. However, I suggest you try the following steps:
Most of the time, outdated Google Play services can cause these
warnings, so the recommendation is to update Google Play services.
Make sure that <uses-permissionandroid:name="android.permission.INTERNET"/> is defined in all the
three AndroidManifest.xml files that i.e debug/main/profile.
For some cases, having <usespermissionandroid:name="android.permission.ACCESS_NETWORK_STATE" />
in main
AndroidManifest file also helps.
If you are running your app on an older device make sure that
multi-dex is enabled.
It may also happen due to insufficient storage. Hence, clear the app
data from settings.
Use the latest Firebase plugins.
You may also refer to the Github link.
I have the same problem and haven't found any solution. What I can tell you is that this bug only happens in debug mode.If you run the application with the command flutter run --release -v, this bug won't appear.
I have the same problem android emulator pixel 4 API 31 Flutter
I added this permission
<usespermissionandroid:name="android.permission.ACCESS_NETWORK_STATE" />
it worked the first time but in another build, it did not work.
Add Permission to android/app/src/main/AndroidManifest.xml and then try.
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
I faced the same problem and wasted a lot of time trying to solve it. It turned out the String of collectionPath in Flutter's code is not match the String of collection in Firestore :(
I am using Google Mobile Vision TextRecogniser API in my application to read text from a captured image. But I am getting below error every time.
I/Vision: Request download for engine ocr is a no-op because rate limiting
I/Vision: Loading library libocr.so
I/Vision: libocr.so library load status: false
I/Vision: Request download for engine ocr is a no-op because rate limiting
W/DynamiteModule: Local module descriptor class for com.google.android.gms.vision.dynamite.text not found.
I/DynamiteModule: Considering local module com.google.android.gms.vision.dynamite.text:0 and remote module com.google.android.gms.vision.dynamite.text:0
W/DynamiteModule: Local module descriptor class for com.google.android.gms.vision.dynamite not found.
I/DynamiteModule: Considering local module com.google.android.gms.vision.dynamite:0 and remote module com.google.android.gms.vision.dynamite:2702
I/DynamiteModule: Selected remote version of com.google.android.gms.vision.dynamite, version >= 2702
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```
This vision message is what causing the problem:
**E/Vision:Request download for engine ocr is a no-op because rate limiting**
Finally i was able to resolve this issue by factory resetting the device. I was using the knox profile so first i unassigned the existing knox profile and then factory reset the device and it was workign fine. Cheers!
I install latest arcore apk(1.9) and acore sample named hello_ar_c in pixel 2. When I run hello_ar_c, there are two process related. one is com.google.ar.core and the other is com.google.ar.core.examples.c.helloar. but I find that com.google.ar.core has zero cpu load. which means that com.google.ar.core does not run algorithm. To prove that. I check /pid/(hello_ar_c-pid)/maps. And I find hello_ar_c load .so from com.google.ar.core installation location. below is the maps:
/* maps arcore .so */
/data/app/com.google.ar.core-jMwMf9SbRqZtMRT5iapBZA==/lib/arm64/libarcore_c.so
/data/app/com.google.ar.core-jMwMf9SbRqZtMRT5iapBZA==/lib/arm64/libarcore_c.so
/data/app/com.google.ar.core-jMwMf9SbRqZtMRT5iapBZA==/lib/arm64/libarcore_c.so
...
/* build from hello_ar_c sample */
/data/app/com.google.ar.core.examples.c.helloar-E-pvo9ztHnNkxQ68ouzC7w==/lib/arm64/libhello_ar_native.so
/data/app/com.google.ar.core.examples.c.helloar-E-pvo9ztHnNkxQ68ouzC7w==/lib/arm64/libhello_ar_native.so
Why can arcore can do this. I think it has no permission to do it.
And I find some log
05-14 16:48:21.567 32692 32692 I third_party/arcore/ar/core/android/sdk/session_create.cc: Dynamite load ok.
05-14 16:48:21.567 32692 32692 I third_party/arcore/java/com/google/vr/dynamite/client/native/dynamite_client.cc: Attempting to load native library arcore_c from package com.google.ar.core
05-14 16:48:21.579 32692 32692 I third_party/arcore/java/com/google/vr/dynamite/client/native/dynamite_client.cc: Dynamite::LoadNativeRemoteLibrary handle=6591254520239908165
Dynamite::LoadNativeRemoteLibrary is used to load library from package com.google.ar.core.
I was testing my app and I saw it restart itself, was really weird. I looked and looked on the logs and I couldn't find anything odd except for this line ChimeraModuleLdr: Module config changed, forcing restart due to module. This is on a Pixel XL with Oreo.
Here are the last few lines of the log and the start up of the app after it was killed.
10-18 22:49:31.262 8379 8379 I ChimeraModuleLdr: Module config changed, forcing restart due to module
10-18 22:49:31.262 8379 8379 I Process : Sending signal. PID: 8379 SIG: 9
--------- beginning of main
10-18 22:49:31.641 13717 13717 I MultiDex: VM with version 2.1.0 has multidex support
10-18 22:49:31.641 13717 13717 I MultiDex: install
10-18 22:49:31.641 13717 13717 I MultiDex: VM has multidex support, MultiDex support library is disabled.
Any idea about what triggered this?
It seems that the ChimeraModule (or Dynamite) is the dynamic module loading system used by the Google Play Services (more details here).
I guess that, if your app is using a specific module from the Google Play Services, when that specific module is updated your app is restarted as well.
Adding to what #bonnyz already said, I fixed it by removing all references to the libraries updated by the module, in my case the android vision library.
Adding further,
In context of Xamarin Forms project, the error you describe was caused by the Xamarin.Forms.GoogleMaps V4 package. reverting to V3.x.x solved the problem for me.
I am trying to test the google mobile vision api, for face detection, so I started with the demos from GitHub mobile vision. I tried both apps, FaceTracker and photo-demo, and the same issue rises with downloading the native face detector library.
For Nexus 5x, Galaxy S6 Edge not working, Galaxy S4, Galaxy Alpha is working.
What I see in the logs, when not working is:
For the app:
05-19 17:52:07.301 14909-14909/com.google.android.gms.samples.vision.face.photo W/System: ClassLoader referenced unknown path: /data/app/com.google.android.gms.samples.vision.face.photo-1/lib/arm64
05-19 17:52:07.725 14909-14909/com.google.android.gms.samples.vision.face.photo W/System: ClassLoader referenced unknown path: /data/app/com.google.android.gms.samples.vision.face.photo-1/lib/arm64
05-19 17:52:08.043 14909-14909/com.google.android.gms.samples.vision.face.photo D/ChimeraCfgMgr: Reading stored module config
05-19 17:52:08.068 14909-14909/com.google.android.gms.samples.vision.face.photo W/System: ClassLoader referenced unknown path: /data/user/0/com.google.android.gms/app_chimera/m/00000001/n/arm64-v8a
05-19 17:52:08.077 14909-14909/com.google.android.gms.samples.vision.face.photo D/ChimeraFileApk: Primary ABI of requesting process is arm64-v8a
05-19 17:52:08.079 14909-14909/com.google.android.gms.samples.vision.face.photo D/ChimeraFileApk: Classloading successful. Optimized code found.
05-19 17:52:08.105 14909-14909/com.google.android.gms.samples.vision.face.photo I/FaceDetectorCreatorImpl: Requesting download for vision face detector
05-19 17:52:08.107 14909-14909/com.google.android.gms.samples.vision.face.photo W/FaceDetectorHandle: Native face detector not yet available. Reverting to no-op detection.
05-19 17:52:08.253 14909-14909/com.google.android.gms.samples.vision.face.photo W/PhotoViewerActivity: Face detector dependencies are not yet available.
05-19 17:52:08.263 14909-14941/com.google.android.gms.samples.vision.face.photo D/OpenGLRenderer: Use EGL_SWAP_BEHAVIOR_PRESERVED: true
05-19 17:52:08.312 14909-14941/com.google.android.gms.samples.vision.face.photo I/Adreno: QUALCOMM build : 63c06b2, I8366cd0437
Build Date : 12/06/15
OpenGL ES Shader Compiler Version: XE031.05.13.02
Local Branch : mybranch17112971
Remote Branch : quic/LA.BF64.1.2.9_v2
Remote Branch : NONE
Reconstruct Branch : NOTHING
05-19 17:52:08.317 14909-14941/com.google.android.gms.samples.vision.face.photo I/OpenGLRenderer: Initialized EGL, version 1.4
After doing some digging in the logs, by applying the vision filter for tags I see:
05-19 17:52:08.124 10421-10526/? I/Vision: Attempting to open download_details.json in com.google.android.gms.vision
05-19 17:52:08.125 10421-10526/? W/Vision: Failed to open download_details.json in com.google.android.gms.vision: android.content.pm.PackageManager$NameNotFoundException: com.google.android.gms.vision
05-19 17:52:08.126 10421-10526/? I/Vision: Attempting to open download_details.json in com.google.android.gms.policy_ccocr_vision
05-19 17:52:08.127 10421-10526/? W/Vision: Failed to open download_details.json in com.google.android.gms.policy_ccocr_vision: android.content.pm.PackageManager$NameNotFoundException: com.google.android.gms.policy_ccocr_vision
05-19 17:52:08.127 10421-10526/? W/Vision: Reading download details from hard-coded Java
05-19 17:52:08.443 10421-10526/? E/Vision: Download Failed: Status{statusCode=Download errored: The download was configured incorrectly., resolution=null}
Similar questions:
Google Vision barcode library not found
FaceDetectorHandle﹕ Native face detector not yet available. Reverting to no-op detection
Tried the solution with freeing up space, clearing cache, no result.
What can I do next ? Is it possible to manually download the libraries ? Does anyone have a clear indication why is the library not downloading ?
EDIT
So it looks like there is an issue with the Mobile Vision api https://github.com/googlesamples/android-vision/issues/98. Hope the developers come with a solution soon.
EDIT
The issue has been resolved by updating the play service library.
According to the release notes of Google Play Services v9.0 there was a bug in the service and it was disabled.
In release v9.2 it was enabled again. Check out the release notes:
https://developers.google.com/vision/release-notes#bug_fixes
My problem was with text (TextRecognizer) not face and the problem was storage, I had 300MB free but it needed 10% of my phone according to this link
When is the intent ACTION_DEVICE_STORAGE_LOW broadcasted?