You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 10, 2024. It is now read-only.
ML KIT: NullPointerException in com.getcapacitor.community.barcodescanner.CapacitorCommunityBarcodeScanner.analyze(CapacitorCommunityBarcodeScanner.java:302)
#278
Open
lrrrrrrrr opened this issue
Aug 1, 2023
· 0 comments
When using the Capacitor Community Barcode Scanner plugin, a NullPointerException is being thrown at line 302 of the CapacitorCommunityBarcodeScanner.java file.
FATAL EXCEPTION: main
Process: com.example.test, PID: 30653
java.lang.NullPointerException: Attempt to invoke interface method 'com.google.android.gms.tasks.Task com.google.mlkit.vision.barcode.BarcodeScanner.process(com.google.mlkit.vision.common.InputImage)' on a null object reference
at com.getcapacitor.community.barcodescanner.CapacitorCommunityBarcodeScanner.analyze(CapacitorCommunityBarcodeScanner.java:302)
at androidx.camera.core.ImageAnalysis.lambda$setAnalyzer$2(ImageAnalysis.java:476)
at androidx.camera.core.ImageAnalysis$$ExternalSyntheticLambda2.analyze(Unknown Source:2)
at androidx.camera.core.ImageAnalysisAbstractAnalyzer.lambda$analyzeImage$0$androidx-camera-core-ImageAnalysisAbstractAnalyzer(ImageAnalysisAbstractAnalyzer.java:285)
at androidx.camera.core.ImageAnalysisAbstractAnalyzer$$ExternalSyntheticLambda1.run(Unknown Source:14)
at android.os.Handler.handleCallback(Handler.java:942)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loopOnce(Looper.java:226)
at android.os.Looper.loop(Looper.java:313)
at android.app.ActivityThread.main(ActivityThread.java:8757)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:571)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1067)
---------------------------- PROCESS ENDED (30653) for package com.example.test ----------------------------
lrrrrrrrr
changed the title
NullPointerException in com.getcapacitor.community.barcodescanner.CapacitorCommunityBarcodeScanner.analyze(CapacitorCommunityBarcodeScanner.java:302)
ML KIT: NullPointerException in com.getcapacitor.community.barcodescanner.CapacitorCommunityBarcodeScanner.analyze(CapacitorCommunityBarcodeScanner.java:302)
Aug 1, 2023
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
When using the Capacitor Community Barcode Scanner plugin, a NullPointerException is being thrown at line 302 of the CapacitorCommunityBarcodeScanner.java file.
Occurs after stop() method is called.
Fix:
`public void analyze(@nonnull ImageProxy image) {
@SuppressLint("UnsafeOptInUsageError")
Image mediaImage = image.getImage();
PR:
#279
The text was updated successfully, but these errors were encountered: