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]: Crash when calling checkPermission/requestPermission on Windows with Geolocation Service disabled. #1455

Closed
3 of 8 tasks
daniel-kane-everbridge-com opened this issue Mar 11, 2024 · 3 comments
Assignees
Labels
platform: windows Issue is related to the Windows platform

Comments

@daniel-kane-everbridge-com
Copy link
Contributor

daniel-kane-everbridge-com commented Mar 11, 2024

Please check the following before submitting a new issue.

Please select affected platform(s)

  • Android
  • iOS
  • Linux
  • macOS
  • Web
  • Windows

Steps to reproduce

  1. Disable Geolocation Service under Windows Services.
  2. Call Geolocator.checkPermission()
  3. Native error is not handled and Flutter will crash

Expected results

Error reported to Flutter App

Actual results

Flutter App crashes

Code sample

Code sample
Geolocator.checkPermission();

Screenshots or video

Screenshots or video demonstration

image

Version

0.2.2

Flutter Doctor output

Doctor output
[√] Flutter (Channel stable, 3.16.5, on Microsoft Windows [Version 10.0.22621.3155], locale en-NZ)
    • Flutter version 3.16.5 on channel stable at C:\Dev\Tools\flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 78666c8dc5 (3 months ago), 2023-12-19 16:14:14 -0800
    • Engine revision 3f3e560236
    • Dart version 3.2.3
    • DevTools version 2.28.4

[√] Windows Version (Installed version of Windows is version 10 or higher)

[!] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
    • Android SDK at C:\Users\dan.kane\AppData\Local\Android\sdk
    X cmdline-tools component is missing
      Run `path/to/sdkmanager --install "cmdline-tools;latest"`
      See https://developer.android.com/studio/command-line for more details.
    X Android license status unknown.
      Run `flutter doctor --android-licenses` to accept the SDK licenses.
      See https://flutter.dev/docs/get-started/install/windows#android-setup for more details.

[√] Chrome - develop for the web
    • Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe

[√] Visual Studio - develop Windows apps (Visual Studio Enterprise 2022 17.9.2)
    • Visual Studio at C:\Program Files\Microsoft Visual Studio\2022\Enterprise
    • Visual Studio Enterprise 2022 version 17.9.34622.214
    • Windows 10 SDK version 10.0.22621.0

[√] Android Studio (version 2021.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 11.0.12+7-b1504.28-7817840)

[√] VS Code (version 1.87.0)
    • VS Code at C:\Users\dan.kane\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension version 3.84.0

[√] Connected device (3 available)
    • Windows (desktop) • windows • windows-x64    • Microsoft Windows [Version 10.0.22621.3155]
    • Chrome (web)      • chrome  • web-javascript • Google Chrome 122.0.6261.95
    • Edge (web)        • edge    • web-javascript • Microsoft Edge 122.0.2365.80

[√] Network resources
    • All expected network resources are available.
@TimHoogstrate TimHoogstrate added the platform: windows Issue is related to the Windows platform label Mar 12, 2024
@TimHoogstrate
Copy link
Contributor

Dear @daniel-kane-everbridge-com,

I'll label this as a bug. We are currently not able to reproduce this issue because we lack the required knowledge. But can you elaborate a bit on the subject? Do you know what the native error is and do you feel comfortable to file a PR with a solution?

Kind regards,

@TimHoogstrate TimHoogstrate added the status: needs more info We need more information before we can continue work on this issue. label Mar 12, 2024
@TimHoogstrate TimHoogstrate self-assigned this Mar 12, 2024
@daniel-kane-everbridge-com
Copy link
Contributor Author

The only way I've been able to handle it is with a catch all.

#1458

@github-actions github-actions bot removed the status: needs more info We need more information before we can continue work on this issue. label Mar 14, 2024
@TimHoogstrate
Copy link
Contributor

Nice,

I see the PR is merged. I'll close this issue for now. Thanks for your contribution.

Kind regards,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
platform: windows Issue is related to the Windows platform
Projects
None yet
Development

No branches or pull requests

2 participants