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

chrome has error messages in the console #172

Closed
dfrankow opened this issue Mar 23, 2021 · 6 comments · Fixed by #173
Closed

chrome has error messages in the console #172

dfrankow opened this issue Mar 23, 2021 · 6 comments · Fixed by #173

Comments

@dfrankow
Copy link

Thanks for your work on this project.

I'm using this config:

PERMISSIONS_POLICY = {
    'accelerometer': [],
    'ambient-light-sensor': [],
    'autoplay': [],
    'camera': [],
    'document-domain': [],
    'encrypted-media': [],
    'fullscreen': [],
    'geolocation': [],
    'gyroscope': [],
    'magnetometer': [],
    'microphone': [],
    'midi': [],
    'payment': [],
    'sync-xhr': [],
    'usb': [],
}

I see these errors in the chrome console:

Error with Feature-Policy header: Unrecognized feature: 'ambient-light-sensor'.
Error with Feature-Policy header: Feature accelerometer has been specified in both Feature-Policy and Permissions-Policy header. Value defined in Permissions-Policy header will be used.
Error with Feature-Policy header: Feature autoplay has been specified in both Feature-Policy and Permissions-Policy header. Value defined in Permissions-Policy header will be used.
Error with Feature-Policy header: Feature camera has been specified in both Feature-Policy and Permissions-Policy header. Value defined in Permissions-Policy header will be used.
Error with Feature-Policy header: Feature document-domain has been specified in both Feature-Policy and Permissions-Policy header. Value defined in Permissions-Policy header will be used.
Error with Feature-Policy header: Feature encrypted-media has been specified in both Feature-Policy and Permissions-Policy header. Value defined in Permissions-Policy header will be used.
Error with Feature-Policy header: Feature fullscreen has been specified in both Feature-Policy and Permissions-Policy header. Value defined in Permissions-Policy header will be used.
Error with Feature-Policy header: Feature geolocation has been specified in both Feature-Policy and Permissions-Policy header. Value defined in Permissions-Policy header will be used.
Error with Feature-Policy header: Feature gyroscope has been specified in both Feature-Policy and Permissions-Policy header. Value defined in Permissions-Policy header will be used.
Error with Feature-Policy header: Feature magnetometer has been specified in both Feature-Policy and Permissions-Policy header. Value defined in Permissions-Policy header will be used.
Error with Feature-Policy header: Feature microphone has been specified in both Feature-Policy and Permissions-Policy header. Value defined in Permissions-Policy header will be used.
Error with Feature-Policy header: Feature midi has been specified in both Feature-Policy and Permissions-Policy header. Value defined in Permissions-Policy header will be used.
Error with Feature-Policy header: Feature payment has been specified in both Feature-Policy and Permissions-Policy header. Value defined in Permissions-Policy header will be used.
Error with Feature-Policy header: Feature sync-xhr has been specified in both Feature-Policy and Permissions-Policy header. Value defined in Permissions-Policy header will be used.
Error with Feature-Policy header: Feature usb has been specified in both Feature-Policy and Permissions-Policy header. Value defined in Permissions-Policy header will be used.
Error with Permissions-Policy header: Unrecognized feature: 'ambient-light-sensor'.

I'd prefer no errors in the chrome console. It's noisy and intimidating.

@adamchainz
Copy link
Owner

The unregonized feature "ambient-light-sensor" appears for me, but only with the "experimental web features" flag on. It's probably safe for you not to disable that feature for the time being.

I wasn't aware that Chrome has started warning when the header is listed with both the old and new names. Will update to use just the new name.

@dfrankow
Copy link
Author

Thanks!

@dfrankow
Copy link
Author

It would be great if you shipped this to pypi, or gave some guidance about when it will ship. I think we won't pick it up until it's a new version on pypi.

@adamchainz
Copy link
Owner

yes I am working on it, you are just commenting too fast ;)

@dfrankow
Copy link
Author

Thank you!

@adamchainz
Copy link
Owner

Released. Please upgrade to the new name django-permissions-policy - see changelog: https://github.com/adamchainz/django-permissions-policy/blob/main/HISTORY.rst

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

Successfully merging a pull request may close this issue.

2 participants