You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Both of these URLs have a response header of Content-Security-Policy: sandbox
Tested on user-agents:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.75 Safari/537.36
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3252.0 Safari/537.36
Expected result:
The JSON viewer should work.
Actual result:
Doesn't work at all, page is completely blank, and a console error appears: Blocked script execution in 'https://untitled-8bobienkqieg.runkit.sh/' because the document's frame is sandboxed and the 'allow-scripts' permission is not set.
It's a misleading error, the extension's content script does run but halts at one point. I did some investigation and it might be a Chrome bug, setTimeout and setInterval doesn't work in the sandbox CSP, but requestAnimationFrame or requestIdleCallback works.
Reproduction URLs:
Both of these URLs have a response header of
Content-Security-Policy: sandbox
Tested on user-agents:
Expected result:
The JSON viewer should work.
Actual result:
Doesn't work at all, page is completely blank, and a console error appears:
Blocked script execution in 'https://untitled-8bobienkqieg.runkit.sh/' because the document's frame is sandboxed and the 'allow-scripts' permission is not set.
It's a misleading error, the extension's content script does run but halts at one point. I did some investigation and it might be a Chrome bug,
setTimeout
andsetInterval
doesn't work in the sandbox CSP, butrequestAnimationFrame
orrequestIdleCallback
works.I tried this patch and it works, there's still some buggy behaviour but at least it's not a white screen anymore.
Another thing with(replaced with #210)requestAnimationFrame
is that only Chrome 24+ has the unprefixed version and the manifest's minimum Chrome version is 21, but I think no one should be using an ancient Chrome anymore :)The text was updated successfully, but these errors were encountered: