Skip to content
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

Storage Permission Error on Android 11 #74

Open
isabinimam opened this issue Nov 7, 2024 · 3 comments
Open

Storage Permission Error on Android 11 #74

isabinimam opened this issue Nov 7, 2024 · 3 comments
Labels
bug Something isn't working question Further information is requested

Comments

@isabinimam
Copy link

isabinimam commented Nov 7, 2024

when running this code on android 11, the app's only asking for camera permission. there's no asking storage permission. When i give storage permission manually the error still insist. "Error requesting permissions".

this is the run log:
Launching lib\main.dart on CPH1911 in debug mode...
Running Gradle task 'assembleDebug'...
√ Built build\app\outputs\flutter-apk\app-debug.apk
Installing build\app\outputs\flutter-apk\app-debug.apk...
Debug service listening on ws://127.0.0.1:55805/ICxcpbQrjqQ=/ws
Syncing files to device CPH1911...
I/cs_yolo_exampl( 8970): Compiler allocated 4649KB to compile void android.view.ViewRootImpl.performTraversals()
D/permissions_handler( 8970): No permissions found in manifest for: []9
D/permissions_handler( 8970): No permissions found in manifest for: []9
E/Parcel ( 8970): Reading a NULL string not supported here.
E/ion ( 8970): ioctl c0044901 failed with code -1: Invalid argument
D/ProfileInstaller( 8970): Installing profile for com.ultralytics.ultralytics_yolo_example
V/PhoneWindow( 8970): DecorView setVisiblity: visibility = 0, Parent = android.view.ViewRootImpl@3905c4e, this = DecorView@2eb416f[MainActivity]
I/GED ( 8970): ged_boost_gpu_freq, level 100, eOrigin 2, final_idx 15, oppidx_max 15, oppidx_min 0
I/GED ( 8970): ged_boost_gpu_freq, level 100, eOrigin 2, final_idx 15, oppidx_max 15, oppidx_min 0
V/PhoneWindow( 8970): DecorView setVisiblity: visibility = 4, Parent = android.view.ViewRootImpl@3905c4e, this = DecorView@2eb416f[MainActivity]

@UltralyticsAssistant UltralyticsAssistant added bug Something isn't working question Further information is requested labels Nov 7, 2024
@UltralyticsAssistant
Copy link
Member

👋 Hello @isabinimam, thank you for submitting a ultralytics/yolo-flutter-app 🚀 issue. This is an automated response to help streamline our issue resolution process. An Ultralytics engineer will also assist you soon.

To help us address your storage permission issue on Android 11 efficiently, please ensure you've provided the following information:

  1. For bug reports:
    • A clear and concise description of the bug you're facing
    • A minimum reproducible example (MRE) that demonstrates the issue—please refer to our MRE documentation for guidance
    • Your environment details, including OS, Flutter SDK version, and relevant package versions
    • Expected behavior vs. actual behavior you're experiencing
    • Specific error messages or logs related to the issue, like the ones you included. More logs are welcome if they reveal further insights.

Additionally, ensure that:

  • You've verified that the necessary permissions are correctly declared in your Android AndroidManifest.xml file.
  • The issue persists even after experimenting with different solutions or approaches.

Please check existing issues to avoid duplicates. If you have any more details or attachments to add, feel free to comment on this issue.

Thank you for your contribution to improving the yolo-flutter-app project! 🌟

@isabinimam
Copy link
Author

isabinimam commented Nov 7, 2024

when i running example code for object detection on android 11. yolo-flutter-app/example.
the app's only asking for camera permission. there's no asking storage permission. When i give storage permission manually the error still insist. "Error requesting permissions".
I've tried using storage permission command for android 11 only in AndroidManifest.xml, like:
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
but the problem still insist

Environtment:
OS: Android 11, OPPO ColorOS V11.1
Flutter Version : Flutter 3.24.3
path: ^1.9.0
path_provider: ^2.1.4
permission_handler: ^11.3.1

Behavior:
What expected: Ask permission for Camera and Storage
What actuak: Ask permission only for Camera and when i give storage permission manually the error still insist.

Run Log:
Launching lib\main.dart on CPH1911 in debug mode...
Running Gradle task 'assembleDebug'...
√ Built build\app\outputs\flutter-apk\app-debug.apk
Installing build\app\outputs\flutter-apk\app-debug.apk...
Debug service listening on ws://127.0.0.1:55805/ICxcpbQrjqQ=/ws
Syncing files to device CPH1911...
I/cs_yolo_exampl( 8970): Compiler allocated 4649KB to compile void android.view.ViewRootImpl.performTraversals()
D/permissions_handler( 8970): No permissions found in manifest for: []9
D/permissions_handler( 8970): No permissions found in manifest for: []9
E/Parcel ( 8970): Reading a NULL string not supported here.
E/ion ( 8970): ioctl c0044901 failed with code -1: Invalid argument
D/ProfileInstaller( 8970): Installing profile for com.ultralytics.ultralytics_yolo_example
V/PhoneWindow( 8970): DecorView setVisiblity: visibility = 0, Parent = android.view.ViewRootImpl@3905c4e, this = DecorView@2eb416f[MainActivity]
I/GED ( 8970): ged_boost_gpu_freq, level 100, eOrigin 2, final_idx 15, oppidx_max 15, oppidx_min 0
I/GED ( 8970): ged_boost_gpu_freq, level 100, eOrigin 2, final_idx 15, oppidx_max 15, oppidx_min 0
V/PhoneWindow( 8970): DecorView setVisiblity: visibility = 4, Parent = android.view.ViewRootImpl@3905c4e, this = DecorView@2eb416f[MainActivity]

@pderrenger
Copy link
Member

Please ensure you're using the latest version of the permission_handler package, as updates may resolve this issue. Additionally, verify that runtime permissions are requested programmatically in your code, as Android 11 requires explicit permission requests at runtime.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants