-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
When geolocation api is disabled, app fails to load in Firefox #54975
Comments
dart info:
|
Thanks for filing and the repro! I can't seem to quite reproduce the same issue with Firefox (I come across the rethrow instead even with the about:config changes, but it may be a user error), but I'm guessing that the culprit is the getting of An alternative is declaring a nullable version of extension on Navigator {
// Rename so you don't come across collisions with `Navigator.geolocation`.
@JS('geolocation')
external Geolocation? get geolocation_;
} and using There's a general theme of how to support compatibility with As an aside, we're move to |
There's already an issue here: #30313 that was closed a long time ago, but the issue still exists.
In Firefox, it is possible for the user to completely disable the Geolocation API in about:config by toggling geo.enabled. In this case, window.navigator.geolocation will be undefined.
The application fails to fully load if trying to use geolocation anywhere with something like
Uncaught : Null check operator used on a null value
Here's a simple example that reproduces the issue:
I'd be happy to contribute a fix, if someone can help point me in the right direction
The text was updated successfully, but these errors were encountered: