Skip to content

[Bug]: Windows shows app as constantly using the device's location #1394

Open
@Chaphasilor

Description

@Chaphasilor

Please check the following before submitting a new issue.

Please select affected platform(s)

  • Android
  • iOS
  • Windows

Steps to reproduce

  1. Add the package to pubspec.yaml
  2. Build and launch the app
  3. Windows shows the "Location in use by" taskbar icon and lists the flutter app

Related issues: #1289

Additional info:
The package is merely included in pubspec.yaml, but isn't actively included anywhere in the code. No location permissions are actively requested, nor needed. Still, as soon as the app is launched, Windows 11 shows the app as currently using the user's location.
This also happens when the app is packaged for Windows using msix package (following the official Flutter instructions). In the msix config, location capabilities are not even requested. I'm assuming this package might request these permissions anyway, overriding the capabilities specified in the msix config.

Expected results

  1. Location is not being used or accessed unless specifically requested

Actual results

  1. Location shows up as being requested at all times. Maybe it's not being used as all, just wrongly detected, but that should also not happen.

Code sample

Code sample
dependencies:
  flutter:
    sdk: flutter
  permission_handler: ^11.3.1

Screenshots or video

Screenshots or video demonstration

image

Version

11.3.1

Flutter Doctor output

Doctor output
[✓] Flutter (Channel stable, 3.24.3, on Microsoft Windows [Version 10.0.22631.4249], locale en-US)
    • Flutter version 3.24.3 on channel stable at C:\flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 2663184aa7 (4 weeks ago), 2024-09-11 16:27:48 -0500
    • Engine revision 36335019a8
    • Dart version 3.5.3
    • 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 34.0.0)
    • Android SDK at C:\Users\Chaphasilor\AppData\Local\Android\sdk
    • Platform android-34, build-tools 34.0.0
    • Java binary at: C:\Program Files\Android\Android Studio\jbr\bin\java
    • Java version OpenJDK Runtime Environment (build 17.0.11+0--11852314)
    • All Android licenses accepted.

[✗] 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.

[✓] Visual Studio - develop Windows apps (Visual Studio Build Tools 2022 17.11.4)
    • Visual Studio at C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools
    • Visual Studio Build Tools 2022 version 17.11.35312.102
    • Windows 10 SDK version 10.0.22621.0

[✓] Android Studio (version 2024.1)
    • 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 17.0.11+0--11852314)

[✓] VS Code (version 1.94.0)
    • VS Code at C:\Users\Chaphasilor\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension version 3.98.0

[✓] Connected device (2 available)
    • Windows (desktop) • windows • windows-x64    • Microsoft Windows [Version 10.0.22631.4249]
    • Edge (web)        • edge    • web-javascript • Microsoft Edge 129.0.2792.79

[✓] Network resources
    • All expected network resources are available.

! Doctor found issues in 1 category.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions