-
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] Error when starting the scan #724
Comments
Made it start, now i'm getting an "Android chroma siting range" error |
@ctaddei What did you do to make it start? I'm stuck with the error - If I update capacitor versions I get error - |
@ctaddei we are running into this same issue. Do you mind sharing how you fixed it? |
I'm getting the same error. Can you share how you fixed it? |
Same trouble |
also same issue |
I fixed it by removing @capacitor-community/firebase-analytics plugin. When I removed it, the barcode scanner is working. |
Well, i got same error and im not using firebase-analytics 🤔 Anyone solved it in different way? |
For everyone using capacitor and the barcode scanner plugin coming from google, this solved the issue for me: capawesome-team/capacitor-mlkit#53 (comment) The order of the plugins added to |
Anyone using biometric plugins? I am setting barcode scanning first and still encounter the problem. Removing capgo-capacitor-native-biometric resolves the issue.
|
same issue here capacitor.config.ts removing @capacitor-community/photoviewer will work, but i need both plugin |
Package.json
dependancies
It looks like we both did that and are still seeing the problem |
Was anyone able to solve this issue? I am having the same problem: Error: "Attempt to invoke virtual method 'void androidx.camera.view.PreviewView.setScaleType(androidx.camera.view.PreviewView$ScaleType)' on a null object reference" The problem I have is a conflict with the "@capacitor-community/photoviewer" plugin. If I remove that Plugin it works, but I need both. |
@jchri853 Thank you for your response, it helped me resolve my issue but i had to run "npx cap sync" and "ionic build". |
Why is this closed and how was it fixed?! I'm still having issues with the biometric plugin and this package. |
@TheCorbin Not sure this workaround would fix your problem, but it is worth to try: Add/Update your
|
Describe the bug
When calling startScan() in barcode-scanning-modal.component.ts i'm getting a "startScan failed", it opens the dialog with the interface, but its all black, camera is not starting.
ERROR:
s```
tartScan failed.
java.lang.NullPointerException: Attempt to invoke virtual method 'void androidx.camera.view.PreviewView.setScaleType(androidx.camera.view.PreviewView$ScaleType)' on a null object reference
at io.capawesome.capacitorjs.plugins.mlkit.barcodescanning.BarcodeScanner.lambda$startScan$0(BarcodeScanner.java:108)
at io.capawesome.capacitorjs.plugins.mlkit.barcodescanning.BarcodeScanner.$r8$lambda$XoJ4tltbmXkBZjUvzn_RkQLTSis(Unknown Source:0)
at io.capawesome.capacitorjs.plugins.mlkit.barcodescanning.BarcodeScanner$$ExternalSyntheticLambda3.run(Unknown Source:8)
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)
2023-08-30 11:20:50.876 27835-27835 Capacitor io.ionic.starter D Sending plugin error: {"save":false,"callbackId":"35338673","pluginId":"BarcodeScanner","methodName":"startScan","success":false,"error":{"message":"Attempt to invoke virtual method 'void androidx.camera.view.PreviewView.setScaleType(androidx.camera.view.PreviewView$ScaleType)' on a null object reference"}}
2023-08-30 11:20:50.883 27835-27835 Capacitor/Console io.ionic.starter E File: https://localhost/main.8d0c386ac6862cd3.js - Line 1 - Msg: ERROR Error: Uncaught (in promise): Error: Attempt to invoke virtual method 'void androidx.camera.view.PreviewView.setScaleType(androidx.camera.view.PreviewView$ScaleType)' on a null object reference
Error: Attempt to invoke virtual method 'void androidx.camera.view.PreviewView.setScaleType(androidx.camera.view.PreviewView$ScaleType)' on a null object reference
at returnResult (https://localhost/:768:32)
at win.androidBridge.onmessage (https://localhost/:743:21)
The text was updated successfully, but these errors were encountered: