Skip to content

Troubleshooting

Content security policy

If your page sets a content-security-policy header, you may encounter an error similar to one of these:

To fix this, you will need to update your website's content security policy to enable the capture widget to be embedded on your page. Below is an example content security policy containing the correct directives for capture.dev:

script-src 'unsafe-inline' 'self' https://cdn.capture.dev; frame-src 'self' https://app.capture.dev;

Permissions policy

If your page sets a permissions-policy header, you may encounter an error similar to one of these:

  • [Violation] Permissions policy violation: camera is not allowed in this document.
  • [Violation] Permissions policy violation: microphone is not allowed in this document.
  • [Violation] Permissions policy violation: The Clipboard API has been blocked because of a permissions policy applied to the current document
  • [Violation] Permissions policy violation: display-capture is not allowed in this document.

To fix, update your permissions policy header to allow capture.dev to access these browser APIs. For example:

camera=(self "https://app.capture.dev"), display-capture=(self "https://app.capture.dev"), microphone=(self "https://app.capture.dev"), clipboard-write=(self "https://app.capture.dev")

Console shows latest.js

If your application logs to the console you may notice that the source in developer console now shows as latest.js instead of the script that originally called window.console.

You can restore the original behaviour by adding the capture script to your browser's ignore list. To do this in Google Chrome follow the steps below:

  1. Open your browser developer console (View -> Browser -> Developer Console)
  2. Click the top-most settings icon on the right
  3. Select Ignore List from the navigation
  4. Under Custom exclusion rules click Add regex rule and paste the URL below:
https://cdn.capture.dev/capture-js/browser/latest.js