Baseflow / Baseflow/flutter-geolocator

[Bug]: The `checkPermission` method always returns denied on Firefox.

Open
#1,657 4 comments 0 reactions 0 assignees View on GitHub
P2 platform: windows type: bug
Dominant language
Dart
Stars
1.3k
Forks
803
Avg merge
8h 16m
Merged PRs (30d)
1

Description

### Please check the following before submitting a new issue.

- [x] I have searched the [existing issues](https://github.com/baseflow/flutter-geolocator/issues).
- [x] I have carefully [read the documentation](https://github.com/Baseflow/flutter-geolocator/blob/main/geolocator/README.md) and verified I have added the required platform specific configuration.

### Please select affected platform(s)

- [ ] Android
- [ ] iOS
- [ ] Linux
- [ ] macOS
- [x] Web
- [ ] Windows

### Steps to reproduce

1. Call the `Geolocator.requestPermission()` on firefox.
2. Grant location permission.
3. Call the `Geolocator.checkPermission()`;

### Expected results

After granting the location permission in the browser, we expect to receive proper status from the `checkPermission`.

### Actual results

The `checkPermission` method always returns `denied` on Firefox. No matter what permission you've granted. This behavior is only visible on Firefox. The method works fine on Chrome, Edge, and Safari.
I've tested this behavior only on Windows 11.

### Code sample

Code sample

```dart
LocationPermission permission = await Geolocator.checkPermission();
if (permission == LocationPermission.denied) {
log("you don't have access to the location service");
}
```

### Screenshots or video

Screenshots or video demonstration

[Upload media here]

### Version

13.0.2

### Flutter Doctor output

Doctor output

```console
[√] Flutter (Channel stable, 3.29.2, on Microsoft Windows [Version 10.0.26100.3323], locale en-US) [992ms]
• Flutter version 3.29.2 on channel stable at C:\Users\***\flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision c236373904 (14 hours ago), 2025-03-13 16:17:06 -0400
• Engine revision 18b71d647a
• Dart version 3.7.2
• DevTools version 2.42.3

[√] Windows Version (11 Pro 64-bit, 24H2, 2009) [4.3s]

[√] Android toolchain - develop for Android devices (Android SDK version 35.0.0) [7.9s]
• Android SDK at C:\Users\***\AppData\Local\Android\sdk
• Platform android-35, build-tools 35.0.0
• Java binary at: C:\Program Files\Common Files\Oracle\Java\javapath\java.exe
This JDK was found in the system PATH.
To manually set the JDK path, use: `flutter config --jdk-dir="path/to/jdk"`.
• Java version Java(TM) SE Runtime Environment (build 23.0.1+11-39)
• All Android licenses accepted.

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

[√] Visual Studio - develop Windows apps (Visual Studio Build Tools 2019 16.11.8) [382ms]
• Visual Studio at C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools
• Visual Studio Build Tools 2019 version 16.11.32002.261
• Windows 10 SDK version 10.0.19041.0

[!] Android Studio (not installed) [203ms]
• Android Studio not found; download from https://developer.android.com/studio/index.html
(or visit https://flutter.dev/to/windows-android-setup for detailed instructions).

[√] IntelliJ IDEA Ultimate Edition (version 2024.3) [202ms]
• IntelliJ at C:\Program Files\JetBrains\IntelliJ IDEA 2024.1.4
• Flutter plugin version 83.0.4
• Dart plugin version 243.23654.44

[√] VS Code (version 1.95.3) [37ms]
• VS Code at C:\Users\***\AppData\Local\Programs\Microsoft VS Code
• Flutter extension version 3.100.0

[√] Connected device (3 available) [394ms]
• Windows (desktop) • windows • windows-x64 • Microsoft Windows [Version 10.0.26100.3323]
• Chrome (web) • chrome • web-javascript • Google Chrome 134.0.6998.89
• Edge (web) • edge • web-javascript • Microsoft Edge 133.0.3065.92

[√] Network resources [1,402ms]
• All expected network resources are available.
```

Contributor guide

Open the contributing guide

Research direction

Start at the web implementation of the checkPermission entry point and reproduce the sequence using requestPermission in Firefox. Compare its result after granting location access with the behavior on Chrome, Edge, and Safari; done means checkPermission reports the granted browser permission correctly on Firefox.

Written by the indexing model from the issue text.

Assessment

Tech stack
dart, flutter
Domain
web-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.