Browsing-Topics Permissions-Policy Header Error
Problem Statement
When developing websites locally in Chrome (e.g., on localhost
), you may suddenly encounter this error in DevTools:
Error with Permissions-Policy header: Origin trial controlled feature not enabled: 'browsing-topics'
This error occurs because:
browsing-topics
is part of Chrome's Privacy Sandbox API related to advertising interests- Browser extensions (primarily uBlock Origin in this case) inject restrictive Permissions-Policy headers
- Chrome flags this as an error since
localhost
isn't authorized for this experimental feature
The key takeaways:
- Not caused by your own code
- Primarily triggered by uBlock Origin
- Doesn't affect production sites
- Appears even without ad-related scripts
Recommended Solutions
1. Disable the Error via uBlock Origin Filter
Add a custom filter in uBlock Origin to bypass the header injection:
@@||localhost^$permissions=browsing-topics=()
Steps:
- Click uBlock Origin's extension icon
- Open Dashboard (gear icon)
- Navigate to "My filters" tab
- Paste the filter rule
- Click "Apply changes"
TIP
Replace localhost
if using a custom development domain (e.g., @@||mylocal.test^$permissions...
)
2. Add Development Domains to Trusted Sites
Whitelist your local development URLs in uBlock Origin:
- Open uBlock Dashboard
- Go to "Settings" tab
- Under Trusted sites, add:
http://localhost
http://127.0.0.1
(or your custom dev domains)
WARNING
This disables uBlock Origin completely on these domains - only use for development
3. Filter Context in Chrome DevTools (Temporary Fix)
Suppress the error in DevTools without modifying uBlock:
- Open Chrome Developer Tools (
Ctrl+Shift+J
/Cmd+Option+J
) - Click ⚙ Settings icon
- Under Preferences → Console:
- Check "Selected context only"
- Select top in context dropdown
::: caution This only hides the error - it doesn't resolve the header injection. Avoid when debugging iframe content. :::
Why Do These Work?
The underlying issue stems from uBlock Origin injecting this policy header:
Permissions-Policy: browsing-topics=()
This conflicts with Chrome's origin trials system during local development. Our solutions:
- Explicitly grant permissions for localhost (uBlock filter syntax)
- Disable uBlock on dev sites
- Hide extension-related console noise
Additional Context
- Fixed in uBlock Origin v1.53.0 - Update if using older versions
- Can safely be ignored on production sites
- Not an actual security threat to your application
- Official Chrome status: Topics API