Maaz Zindani

Loading the index…

↑↓ move↵ openesc close4791 pages
Next.js and React

Chrome rejects the Permissions-Policy header with a structured header error

Your error

Error with Permissions-Policy header: Parse of permissions policy failed because of errors reported by structured header parser.1 more line it can show

Fix it fast

Most common cause, 1 of 3

The value still uses Feature-Policy syntax

Rewrite each feature as name=(list).

Fix
# Old Feature-Policy form (fails):
#   geolocation 'self' https://example.com; camera 'none'
# Permissions-Policy form:
Permissions-Policy: geolocation=(self "https://example.com"), camera=()
Did this fix it?
Full steps for this cause: check, fix, verify

Short answer

Error with Permissions-Policy header: Parse of permissions policy failed because of errors reported by structured header parser means the value is not a valid structured field dictionary, so Chrome ignores the whole header. Write it as feature=(allowlist) pairs joined by commas, for example geolocation=(self), camera=(), and send it from one place only. Applies to Chrome 159 and other Chromium-based browsers.

  • Applies to Chrome 159 stable (Chromium-based browsers), Apache httpd 2.4 mod_headers, nginx 1.29
  • Updated
  • By Maaz Zindani, Senior Software Engineer

Which cause do you have?

Look at the exact header the server sends, not the line in your config. Count how many Permissions-Policy lines come back and read each value character by character.

Run this first
curl -sI https://example.com/ | grep -i '^permissions-policy'

Then find the line you see in this list and open its fix:

  1. 1The value still uses Feature-Policy syntaxThe value has semicolons between features, spaces after the feature name, or 'self' and 'none' in single quotes
  2. 2One character breaks the structured field rulesThe value looks like the new form but has a capital letter in a feature name, single quotes, or an empty value after =
  3. 3Two layers send the header and one copy is badcurl shows two Permissions-Policy lines, for example one from the web server and one from a WordPress security plugin or a CDN rule

What does the error look like?

  • Error with Permissions-Policy header: Parse of permissions policy failed because of errors reported by structured header parser.
  • Error with Permissions-Policy-Report-Only header: Parse of permissions policy failed because of errors reported by structured header parser.

Cause 1 of 3

The value still uses Feature-Policy syntax

You seeThe value has semicolons between features, spaces after the feature name, or 'self' and 'none' in single quotes

Check

The structured header parser error shows up most often when a Feature-Policy value was copied into the Permissions-Policy header. The old form, such as geolocation 'self'; camera 'none', is not a structured field dictionary, so Chrome cannot read any of it. Chrome's guide shows the old and new forms side by side.

Check
curl -sI https://example.com/ | grep -i '^permissions-policy' | grep -n "'\|;"

Fix

Rewrite each feature as name=(list). Use the bare token self, put other origins in double quotes inside the parentheses, write () to block a feature for everyone, and separate features with commas.

Fix
# Old Feature-Policy form (fails):
#   geolocation 'self' https://example.com; camera 'none'
# Permissions-Policy form:
Permissions-Policy: geolocation=(self "https://example.com"), camera=()

Verify

Reload the page with DevTools open. The console no longer prints the parse error, and curl shows the new comma-separated value.

Verify
curl -sI https://example.com/ | grep -i '^permissions-policy'

Confirmed by developer.chrome.com

Did this fix it?

Cause 2 of 3

One character breaks the structured field rules

You seeThe value looks like the new form but has a capital letter in a feature name, single quotes, or an empty value after =

Check

Even in the new syntax, a single invalid character makes the parse fail. RFC 9651 requires dictionary keys to start with a lowercase letter or *, and strings to start with a double quote, so Camera=() or geolocation=('self') is rejected. An origin left without quotes is a different case: it parses as a token, and Chrome then warns that the allowlist item must be *, self or a quoted URL.

Check
curl -sI https://example.com/ | grep -i '^permissions-policy' | grep -nE "[A-Z][a-z-]*=|'"

Fix

Write feature names in lowercase, use double quotes around every origin, and give each feature a value: *, self, () or a list in parentheses.

Fix
# Apache (.htaccess or vhost), mod_headers enabled
Header always set Permissions-Policy "camera=(), microphone=(), geolocation=(self)"

# nginx (server or location block)
add_header Permissions-Policy "camera=(), microphone=(), geolocation=(self)" always;

Verify

The console is clean and curl shows the lowercase, comma-separated value.

Verify
curl -sI https://example.com/ | grep -i '^permissions-policy'

Confirmed by rfc-editor.org

Did this fix it?

Cause 3 of 3

Two layers send the header and one copy is bad

You seecurl shows two Permissions-Policy lines, for example one from the web server and one from a WordPress security plugin or a CDN rule

Check

When two parts of the stack each add a Permissions-Policy line, the browser joins them into one comma-separated value before parsing. RFC 9651 notes that an error in one party's value then makes the entire field fail, so a correct line still stops working next to a broken one.

Check
curl -sI https://example.com/ | grep -ci '^permissions-policy'

Fix

Pick one owner for the header. Remove it from the plugin settings or CDN rule, or have the web server replace whatever the application sent.

Fix
# Apache: replace the value the application or a plugin added
Header always unset Permissions-Policy
Header always set Permissions-Policy "camera=(), microphone=(), geolocation=(self)"

Verify

curl counts exactly one Permissions-Policy line and the console stays clean.

Verify
curl -sI https://example.com/ | grep -ci '^permissions-policy'

Confirmed by rfc-editor.org

Did this fix it?

How do I stop it coming back?

  • Keep the header value in one config file and add a deploy check that runs the curl command and fails on more than one Permissions-Policy line.
  • Try a new value in the Permissions-Policy-Report-Only header first: it is parsed the same way, but the browser only reports would-be violations instead of enforcing them.
  • When a plugin or CDN offers a security headers option, turn it off if the web server already sets the header.

Sources

How was this page made?

I drafted this page with AI assistance from the official documents listed under Sources. Every cause above names the document that confirms it. I have not reproduced this fix on a machine of my own yet, so read it as documented guidance, not a test report. Found a mistake? Tell me.

Which stack is behind this page?

Projects of mine on the same stack: TaxiDex, stegnor.com.

Next step

Want this handled for good?

I look after servers, apps and releases end to end. Tell me what keeps breaking.