Re: [cesium-dev] Cesium 1.7 Infobox error

580 views
Skip to first unread message
Message has been deleted

Matthew Amato

unread,
Mar 9, 2015, 6:36:48 PM3/9/15
to cesiu...@googlegroups.com
This was an issue that slipped out with 1.7, we have already release 1.7.1 to fix it: http://cesiumjs.org/2015/03/02/Cesium-version-1.7.1-released/

On Mon, Mar 9, 2015 at 6:21 PM, Katone Vi <tonym...@gmail.com> wrote:
Hello Cesium,

After updating the project to Cesium 1.7, I began getting errors upon clicking czmlDataSources (which should pop up the InfoBox widget)

TypeError: Cannot read property 'background-color' of null


I tried looking into this by checking out infobox.js

                if (frameContent.childNodes.length === 1) {
                    var style = window.getComputedStyle(frameContent.firstChild);
                    var color = Color.fromCssColorString(style['background-color']);
                    if (color.alpha !== 0) {
                        infoElement.style['background-color'] = style['background-color'];
                    }
                } else {
                    infoElement.style['background-color'] = null;
                }


And the problem occurs when frameContent.childNodes.length === 1... which is whenever i click my czmlDataSource.  Any ideas?  Thanks!

Katone

--
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.

Chris

unread,
Mar 15, 2015, 12:48:55 PM3/15/15
to cesiu...@googlegroups.com
Hi Matt,

On the topic of InfoBox in Cesium 1.7.1, Chrome 41.0 (Ubuntu) throws a sandbox error on about:blank.  

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

This started happening after upgrading to Cesium 1.7.1 and after reading about the updates to InfoBox, I presume the issue is related.

I am serving Cesium from an HTTPS site with a self-signed cert.

It's not an issue but wanted to make your team aware and see if there were any workarounds other than modifying about:flags?

Thanks.

- Chris

Matthew Amato

unread,
Mar 15, 2015, 8:19:41 PM3/15/15
to cesiu...@googlegroups.com
Thanks, I'll make a note for us to look into this.  Originally we weren't even loading about:blank, but the browsers all behave differently if you don't load some form of page.  I think the solution may be to create an empty document to use rather than relying on about:blank.

Matthew Amato

unread,
Mar 25, 2015, 11:46:31 PM3/25/15
to cesiu...@googlegroups.com
Chris, I looked into this and I can't personally reproduce the problem.  What do you see when you go to about:blank in that browser? (be sure to view the source)  On my machine it is completely empty.  It's possible that you have some content scripts being injected into about:blank by various Chrome plug-ins and that's what's being detected by the iframe sandbox and putting up the error.  It's a harmless error, but I want to understand if it's something we should be doing differently on our end.

Alexander Entin

unread,
Mar 26, 2015, 12:12:39 PM3/26/15
to cesiu...@googlegroups.com
Just FUI.
I see the same error message in Chrome on Windows. about:blank source is empty.

Katone Vi

unread,
Mar 26, 2015, 1:29:55 PM3/26/15
to cesiu...@googlegroups.com
Alexander

I'm using Chrome on Windows 7 at the moment and I do not see the following error you are referring to.  Are you sure it's Cesium or perhaps your Chrome is outdated?

Katone

Matthew Amato

unread,
Mar 26, 2015, 1:34:00 PM3/26/15
to cesiu...@googlegroups.com
Alex, is this with the server that ships with Cesium, or your own server?  Can you describe your server setup?  I've tried this both under http and https on Windows and UNIX and can't reproduce it.

If you go to chrome://extensions/, what do you have installed? 

--

Alexander Entin

unread,
Mar 26, 2015, 3:45:00 PM3/26/15
to cesiu...@googlegroups.com
server: nginx, default setup (almost)
extensions: Adblock, Postman

Alexander Entin

unread,
Mar 26, 2015, 3:47:13 PM3/26/15
to cesiu...@googlegroups.com

Alexander Entin

unread,
Mar 26, 2015, 3:53:39 PM3/26/15
to cesiu...@googlegroups.com
It's Adblock.
Even being disabled for the given site it still produces the error.

Matthew Amato

unread,
Mar 26, 2015, 4:31:42 PM3/26/15
to cesiu...@googlegroups.com
I was just about to reply with a similar thought.  It looks like they are intentionally injecting code into about:blank.  They even filed a Chrome bug/feature request for it.  There's basically nothing we can do about it on our end because they are injected code into all iFrames, even sandboxed ones.  I would argue this is a bug in adblock.

On Thu, Mar 26, 2015 at 3:53 PM, Alexander Entin <alexand...@gmail.com> wrote:
It's Adblock.
Even being disabled for the given site it still produces the error.

--

Matthew Amato

unread,
Apr 7, 2015, 4:34:07 PM4/7/15
to cesiu...@googlegroups.com
Just to close the loop on this, Adblock says this is a Chrome bug and they opened the following issue for it: https://code.google.com/p/chromium/issues/detail?id=472101
Reply all
Reply to author
Forward
0 new messages