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

[Bug]: request() does not return a status on android with targetSdkVersion 34 and flutter 3.24.0 #1357

Closed
3 of 5 tasks
joelbrostrom opened this issue Aug 12, 2024 · 2 comments
Assignees
Labels
status: closed (missing info) Indicates the issue was automatically closed due to a lack of information. status: needs more info We need more information before we can continue work on this issue.

Comments

@joelbrostrom
Copy link

joelbrostrom commented Aug 12, 2024

Please check the following before submitting a new issue.

Please select affected platform(s)

  • Android
  • iOS
  • Windows

Steps to reproduce

  1. set targetSdkVersion to 34
  2. call final newStatus = await Permission.locationWhenInUse.request();
  3. Give permission in the dialog

The method never returns.

Expected results

await Permission.locationWhenInUse.request() should return a new status after the permission is given.

Actual results

The method never returns.

Code sample

Code sample
 final status = await Permission.locationWhenInUse.status;
    if (status.isDenied) {
      final newStatus = await Permission.locationWhenInUse.request();
      if (newStatus.isDenied) {
        // User can continue using map without user location
        return;
      }
      if (newStatus.isGranted) {
        await onPermissionGranted();
      }
    }

Version

11.3.1

Flutter Doctor output

Doctor output
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.24.0, on macOS 14.5 23F79 darwin-arm64, locale en-SE)
[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.1)
[✓] Xcode - develop for iOS and macOS (Xcode 15.4)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2022.3)
[✓] VS Code (version 1.92.0)
[✓] Connected device (4 available)
[✓] Network resources

• No issues found!
@joelbrostrom joelbrostrom changed the title [Bug]: request() does not return a status when using targetSdkVersion 34 on android [Bug]: request() does not return a status on android with targetSdkVersion 34 and flutter 3.24.0 Aug 12, 2024
@TimHoogstrate
Copy link
Contributor

Dear @joelbrostrom,

I cannot reproduce this issue. Android 34 device targetSDK 34. Flutter 3.24.0. Can you try the example app? Or check if some other permission_handler_android version is used in your case.

  permission_handler:
    dependency: "direct dev"
    description:
      name: permission_handler
      sha256: "18bf33f7fefbd812f37e72091a15575e72d5318854877e0e4035a24ac1113ecb"
      url: "https://pub.dev"
    source: hosted
    version: "11.3.1"
  permission_handler_android:
    dependency: "direct dev"
    description:
      name: permission_handler_android
      sha256: "76e4ab092c1b240d31177bb64d2b0bea43f43d0e23541ec866151b9f7b2490fa"
      url: "https://pub.dev"
    source: hosted
    version: "12.0.12"
  permission_handler_apple:
    dependency: transitive
    description:
      name: permission_handler_apple
      sha256: e6f6d73b12438ef13e648c4ae56bd106ec60d17e90a59c4545db6781229082a0
      url: "https://pub.dev"
    source: hosted
    version: "9.4.5"
  permission_handler_html:
    dependency: transitive
    description:
      name: permission_handler_html
      sha256: "6cac773d389e045a8d4f85418d07ad58ef9e42a56e063629ce14c4c26344de24"
      url: "https://pub.dev"
    source: hosted
    version: "0.1.2"
  permission_handler_platform_interface:
    dependency: transitive
    description:
      name: permission_handler_platform_interface
      sha256: "48d4fcf201a1dad93ee869ab0d4101d084f49136ec82a8a06ed9cfeacab9fd20"
      url: "https://pub.dev"
    source: hosted
    version: "4.2.1"
  permission_handler_windows:
    dependency: transitive
    description:
      name: permission_handler_windows
      sha256: "1a790728016f79a41216d88672dbc5df30e686e811ad4e698bfc51f76ad91f1e"
      url: "https://pub.dev"
    source: hosted
    version: "0.2.1"
  plugin_platform_interface:
    dependency: transitive
    description:
      name: plugin_platform_interface
      sha256: "4820fbfdb9478b1ebae27888254d445073732dae3d6ea81f0b7e06d5dedc3f02"
      url: "https://pub.dev"
    source: hosted
    version: "2.1.8"

@TimHoogstrate TimHoogstrate self-assigned this Aug 19, 2024
@TimHoogstrate TimHoogstrate added the status: needs more info We need more information before we can continue work on this issue. label Aug 19, 2024
Copy link

github-actions bot commented Sep 2, 2024

Without additional information, we are unfortunately not able to resolve this issue. Therefore, we reluctantly closed this issue for now. If you run into this issue later, feel free to file a new issue with a reference to this issue. Add a description of detailed steps to reproduce, expected and current behaviour, logs and the output of 'flutter doctor -v'. Thanks for your contribution.

@github-actions github-actions bot added the status: closed (missing info) Indicates the issue was automatically closed due to a lack of information. label Sep 2, 2024
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Sep 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: closed (missing info) Indicates the issue was automatically closed due to a lack of information. status: needs more info We need more information before we can continue work on this issue.
Projects
None yet
Development

No branches or pull requests

2 participants