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

false denied state on GeolocationOnStart gatherer on some sites #1676

Closed
brendankenny opened this issue Feb 9, 2017 · 3 comments
Closed
Assignees

Comments

@brendankenny
Copy link
Member

Haven't looked into this yet, so it may be something obvious. Discovered when testing http://angularexpo.com/, in the CLI or extension. I get:

Required GeolocationOnStart gatherer encountered an error: Unable to determine if this permission was requested on page load because it had already been set. Try resetting the permission and running Lighthouse again.

Checking the state, it's seeing the permission as denied even though this is a new blank Chrome profile.

Interestingly the NotificationOnStart gatherer has no issue with this page, even though it's querying the permission state in the same way.

@brendankenny
Copy link
Member Author

(I was worried this was from #1641 with the change from -1 over to throw new Error(), but I can repro the problem on commits before that)

@brendankenny
Copy link
Member Author

brendankenny commented Feb 9, 2017

@ebidel has a fix to put a better error message on this, but he found the root cause was that the page isn't HTTPS, and geolocation works only on secure origins as of m50, so navigator.permissions.query will always returned denied for it on that page.

Since we check for that status before running the gatherer, insecure pages will get this warning even if the page isn't actually asking for the permission.

@ebidel
Copy link
Contributor

ebidel commented Feb 10, 2017

I've filed a bug against chromium to get the console log showing up in our deprecations/interventions audit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants