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
Bar scanner and rest of the sample apps where camera was requried was working as expected without any issues.
Note: I'm new to Flutter/Dart so code is most likely dummy. If you need more context, please let me know.
Physical phone specs:
Android 11
Phone Google Pixel 2 XL
Full Debug Console Log (1:1 log from my app and google_ml_kit example app)
Launching lib\main.dart on Pixel 2 XL in debug mode...
√ Built build\app\outputs\flutter-apk\app-debug.apk
Connecting to VM Service at ws://127.0.0.1:52075/Hu87wv4mJl0=/ws
Connected to the VM Service.
I/Gralloc4(24346): mapper 4.x is not supported
W/Gralloc3(24346): mapper 3.x is not supported
D/ProfileInstaller(24346): Installing profile for monofinance.app
D/TransportRuntime.JobInfoScheduler(24346): Scheduling upload for context TransportContext(cct, VERY_LOW, MSRodHRwczovL2ZpcmViYXNlbG9nZ2luZy5nb29nbGVhcGlzLmNvbS92MGNjL2xvZy9iYXRjaD9mb3JtYXQ9anNvbl9wcm90bzNc) with jobId=-1678826653 in 86400000ms(Backend next call timestamp 0). Attempt 1
I/TetheringManager(24346): registerTetheringEventCallback:monofinance.app
D/TransportRuntime.SQLiteEventStore(24346): Storing event with priority=VERY_LOW, name=FIREBASE_ML_SDK for destination cct
D/TransportRuntime.JobInfoScheduler(24346): Upload for context TransportContext(cct, VERY_LOW, MSRodHRwczovL2ZpcmViYXNlbG9nZ2luZy5nb29nbGVhcGlzLmNvbS92MGNjL2xvZy9iYXRjaD9mb3JtYXQ9anNvbl9wcm90bzNc) is already scheduled. Returning...
D/TransportRuntime.SQLiteEventStore(24346): Storing event with priority=VERY_LOW, name=FIREBASE_ML_SDK for destination cct
D/TransportRuntime.JobInfoScheduler(24346): Upload for context TransportContext(cct, VERY_LOW, MSRodHRwczovL2ZpcmViYXNlbG9nZ2luZy5nb29nbGVhcGlzLmNvbS92MGNjL2xvZy9iYXRjaD9mb3JtYXQ9anNvbl9wcm90bzNc) is already scheduled. Returning...
E/GmsDocScanDelAct(24346): Failed to handle scanning result
# LOGS BELOW AFTER I CLICKED "CANCEL"
E/GmsDocScanDelAct(24346): java.lang.IllegalStateException: Failed to handle result
E/GmsDocScanDelAct(24346): at com.google.mlkit.vision.documentscanner.internal.zzg.run(com.google.android.gms:play-services-mlkit-document-scanner@@16.0.0-beta1:12)
E/GmsDocScanDelAct(24346): at android.os.Handler.handleCallback(Handler.java:938)
E/GmsDocScanDelAct(24346): at android.os.Handler.dispatchMessage(Handler.java:99)
E/GmsDocScanDelAct(24346): at android.os.Looper.loop(Looper.java:223)
E/GmsDocScanDelAct(24346): at android.os.HandlerThread.run(HandlerThread.java:67)
D/TransportRuntime.SQLiteEventStore(24346): Storing event with priority=VERY_LOW, name=FIREBASE_ML_SDK for destination cct
D/TransportRuntime.JobInfoScheduler(24346): Upload for context TransportContext(cct, VERY_LOW, MSRodHRwczovL2ZpcmViYXNlbG9nZ2luZy5nb29nbGVhcGlzLmNvbS92MGNjL2xvZy9iYXRjaD9mb3JtYXQ9anNvbl9wcm90bzNc) is already scheduled. Returning...
I/flutter (24346): Error scanning document: PlatformException(DocumentScanner, Operation cancelled, null, null)
Application finished.
Exited (-1).
Error screen from Play Service I get whenever I try to process image via mlkit document scanner:
<manifestxmlns:android="http://schemas.android.com/apk/res/android">
<uses-permissionandroid:name="android.permission.CAMERA" />
<uses-featureandroid:name="android.hardware.camera" />
<uses-featureandroid:name="android.hardware.camera.autofocus" />
<uses-permissionandroid:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permissionandroid:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permissionandroid:name="android.permission.INTERNET"/>
<applicationandroid:label="monofinance.app"android:name="${applicationName}"android:icon="@mipmap/ic_launcher"android:largeHeap="true">
<activityandroid:name="monofinance.app.MainActivity"android:exported="true"android:launchMode="singleTop"android:taskAffinity=""android:theme="@style/LaunchTheme"android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"android:hardwareAccelerated="true"android:windowSoftInputMode="adjustResize">
<!-- Specifies an Android theme to apply to this Activity as soon as the Android process has started. This theme is visible to the user while the Flutter UI initializes. After that, this theme continues to determine the Window background behind the Flutter UI. -->
<meta-dataandroid:name="io.flutter.embedding.android.NormalTheme"android:resource="@style/NormalTheme"
/>
<intent-filter>
<actionandroid:name="android.intent.action.MAIN"/>
<categoryandroid:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
<!-- Don't delete the meta-data below. This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
<meta-dataandroid:name="flutterEmbedding"android:value="2" />
<meta-dataandroid:name="com.google.mlkit.vision.DEPENDENCIES"android:value="ica,ocr,face,subject_segment" />
</application>
<!-- Required to query activities that can process text, see: https://developer.android.com/training/package-visibility and https://developer.android.com/reference/android/content/Intent#ACTION_PROCESS_TEXT. In particular, this is used by the Flutter engine in io.flutter.plugin.text.ProcessTextPlugin. -->
<queries>
<intent>
<actionandroid:name="android.intent.action.PROCESS_TEXT"/>
<dataandroid:mimeType="text/plain"/>
</intent>
</queries>
</manifest>
Steps to reproduce.
Using Example App:
Open app.
Open document scanner.
Click Scan PDG/JPG.
What is the expected result?
Scanned image result/preview. Cropped, rotated, color adjusted, etc.
Did you try our example app?
Yes
Is it reproducible in the example app?
Yes
Reproducible in which OS?
Android
Flutter/Dart Version?
My goal is Android platform only, so Windows/Chrome errors are there.
[√] Flutter (Channel stable, 3.24.5, on Microsoft Windows [Version 10.0.19045.5247], locale en-US)
• Flutter version 3.24.5 on channel stable at C:\Workspace\flutter\flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision dec2ee5c1f (5 weeks ago), 2024-11-13 11:13:06 -0800
• Engine revision a18df97ca5
• Dart version 3.5.4
• DevTools version 2.37.3
[√] Windows Version (Installed version of Windows is version 10 or higher)
[√] Android toolchain - develop for Android devices (Android SDK version 35.0.0)
• Android SDK at C:\Users\Dmitriy\AppData\Local\Android\sdk
• Platform android-35, build-tools 35.0.0
• Java binary at: C:\Program Files\Java\jdk-19\bin\java
• Java version Java(TM) SE Runtime Environment (build 19.0.2+7-44)
• All Android licenses accepted.
[X] Chrome - develop for the web (Cannot find Chrome executable at .\Google\Chrome\Application\chrome.exe)
! Cannot find Chrome. Try setting CHROME_EXECUTABLE to a Chrome executable.
[X] Visual Studio - develop Windows apps
X Visual Studio not installed; this is necessary to develop Windows apps.
Download at https://visualstudio.microsoft.com/downloads/.
Please install the "Desktop development with C++" workload, including all of its default components
[√] Android Studio (version 2024.2)
• Android Studio at C:\Program Files\Android\Android Studio
• 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 21.0.3+-12282718-b509.11)
[√] VS Code (version 1.95.3)
• VS Code at C:\Users\Dmitriy\AppData\Local\Programs\Microsoft VS Code
• Flutter extension can be installed from:
https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter
[√] Connected device (3 available)
• Pixel 2 XL (mobile) • adb-712KPQJ1311388-n9MQAS._adb-tls-connect._tcp • android-arm64 • Android 11 (API 30)
• Windows (desktop) • windows • windows-x64 • Microsoft Windows [Version 10.0.19045.5247]
• Edge (web) • edge • web-javascript • Microsoft Edge 131.0.2903.99
[√] Network resources
• All expected network resources are available.
! Doctor found issues in 2 categories.
Plugin Version?
google_mlkit_document_scanner: ^0.3.0
The text was updated successfully, but these errors were encountered:
The main issue: document scanner can't get to process image. All of the test was done on a physical phone.
The same issue appears (image below) with:
google_ml_kit
example app.flutter_doc_scanner
package example. Most likely because it uses mlkit.Bar scanner and rest of the sample apps where camera was requried was working as expected without any issues.
Note: I'm new to Flutter/Dart so code is most likely dummy. If you need more context, please let me know.
Physical phone specs:
Full Debug Console Log (1:1 log from my app and google_ml_kit example app)
Error screen from Play Service I get whenever I try to process image via mlkit document scanner:
Code
document_scanner_service.dart
receipt_scanner_screen.dart
scan_result.dart
android/app/build.gradle
android/build.gradle
android/app/src/main/AndroidManifest.xml
Steps to reproduce.
Using Example App:
What is the expected result?
Scanned image result/preview. Cropped, rotated, color adjusted, etc.
Did you try our example app?
Yes
Is it reproducible in the example app?
Yes
Reproducible in which OS?
Android
Flutter/Dart Version?
My goal is Android platform only, so Windows/Chrome errors are there.
Plugin Version?
google_mlkit_document_scanner: ^0.3.0
The text was updated successfully, but these errors were encountered: