Can´t launch Inspector from code since this morning

Hi there:

Since this morning, I can’t have the Inspector shown and working, via:

_scene.debugLayer.show({
   embedMode: true,
   initialTab: 2,
   overlay: true
});

Console shows the following output:


react-dom.production.min.js:216 TypeError: Cannot read properties of undefined (reading 'IsAvailable')
    at m (performanceViewerComponent.tsx:154:13)
    at performanceViewerComponent.tsx:165:9
    at Bl (react-dom.production.min.js:262:359)
    at t.unstable_runWithPriority (scheduler.production.min.js:18:343)
    at Vo (react-dom.production.min.js:122:325)
    at Pl (react-dom.production.min.js:261:308)
    at ml (react-dom.production.min.js:243:50)
    at react-dom.production.min.js:123:115
    at t.unstable_runWithPriority (scheduler.production.min.js:18:343)
    at Vo (react-dom.production.min.js:122:325)
ii @ react-dom.production.min.js:216
react-dom.production.min.js:123 Uncaught TypeError: Cannot read properties of undefined (reading 'IsAvailable')
    at m (performanceViewerComponent.tsx:154:13)
    at performanceViewerComponent.tsx:165:9
    at Bl (react-dom.production.min.js:262:359)
    at t.unstable_runWithPriority (scheduler.production.min.js:18:343)
    at Vo (react-dom.production.min.js:122:325)
    at Pl (react-dom.production.min.js:261:308)
    at ml (react-dom.production.min.js:243:50)
    at react-dom.production.min.js:123:115
    at t.unstable_runWithPriority (scheduler.production.min.js:18:343)
    at Vo (react-dom.production.min.js:122:325)

Any not backward compatible Inspector change has been implemented today?

Oooh @sebavan I think this might be related to the Compute Pressure API changes?

Did you updated both @babylonjs/core and @babylonjs/inspector ???

it looks like you could use an old inspector version on a new core version.

Hi there, @carolhmj and @sebavan:

Only for your information, under FF Developer Ed., the console outputs two errors showing messages related to the Compute Pressure Observer Wrapper:

TypeError: can't access property "IsAvailable", o.ComputePressureObserverWrapper is undefined
m performanceViewerComponent.tsx:154
uo performanceViewerComponent.tsx:165
Bl React
unstable_runWithPriority scheduler.production.min.js:18
React 4
unstable_runWithPriority scheduler.production.min.js:18
React 6
_CreateEmbedHost inspector.ts:295
Show inspector.ts:431
_createInspector debugLayer.ts:287
kc debugLayer.ts:361
onload tools.ts:456
[react-dom.production.min.js:216:199](webpack://INSPECTOR/node_modules/react-dom/cjs/react-dom.production.min.js)
Uncaught TypeError: can't access property "IsAvailable", o.ComputePressureObserverWrapper is undefined
m performanceViewerComponent.tsx:154
uo performanceViewerComponent.tsx:165
Bl React
unstable_runWithPriority scheduler.production.min.js:18
React 4
unstable_runWithPriority scheduler.production.min.js:18
React 6
_CreateEmbedHost inspector.ts:295
Show inspector.ts:431
_createInspector debugLayer.ts:287
kc debugLayer.ts:361
onload tools.ts:456

Best regards.

Could you share the versions you are using for Babylon and Inspector ??? I have the feeling it is using a new version of core with an older inspector cause IsAvailable is a static on the PressureObserver class so it should always be available except here I am seeing ComputePressureObserverWrapper which is the old name of the observer used in previous inspector versions.

Hi @sebavan:

I’m using all as usual, in the simplest plain way, by loading the engine from the CDN:

<script defer src="https://cdn.babylonjs.com/babylon.js"></script>
<script defer src="https://cdn.babylonjs.com/loaders/babylonjs.loaders.min.js"></script>

That has always worked for me, until yesterday in the morning (Central European Time).

Anyway, how can I know the versions you’re asking for? Note that I can’t even show the Inspector, so I can’t access to any version info tab in it or something.

@RaananW same issue I pointed on another thread yesterday I wonder if there is a mismatch somewhere between the inspector version and the CDN ?

1 Like

On it, I am going to run a nightly to make sure we are on par

1 Like

Just wanted to add that the CDN was updated just now, please try clearing your cache and load the page again

Hi there, @RaananW:

Same misbehavior here, even after cleaning all the caches several times :wink:

Must I suppose a time is needed for the updating to reach the server I’m getting the files from, here in Spain?

1 Like

I will debug this. can you share the page you are testing with?

Hi there @RaananW, and thank you for your time.

Sadly this is a private project, but I thought any other of our projects using BJS would be showing the same problem, as it is, so please take a look at this other one.

Of course, script files have been minified there!

Note that console shows the same aforementioned error…

Uncaught TypeError: can't access property "IsAvailable", o.ComputePressureObserverWrapper is undefined
    m performanceViewerComponent.tsx:154
    uo performanceViewerComponent.tsx:165
    Bl React
    unstable_runWithPriority scheduler.production.min.js:18
    React 4
    unstable_runWithPriority scheduler.production.min.js:18
    React 6
    _CreateEmbedHost inspector.ts:295
    Show inspector.ts:431
    _createInspector debugLayer.ts:292
    kc debugLayer.ts:366
    onload tools.ts:456

…when Inspector is called this way from the code…


...
_scene.debugLayer.show({
    embedMode: true,
    initialTab: 2,
    overlay: true
});
...

Please, say me if you need something more.

Best regards.

P.S: By the way, I can see now in the console that I’m using Babylon.js v5.29.0 - WebGL2

yup looks like it is using the latest core and inspector but for some reason the inspector does not seem to be the right one @RaananW

1 Like

Hi there, @sebavan, @RaananW:

Indeed, it seems to be a very easy error to reproduce, isn’t it? I mean, is only loading the BJS from server and trying to use the Inspector functionality from code.

Anyway, It’s very strange to me that anybody else hasn’t warned about this issue, cause It seems like a lot of people is using this engine nowadays.

Thanks for your time.

Hi there, @sebavan, @RaananW and @carolhmj:

Finally, I’ve managed to have the Inspector back again :upside_down_face:, just by “commenting” the embedMode parameter:


...
_scene.debugLayer.show({
    /*embedMode: true,*/
    initialTab: 2,
    overlay: true
});
...

Have this any sense for you?

Thanks for your time.

1 Like

Hello everyone,
I can confirm that bug is occurring when added just

<script src="https://cdn.babylonjs.com/babylon.js"></script>
<script src="https://cdn.babylonjs.com/loaders/babylonjs.loaders.min.js"></script>

and

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

However, if you remove the initialTab: 2 from the config it works.
You can crush the inspector with the same error by clicking statistics icon (the one in the middle)
image

2 Likes

Hi there @neu5:

You’re right, Inspector comes to live again also (see my previous entry) when removing “initialTab” from the parameters object.

Thanks for your time.

2 Likes

Looks like we were posting about the same time :smiley:
I just wanted to check if I will have the same error as I haven’t used the inspector myself before.
Hope that will help the Babylon team to figure it out :slight_smile:

2 Likes

Double team here!

2 Likes

Reproduced, problem found, working on a fix.
Sorry 'bout that!

1 Like