D/permissions_handler(18294): No permissions found in manifest for: []15
Please check the following before submitting a new issue.
- [X] I have searched the existing issues.
- [X] I have carefully read the documentation.
Please select for which platform(s) you need help
- [X] Android
- [ ] iOS
- [ ] Windows
Your question
My app keeps throwing this response in my logs D/permissions_handler(18294): No permissions found in manifest for: []15 and I have the folowing permissions in the app
<uses-permission android:name="android.permission.VIBRATE"/>
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.USE_FINGERPRINT"/>
my code void checkPermission( {GlobalKey? repaintKey, String? reference, BuildContext? context}) async {
final status = await Permission.storage.status;
if (status.isGranted || await Permission.storage.request().isGranted) {
takescrshot(
repaintKey: repaintKey!, reference: reference, context: context);
} else {
if (await Permission.storage.isDenied) {
if (await Permission.storage.request().isGranted) {
takescrshot(
repaintKey: repaintKey!, reference: reference, context: context);
}
} else if (await Permission.storage.isPermanentlyDenied) {
openAppSettings();
} else {
if (await Permission.storage.request().isGranted) {
takescrshot(
repaintKey: repaintKey!, reference: reference, context: context);
}
}
}
}
Version
11.0.0
I have a similar issue, also for Android 11 when accessing the Android photo gallery. Stack trace:
D/permissions_handler(23536): No permissions found in manifest for: []9
I/flutter (23536): PermissionStatus.denied
I/flutter (23536): PermissionStatus.denied
I/flutter (23536): PermissionStatus.denied
I/flutter (23536): PermissionStatus.denied
You need to add permission in android manifest file for accessing the photos. Here is an example:
<uses-permission android:name="android.permission.READ_MEDIA_IMAGES"/>
The example app of this library does not work as well, and the example app has all permissions possible in Manifest.
Adding the above permission worked for me. Sorry, if it didn't work for you. Hopefully, we will get a fix soon.
@Turskyi and @Gbarago,
Check if you request the proper permission for the corresponding Android version:
'''
/// Android:
/// - Devices running Android 12 (API level 32) or lower: use [Permissions.storage].
/// - Devices running Android 13 (API level 33) and above: Should use [Permissions.photos].
///
/// EXAMPLE: in Manifest:
/// <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" android:maxSdkVersion="32"/>
///
If not, please add the output of flutter doctor -v to your issue.
Hello @TimHoogstrate ,
Thank you for your response. I have followed your instructions and checked the condition if (androidInfo.version.sdkInt <= 32). As expected, I got into that block since I’m running the app on Android API 30 version 11, and Permission.storage.status is “granted”.
However, I’m still facing the issue. I need access to the device library, not the file manager. Could you please clarify how checking the storage permission would help in this case?
Also, I noticed that the example app from the library (https://github.com/Baseflow/flutter-permission-handler/tree/main/permission_handler/example) has the same issue.
Here is the output from flutter doctor -v:
% flutter doctor -v
[✓] Flutter (Channel stable, 3.16.6, on macOS 14.3 23D56 darwin-arm64, locale en-CA)
• Flutter version 3.16.6 on channel stable at /Users/dmytro/development/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 46787ee49c (3 weeks ago), 2024-01-09 14:36:07 -0800
• Engine revision 3f3e560236
• Dart version 3.2.3
• DevTools version 2.28.4
[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
• Android SDK at /Users/dmytro/Library/Android/sdk
• Platform android-34, build-tools 33.0.0
• Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 17.0.7+0-17.0.7b1000.6-10550314)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 15.2)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Build 15C500b
• CocoaPods version 1.11.3
[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Android Studio (version 2023.1)
• 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 17.0.7+0-17.0.7b1000.6-10550314)
[✓] VS Code (version 1.85.2)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.80.0
[✓] Connected device (6 available)
• sdk gphone arm64 (mobile) • emulator-5554 • android-arm64 • Android 11 (API 30) (emulator)
• iPhone SE (3rd generation) (mobile) • CB70D7A1-3C79-420D-90F4-5D394039BA25 • ios • com.apple.CoreSimulator.SimRuntime.iOS-17-2 (simulator)
• iPad Pro (12.9-inch) (6th generation) (mobile) • 7CFE6B5B-5600-4ACB-94B0-AC342E750E55 • ios • com.apple.CoreSimulator.SimRuntime.iOS-17-2 (simulator)
• macOS (desktop) • macos • darwin-arm64 • macOS 14.3 23D56 darwin-arm64
• Chrome (web) • chrome • web-javascript • Google Chrome 121.0.6167.139
[✓] Network resources
• All expected network resources are available.
• No issues found!
I appreciate your help and look forward to your response.
Hi @Turskyi,
Which plugin / code are you using to access the Android Photo Library? This will help us do better research on the permissions you actually require and provide you with a better answer.
Hello @mvanbeusekom,
Thank you for your prompt response. I appreciate your efforts in helping me resolve this issue.
Here is the full implementation of the method I use:
Future<bool> checkPermissionFor(PermissionName name) async {
if (name == PermissionName.camera) {
if (await Permission.camera.status.isDenied) {
await Permission.camera.request();
} else if (await Permission.camera.isPermanentlyDenied) {
if (UniversalPlatform.isIOS) {
await openAppSettings();
} else {
await Permission.camera.request();
}
}
return await Permission.camera.isGranted ||
await Permission.photos.status.isLimited;
} else if (name == PermissionName.deviceLibrary) {
if (await Permission.photos.status.isDenied) { // <<--- this returns "true"
try {
final PermissionStatus p = await Permission.photos.request();
debugPrint('permission denied afteerr:: ${p.name}'); // << -- PermissionStatus with `name` argument "denied".
} catch (e) {
debugPrint('errr :: $e');
}
} else if (UniversalPlatform.isIOS &&
await Permission.photos.isPermanentlyDenied) {
await openAppSettings();
} else if (await Permission.photos.isPermanentlyDenied) {
// The user opted to never again see the permission request dialog for
// this app. The only way to change the permission's status now is to let
// the user manually enables it in the system settings.
openAppSettings();
}
return await Permission.photos.status.isGranted ||
await Permission.photos.status.isLimited;
} else {
return false;
}
}
As you can see, accessing the Android photo library is not part of the implementation because we never use that part without permission to access it.
I also noticed that the example app from the library at https://github.com/Baseflow/flutter-permission-handler/tree/main/permission_handler/example seems to have the same issue. I was wondering if you could provide some insight into why this might be the case? If necessary, I can create another issue ticket specifically for this problem within the “example” app of the library.
Thank you again for your assistance. I look forward to your response.
Hi @Turskyi, @Gbarago,
There might be some confusion here. @Turskyi you mentioned that you are running on an Android 11 (API 32) device, requesting Permission.photos is only supported on Android 12 (API 33) and higher. When running on Android 11 and below you should request the Permission.storage permission instead. That is also why the example app is showing the same problem, the example app doesn't check which API is used it simply lists all permissions.
One way to tackle the issue would be using the device_info_plus plugin and do something like this:
PermissionStatus requestPhotoPermission() {
DeviceInfo deviceInfo = await DeviceInfoPlugin().androidInfo;
Permission permissionToRequest;
if (defaultTargetPlatform == TargetPlatform.android && deviceInfo.version.sdkInt <= 32) {
permissionToRequest = Permission.storage;
} else {
permissionToRequest = Permission.photos;
}
if (await permissionToRequest.status.isDenied) {
return await permissionToRequest.request();
}
}
And also make sure all permissions are declared in the android/app/src/main/AndroidManifest.xml file like so:
<!-- Permission to read files from external storage (outside application container).
As of Android 12 this permission no longer has any effect. Instead use the
READ_MEDIA_IMAGES, READ_MEDIA_VIDEO or READM_MEDIA_AUDIO permissions. -->
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" android:maxSdkVersion="32" />
<!-- Permissions to read media files. -->
<uses-permission android:name="android.permission.READ_MEDIA_IMAGES" />
More information can also be found in the Android documentation:
- https://developer.android.com/reference/android/Manifest.permission#READ_EXTERNAL_STORAGE
- https://developer.android.com/reference/android/Manifest.permission#READ_MEDIA_IMAGES
I will go ahead and close this issue for now. If you have any questions feel free to leave a comment.