ceedee

debugLayer - Uncaught TypeError

Recommended Posts

Hi
I am trying to enable debugLayer in babylon.3.0.7
It only happens when  i set popup property.

 

scene.debugLayer.show({
      popup:true,
      initialTab : 2
});        

and I get this error in console:

Uncaught TypeError: Cannot read property 'document' of null
    at t.openPopup (babylon.inspector.bundle.js:408)
    at new t (babylon.inspector.bundle.js:408)
    at t._createInspector (babylon3.0.custom.js:37)
    at t.show (babylon3.0.custom.js:37)

 

Share this post


Link to post
Share on other sites
On 24.10.2017 at 3:58 PM, Temechon said:

What browser are you using ?

Hi
Chromium   "61.0.3163.100 (Official version) Built on Ubuntu , running on Ubuntu 17.04 (64-bit)"

but this happens on Firefox as well, only message is a little bit different ( version 56.0  64-bit,   Ubuntu as well,   Xubuntu 17.04 exactly )

Frefox message:

TypeError: i is null[Więcej informacji]  babylon.inspector.bundle.js:408:5002
	INSPECTOR</t.prototype.openPopup http://webgl.local:3000/js/babylon.inspector.bundle.js:408:5002
	t http://webgl.local:3000/js/babylon.inspector.bundle.js:408:464
	t.prototype._createInspector http://webgl.local:3000/js/babylon3.0.custom.js:37:5625
	t.prototype.show

 

On Chromium  Windows 7  it is similar, BUT browser shows there information about blocked popup.

So I added my website to exception list in popup blocking options,  after that it  started to work,  and no errors in console.
It was a bit confusing, because popup worked fine when it was creaded by user click,  so blocking is only about automated popup show.
So looks like  console error is only because code assumes popup was always created correctly and not blocked.



 

 

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


  • Recently Browsing   0 members

    No registered users viewing this page.