Open redfast00 opened 2 years ago
I think MLKit has not (yet?) been implemented in microg.
Same here, for my (currently useless) banking app:
9 times the following:
E/AndroidRuntime(29268): FATAL EXCEPTION: pool-25-thread-1
E/AndroidRuntime(29268): Process: [my.bank'sapp], PID: 29268
E/AndroidRuntime(29268): java.lang.IllegalStateException: MlKitContext has not been initialized
E/AndroidRuntime(29268): at com.google.android.gms.common.internal.Preconditions.checkState(com.google.android.gms:play-services-basement@@18.0.0:2)
E/AndroidRuntime(29268): at com.google.mlkit.common.sdkinternal.MlKitContext.getInstance(com.google.mlkit:common@@18.1.0:1)
E/AndroidRuntime(29268): at com.google.android.gms.internal.mlkit_vision_common.zzkb.create(com.google.mlkit:vision-common@@17.1.0:3)
E/AndroidRuntime(29268): at com.google.mlkit.common.sdkinternal.LazyInstanceMap.get(com.google.mlkit:common@@18.1.0:3)
E/AndroidRuntime(29268): at com.google.android.gms.internal.mlkit_vision_common.zzkc.zza(com.google.mlkit:vision-common@@17.1.0:2)
E/AndroidRuntime(29268): at com.google.android.gms.internal.mlkit_vision_common.zzkc.zzb(com.google.mlkit:vision-common@@17.1.0:3)
E/AndroidRuntime(29268): at com.google.mlkit.vision.common.InputImage.zzb(com.google.mlkit:vision-common@@17.1.0:1)
E/AndroidRuntime(29268): at com.google.mlkit.vision.common.InputImage.zza(com.google.mlkit:vision-common@@17.1.0:19)
E/AndroidRuntime(29268): at com.google.mlkit.vision.common.InputImage.fromMediaImage(com.google.mlkit:vision-common@@17.1.0:1)
E/AndroidRuntime(29268): at yy.JXG.analyze(yy.JXG:21)
E/AndroidRuntime(29268): at yy.HXG.analyze(yy.HXG:203)
E/AndroidRuntime(29268): at yy.fEG.uG(yy.fEG:224)
E/AndroidRuntime(29268): at yy.fEG.xG(Unknown Source:0)
E/AndroidRuntime(29268): at yy.ZcG.analyze(Unknown Source:2)
E/AndroidRuntime(29268): at androidx.camera.core.ImageAnalysis.lambda$setAnalyzer$1$ImageAnalysis(ImageAnalysis.java:367)
E/AndroidRuntime(29268): at androidx.camera.core.ImageAnalysis$$ExternalSyntheticLambda0.analyze(Unknown Source:4)
E/AndroidRuntime(29268): at androidx.camera.core.ImageAnalysisAbstractAnalyzer.lambda$analyzeImage$0$ImageAnalysisAbstractAnalyzer(ImageAnalysisAbstractAnalyzer.java:121)
E/AndroidRuntime(29268): at androidx.camera.core.ImageAnalysisAbstractAnalyzer$$ExternalSyntheticLambda1.run(Unknown Source:8)
E/AndroidRuntime(29268): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
E/AndroidRuntime(29268): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
E/AndroidRuntime(29268): at java.lang.Thread.run(Thread.java:919)
(...)
I/RequestQueue(29268): Repeating capture request cancelled.
I/RequestQueue(29268): Repeating capture request set.
W/LegacyRequestMapper(29268): convertRequestMetadata - control.awbRegions setting is not supported, ignoring value
W/LegacyRequestMapper(29268): Only received metering rectangles with weight 0.
W/LegacyRequestMapper(29268): Only received metering rectangles with weight 0.
I think MLKit has not (yet?) been implemented in microg.
It seems that is supported old Mobile Vision API only (and only for barcode), also would be a good idea support tensorflow on microg, MLkit is strongly based on tensorflow and gms offer tensorflow API for app that need it. But honestly this is the game of the mouse and the cat, google deprecate API very fast and replace it in time seems VERY difficult for a FOSS project.
Affected app Name: Hydra Package id: be.ugent.zeus.hydra
Describe the bug
When tapping the barcode scan button, it shows a toast with 'Network failure' and the following logs show up in logcat:
To Reproduce Steps to reproduce the behavior:
com.google.mlkit.common.MlKitException: Code scanner module is not supported on current Google Play Services version, please upgrade.
in logcatExpected behavior
I expect a barcode reader window to show, letting me scan barcodes
System Android Version: 12 Custom ROM: LineageOS 19.1 MicroG
microG microG Core version: 0.2.24.214816 microG Self-Check results: All ticked
Additional context
The app is open-source, that might make testing easier. See https://github.com/ZeusWPI/hydra-android