Baseflow / Baseflow/flutter-permission-handler

[Bug]: Uncaught (in promise) in web

Open
#1,369 5 comments 0 reactions 1 assignee Claimed by @mvanbeusekom View on GitHub
P2 platform: web
Dominant language
Dart
Stars
2.2k
Forks
970
Avg merge
14h 22m
Merged PRs (30d)
2

Description

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

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

### Please select affected platform(s)

- [ ] Android
- [ ] iOS
- [ ] Windows

### Steps to reproduce

1. Create an empty Flutter project.
2. Just add the package `permission_handler: ^11.3.1` in `pubspec.yaml` and in the `dependencies` section.
3. Run the project with the command `flutter run -d web-server --web-hostname 0.0.0.0 --web-port 5000`.
4. After running, open the address in Chrome with the local IP. (for example 192.168.1.2:5000)

### Expected results

The project remains in the first loading and we get the following error in Chrome logs

```
Uncaught (in promise) null
```

### Actual results

It should run without problems.

### Code sample

n/a

### Screenshots or video

Screenshots or video demonstration

![image](https://github.com/user-attachments/assets/d3d1ebfb-3132-4bd8-9b53-10a255cbd40e)

### Version

11.3.1

### Flutter Doctor output

Doctor output

```console
[√] Flutter (Channel stable, 3.24.0, on Microsoft Windows [Version 10.0.22631.4037], locale en-US)
• Flutter version 3.24.0 on channel stable at C:\Users\mbfakourii\Develop\flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 80c2e84975 (4 weeks ago), 2024-07-30 23:06:49 +0700
• Engine revision b8800d88be
• Dart version 3.5.0
• DevTools version 2.37.2

[√] 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\mbfakourii\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
• Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe

[√] Visual Studio - develop Windows apps (Visual Studio Community 2022 17.9.6)
• Visual Studio at C:\Program Files\Microsoft Visual Studio\2022\Community
• Visual Studio Community 2022 version 17.9.34728.123
• 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.90.2)
• VS Code at C:\Users\mbfakourii\AppData\Local\Programs\Microsoft VS Code
• Flutter extension version 3.94.0

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

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

• No issues found!
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.