Not able to load Scene due to error in button.ts

I had used babylon js cdns in my project. Everything was working great until yesterday.
The version got updated from 4.2 to 5. But now i was unable to load the scene. On opening console, I got this error. Any ideas how to solve this.

The error leads to line where i have created a simple button.


CreateSimnpleButton is not a constructor and doesn’t need “new” before creating it, just like the error said. TBH the error should not be presented and i’ll check that, but i believe that if you can it’ll be better to remove it.
Can I get some information about the app? where is it deployed? or are you developing locally?

right now we have deployed it on local host using XAMPP

I’ll remove the new and check it once. Will update you soon

On removing new, the error was resolved, however, now its throwing another error

that’s related to the model you are trying to load. Make sure you are serving all needed files in order to serve the model correctly.

Can I ask - are you using our npm packages? which one did you take? UMD? or ES6? and what version?

I am using these scripts.

I’ll check the model once. Didn’t faced this issue while loading in the earlier version.

The scene loads perfectly when loaded on local host. But when I upload on a cPanel Server , the scene shows this model error.

Hey hard to say. Might be related to CORS or to the correct URL of the model. If you want to share a url we might be able to point to the reason

I don’t know if I could share the model.

However I noticed one thing, the error is caused by idb storage which I had used to optimize scene.

BABYLON.Database.IDBStorageEnabled = true.

The scene loads once when opened in new browser. But when I reload the site, it throws the same loading error

If you used is once and don’t need it you can remove the database that was created using chrome dev tools, but it shouldn’t influence your app. If it does it might be a bug that needs to be fixed

Hello @MG_Sharma just checking in, are you still having issues?