• In the Chrome developer console, when loading my WordPress site, I encounter the following error: “Error with Permissions-Policy header: Unrecognized feature: ‘ambient-light-sensor’. Error with Permissions-Policy header: Unrecognized feature: ‘ambient-light-sensor’. Error with Permissions-Policy header: Unrecognized feature: ‘ambient-light-sensor’.”

    Could someone help me identify the source of this error and how to resolve it? As you can see, the header I have added, “header(“Permissions-Policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(self), usb=()”);”, does not reference ‘ambient-light-sensor’, so I have no idea what the problem could be.

    Thank you for any assistance provided.

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Moderator bcworkz

    (@bcworkz)

    I don’t see any such console message when I looked.

    In any case, one technique to narrow down the source of mysterious errors is to deactivate all plugins and switch to a default Twenty* theme. With WP in its default state you shouldn’t see anything like that since it doesn’t send any such header at all. Restore your theme and plugins, one at a time, until the problem recurs. The last activated module would be the cause.

    Another technique is to use a recursive full text search tool like grep or findstr to search source code for a specific string like “header” or “ambient-light”. You may get false positive hits with such a search, but the responsible code should be within the hit list somewhere. Further investigate the source code of any promising hits to identify the responsible code.

Viewing 1 replies (of 1 total)
  • The topic ‘Error ambient-light-sensor not in policy header’ is closed to new replies.