Skip to content

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:

  1. browsing-topics is part of Chrome's Privacy Sandbox API related to advertising interests
  2. Browser extensions (primarily uBlock Origin in this case) inject restrictive Permissions-Policy headers
  3. 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

1. Disable the Error via uBlock Origin Filter

Add a custom filter in uBlock Origin to bypass the header injection:

text
@@||localhost^$permissions=browsing-topics=()

Steps:

  1. Click uBlock Origin's extension icon
  2. Open Dashboard (gear icon)
  3. Navigate to "My filters" tab
  4. Paste the filter rule
  5. 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:

  1. Open uBlock Dashboard
  2. Go to "Settings" tab
  3. 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:

  1. Open Chrome Developer Tools (Ctrl+Shift+J / Cmd+Option+J)
  2. Click ⚙ Settings icon
  3. Under Preferences → Console:
    • Check "Selected context only"
  4. Select top in context dropdown

Chrome console context selection

::: 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:

http
Permissions-Policy: browsing-topics=()

This conflicts with Chrome's origin trials system during local development. Our solutions:

  1. Explicitly grant permissions for localhost (uBlock filter syntax)
  2. Disable uBlock on dev sites
  3. 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