facundomedica / fast_qr_reader_view

A Fast QR Reader widget for Flutter. For both Android and iOS
MIT License
295 stars 163 forks source link

it's reading nothing #84

Open mohamed3051215 opened 2 years ago

nicks258 commented 2 years ago

Not working. Using master branch.

facundomedica commented 2 years ago

Hello! @mohamed3051215 @nicks258 I'll need a bit more of info. What platform and a snippet on how you implemented it. Thank you!

divan commented 2 years ago

I have an app that's been using this plugin for reading QR codes. Recently I've bumped up versions of dependencies (flutter, deps, this plugin) and it stopped reading QR codes on Andriods (works fine with iOS). Seems like something related to MLKit, but I don't see any errors in the logs.

Investigating this now, but if someone is aware of possible reasons of why it might be broken on Android. (the only issue I found is when camera settings isn't set to 'high' MLKit doesn't read QR codes, but I do have 'high' set).

divan commented 2 years ago

So I tested an example/ app from the master branch and it doesn't read QR codes either. Attaching flutter doctor and console logs outputs:

flutter doctor -v
flutter doctor -v
[✓] Flutter (Channel stable, 2.5.3, on macOS 11.4 20F71 darwin-arm, locale en-GB)
    • Flutter version 2.5.3 at /Users/divan/flutter
    • Upstream repository git@github.com:flutter/flutter.git
    • Framework revision 18116933e7 (6 weeks ago), 2021-10-15 10:46:35 -0700
    • Engine revision d3ea636dc5
    • Dart version 2.14.4

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

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

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2020.3)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7249189)

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

[✓] Connected device (3 available)
    • moto g 7 play (mobile) • ZY326H86XN • android-arm    • Android 9 (API 28)
    • macOS (desktop)        • macos      • darwin-arm64   • macOS 11.4 20F71 darwin-arm
    • Chrome (web)           • chrome     • web-javascript • Google Chrome 96.0.4664.55

• No issues found!
console output
➜  example git:(master) flutter run -d ZY326H86XN
Running "flutter pub get" in example...                          1,859ms
Launching lib/main.dart on moto g 7 play in debug mode...
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Running Gradle task 'assembleDebug'...                             30.1s
✓  Built build/app/outputs/flutter-apk/app-debug.apk.
Installing build/app/outputs/flutter-apk/app.apk...                 6.6s
W/FlutterActivityAndFragmentDelegate(13953): A splash screen was provided to Flutter, but this is deprecated. See flutter.dev/go/android-splash-migration for migration steps.
I/flutter (13953): checkCameraPermission()
Syncing files to device moto g 7 play...                           670ms

Flutter run key commands.
r Hot reload. 🔥🔥🔥
R Hot restart.
h List all available interactive commands.
d Detach (terminate "flutter run" but leave application running).
c Clear the screen
q Quit (terminate the application on the device).

💪 Running with sound null safety 💪

An Observatory debugger and profiler on moto g 7 play is available at: http://127.0.0.1:59631/PHUxlAR-3GM=/
I/flutter (13953): Permission: denied
The Flutter DevTools debugger and profiler on moto g 7 play is available at: http://127.0.0.1:9100?uri=http://127.0.0.1:59631/PHUxlAR-3GM=/
I/DynamiteModule(13953): Considering local module com.google.mlkit.dynamite.barcode:10000 and remote module com.google.mlkit.dynamite.barcode:0
I/DynamiteModule(13953): Selected local version of com.google.mlkit.dynamite.barcode
V/MIDemoApp:CameraSource(13953): Camera preview size: 640x360
V/MIDemoApp:CameraSource(13953): Camera picture size: 4160x2340
D/MIDemoApp:CameraSource(13953): Display rotation is: 0
D/MIDemoApp:CameraSource(13953): Camera face is: 0
D/MIDemoApp:CameraSource(13953): Camera rotation is: 90
D/MIDemoApp:CameraSource(13953): RotationDegrees is: 90
D/TransportRuntime.SQLiteEventStore(13953): Storing event with priority=DEFAULT, name=FIREBASE_ML_SDK for destination cct
D/TransportRuntime.JobInfoScheduler(13953): Scheduling upload for context TransportContext(cct, DEFAULT, MSRodHRwczovL2ZpcmViYXNlbG9nZ2luZy5nb29nbGVhcGlzLmNvbS92MGNjL2xvZy9iYXRjaD9mb3JtYXQ9anNvbl9wcm90bzNc) with jobId=17836940 in 30000ms(Backend next call timestamp 0). Attempt 1
D/TransportRuntime.SQLiteEventStore(13953): Storing event with priority=VERY_LOW, name=FIREBASE_ML_SDK for destination cct
D/TransportRuntime.JobInfoScheduler(13953): Scheduling upload for context TransportContext(cct, VERY_LOW, MSRodHRwczovL2ZpcmViYXNlbG9nZ2luZy5nb29nbGVhcGlzLmNvbS92MGNjL2xvZy9iYXRjaD9mb3JtYXQ9anNvbl9wcm90bzNc) with jobId=22817677 in 86400000ms(Backend next call timestamp 0). Attempt 1
I/tflite  (13953): Initialized TensorFlow Lite runtime.
I/native  (13953): I1127 18:37:21.899100   14153 barcode_detector_client.cc:242] Not using NNAPI
E/libc    (13953): Access denied finding property "ro.hardware.chipname"
W/pool-5-thread-2(13953): type=1400 audit(0.0:336): avc: denied { read } for uid=10179 name="u:object_r:vendor_default_prop:s0" dev="tmpfs" ino=1629 scontext=u:r:untrusted_app:s0:c179,c256,c512,c768 tcontext=u:object_r:vendor_default_prop:s0 tclass=file permissive=0
D/TransportRuntime.SQLiteEventStore(13953): Storing event with priority=VERY_LOW, name=FIREBASE_ML_SDK for destination cct
D/TransportRuntime.JobInfoScheduler(13953): Upload for context TransportContext(cct, VERY_LOW, MSRodHRwczovL2ZpcmViYXNlbG9nZ2luZy5nb29nbGVhcGlzLmNvbS92MGNjL2xvZy9iYXRjaD9mb3JtYXQ9anNvbl9wcm90bzNc) is already scheduled. Returning...
D/TransportRuntime.SQLiteEventStore(13953): Storing event with priority=VERY_LOW, name=FIREBASE_ML_SDK for destination cct
D/TransportRuntime.JobInfoScheduler(13953): Upload for context TransportContext(cct, VERY_LOW, MSRodHRwczovL2ZpcmViYXNlbG9nZ2luZy5nb29nbGVhcGlzLmNvbS92MGNjL2xvZy9iYXRjaD9mb3JtYXQ9anNvbl9wcm90bzNc) is already scheduled. Returning...
D/TransportRuntime.SQLiteEventStore(13953): Storing event with priority=VERY_LOW, name=FIREBASE_ML_SDK for destination cct
D/TransportRuntime.JobInfoScheduler(13953): Upload for context TransportContext(cct, VERY_LOW, MSRodHRwczovL2ZpcmViYXNlbG9nZ2luZy5nb29nbGVhcGlzLmNvbS92MGNjL2xvZy9iYXRjaD9mb3JtYXQ9anNvbl9wcm90bzNc) is already scheduled. Returning...
D/TransportRuntime.CctTransportBackend(13953): Making request to: https://firebaselogging.googleapis.com/v0cc/log/batch?format=json_proto3
D/NetworkSecurityConfig(13953): No Network Security Config specified, using platform default
I/TransportRuntime.CctTransportBackend(13953): Status Code: 200
I/TransportRuntime.CctTransportBackend(13953): Content-Type: application/json; charset=UTF-8
I/TransportRuntime.CctTransportBackend(13953): Content-Encoding: gzip
babulpatel1309 commented 2 years ago

@divan @facundomedica any updates on this? I've just noticed that this thing stopped working.

divan commented 2 years ago

@babulpatel1309 I switched to another plugin (https://pub.dev/packages/qr_code_scanner), which worked out of the box.

hungggtm commented 2 years ago

Any updates on this yet? I got the same behaviour