While loading cesium map giving errors in console.

1,663 views
Skip to first unread message

raghu....@gmail.com

unread,
Jul 29, 2016, 9:51:59 AM7/29/16
to cesium-dev
Hi Cesium Dev Team,

When I am loading cesium map into my application, it is loading properly but in console logs showing following errors.

"include.preload.js:393 Blocked script execution in 'about:blank' because the document's frame is sandboxed and the 'allow-scripts' permission is not set."

I remember this issue is resolved already in one of the latest version. I am using 1.22.1V.

Could anyone help me on this.

Thanks,
Raghu.

mbroc...@gmail.com

unread,
Jul 29, 2016, 10:04:11 AM7/29/16
to cesium-dev, raghu....@gmail.com


Try adding the "allow-scripts" flag in the viewer
Should look something like this for example
viewer.infoBox.frame.sandbox = "allow-same-origin allow-top-navigation allow-pointer-lock allow-popups allow-forms allow-scripts"

This solved that console printout

---Brock

raghu....@gmail.com

unread,
Jul 29, 2016, 11:04:21 AM7/29/16
to cesium-dev, raghu....@gmail.com
Hi Brock,

Thanks for reply, I have used the above one but still i am getting the same.

Following is my code.

Var viewer = new Cesium.Viewer(this.options.id+"_map",
{
baseLayerPicker : false,
fullscreenButton : false,
homeButton : false,
infoBox : true,
....
...
});

viewer.infoBox.frame.sandbox = "allow-same-origin allow-top-navigation allow-pointer-lock allow-popups allow-forms allow-scripts";


Regards,
Raghu.

bmcki...@conetec.com

unread,
Aug 3, 2016, 4:53:56 PM8/3/16
to cesium-dev, raghu....@gmail.com
I noticed I am also getting the same message with chrome dev tools open

"Blocked script execution in 'about:blank' because the document's frame is sandboxed and the 'allow-scripts' permission is not set"


Loading the page http://cesiumjs.org/ with the selecting "Tap To Interact" generates the error.

Also the "Tap To Interact" button doesn't work if the https urls is hit
https://cesiumjs.org


a mixed content error is generated

Scott Hunter

unread,
Aug 3, 2016, 5:07:29 PM8/3/16
to cesiu...@googlegroups.com
Do you have AdBlock Plus installed?  Based on the information that Raghu posted, include.preload.js is  https://hg.adblockplus.org/adblockpluschrome/file/25726c8c044f/include.preload.js#l393

This code injects JavaScript into every single page you visit, which I assume also includes the sandboxed iframe used by the InfoBox.  Because it's sandboxed, it is not allowed to execute scripts.

In any event, you can ignore this error, which doesn't affect Cesium's operation.


The HTTPS problem is indeed a bug on the website which is a separate issue.  




--
You received this message because you are subscribed to the Google Groups "cesium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cesium-dev+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

bmcki...@conetec.com

unread,
Aug 3, 2016, 6:13:38 PM8/3/16
to cesium-dev
AdBlock was definitely the cause with the
"Blocked script execution..." issue


thanks

Reply all
Reply to author
Forward
0 new messages