juliuscanute / qr_code_scanner

QR Code Scanner for Flutter
BSD 2-Clause "Simplified" License
1.01k stars 799 forks source link

App Force Close When Opening Camera (permission is set) #517

Open deyong84 opened 2 years ago

deyong84 commented 2 years ago

2022-03-30 09:56:10.543 4239-4239/com.xxxxxx.app E/AndroidRuntime: FATAL EXCEPTION: main Process: com.xxxxxx.app, PID: 4239 java.lang.RuntimeException: java.lang.NoSuchMethodException: I40.values [] at java.lang.Enum.enumValues(Enum.java:270) at java.lang.Enum.access$000(Enum.java:61) at java.lang.Enum$1.create(Enum.java:277) at java.lang.Enum$1.create(Enum.java:275) at libcore.util.BasicLruCache.get(BasicLruCache.java:63) at java.lang.Enum.getSharedConstants(Enum.java:289) at java.lang.Class.getEnumConstantsShared(Class.java:2428) at java.util.EnumMap.getKeyUniverse(EnumMap.java:755) at java.util.EnumMap.(EnumMap.java:138) at I70.a(:38) at com.journeyapps.barcodescanner.BarcodeView.P(:119) at com.journeyapps.barcodescanner.BarcodeView.V(:178) at com.journeyapps.barcodescanner.BarcodeView.E(:188) at C70.K(:787) at C70.L(:530) at C70.D(:474) at C70.d(:60) at C70$c.handleMessage(:202) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:236) at android.app.ActivityThread.main(ActivityThread.java:7876) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:656) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:967) Caused by: java.lang.NoSuchMethodException: I40.values [] at java.lang.Class.getMethod(Class.java:2072) at java.lang.Class.getDeclaredMethod(Class.java:2050) at java.lang.Enum.enumValues(Enum.java:267) at java.lang.Enum.access$000(Enum.java:61)  at java.lang.Enum$1.create(Enum.java:277)  at java.lang.Enum$1.create(Enum.java:275)  at libcore.util.BasicLruCache.get(BasicLruCache.java:63)  at java.lang.Enum.getSharedConstants(Enum.java:289)  at java.lang.Class.getEnumConstantsShared(Class.java:2428)  at java.util.EnumMap.getKeyUniverse(EnumMap.java:755)  at java.util.EnumMap.(EnumMap.java:138)  at I70.a(:38)  at com.journeyapps.barcodescanner.BarcodeView.P(:119)  at com.journeyapps.barcodescanner.BarcodeView.V(:178)  at com.journeyapps.barcodescanner.BarcodeView.E(:188)  at C70.K(:787)  at C70.L(:530)  at C70.D(:474)  at C70.d(:60)  at C70$c.handleMessage(:202)  at android.os.Handler.dispatchMessage(Handler.java:102)  at android.os.Looper.loop(Looper.java:236)  at android.app.ActivityThread.main(ActivityThread.java:7876)  at java.lang.reflect.Method.invoke(Native Method)  at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:656)  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:967)  2022-03-30 09:56:10.544 4239-5054/com.daksa.dooeet.devel D/W70: Starting preview 2022-03-30 09:56:10.737 4239-5054/com.daksa.dooeet.devel I/V70: Current focus mode 'auto'; use auto focus? true

[✓] Flutter (Channel stable, 1.22.6, on macOS 12.3 21E230 darwin-x64, locale en-ID) • Flutter version 1.22.6 at /Users/iwansupratman/fvm/versions/1.22.6 • Framework revision 9b2d32b605 (1 year, 2 months ago), 2021-01-22 14:36:39 -0800 • Engine revision 2f0af37152 • Dart version 2.10.5

[✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0) • Android SDK at /Users/iwansupratman/Library/Android/sdk • Platform android-31, build-tools 31.0.0 • ANDROID_HOME = /Users/iwansupratman/Library/Android/sdk • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java • Java version OpenJDK Runtime Environment (build 11.0.8+10-b944.6916264) • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 13.3) • Xcode at /Applications/Xcode.app/Contents/Developer • Xcode 13.3, Build version 13E113 • CocoaPods version 1.10.0

[!] Android Studio (version 4.2) • Android Studio at /Applications/Android Studio.app/Contents ✗ Flutter plugin not installed; this adds Flutter specific functionality. ✗ Dart plugin not installed; this adds Dart specific functionality. • Java version OpenJDK Runtime Environment (build 11.0.8+10-b944.6916264)

[✓] VS Code (version 1.65.2) • VS Code at /Applications/Visual Studio Code.app/Contents • Flutter extension version 3.36.0

[✓] Connected device (1 available) • Mi 10 (mobile) • c973d559 • android-arm64 • Android 11 (API 30) ! Error: iPhone 6 is not connected. Xcode will continue when iPhone 6 is connected. (code -13)

Force close on Android device Mi10

Please Help.

allanwolski-openco commented 2 years ago

Same problem here.

vietlinhtspt commented 2 years ago

Same problem

vietlinhtspt commented 2 years ago

I have found that qr_code_scanner conflic with one of that libraries ONLY in release app flutter_downloader: ^1.7.3 path_provider: ^2.0.9 permission_handler: ^9.2.0 device_info_plus: ^3.2.2 android_path_provider: ^0.3.0

wahyu-handayani commented 2 years ago

I have found that qr_code_scanner conflic with one of that libraries ONLY in release app flutter_downloader: ^1.7.3 path_provider: ^2.0.9 permission_handler: ^9.2.0 device_info_plus: ^3.2.2 android_path_provider: ^0.3.0

Hi @vietlinhtspt I am reading your comment and currently using device_info_plus: ^3.2.2 , path_provider: ^2.0.9 , and qr_code_scanner: ^0.7.0 in my project apps and right now I get an report that apps force close. That thing only happens in one user's phone and I didin't able to trace it for now because I think I need to borrow that phone to debug the apps directly. So, I would like to ask.. did you find any solution after deleting packages that you said earlier on your comment ?

nashihu commented 2 years ago

same here, i'm using

qr_code_scanner: ^1.0.0 flutter_downloader: ^1.8.1 path_provider: ^2.0.9 permission_handler: ^10.0.0 device_info_plus: ^3.2.4 android_path_provider: ^0.3.0

it makes the app force closed in release mode..

nashihu commented 2 years ago

the temporary solution for this issue is using this approach

AndriiChemer commented 1 year ago

Have same problem