BabylonJs version 5.0.0-alpha.2 problem importing a model with Angular

We are using angular 11.0.4 (the latest version) and we needed to update babylonjs to the version 5.0.0-alpha.2 to get a fix to another issue that was submitted after the 4.2.0 version.
Since we updated to 5.0.0-apha.2 we are unable to import any model in our scene and we have this issue:

When we rollback to the 4.2.0 version the import works fine.

Here is how we load our model

The second log you see in the first image is from the sceneError callback function in the FilesInput constructor

Hello!

can you repro the issue in the Playground?

Or at least share a debug version somewhere so we can see the repro?

Loading an obj seems to work here: Babylon.js Playground

Hey, we reproduced the bug by creating a new dummy angular app. We only encounter this since we’ve moved to the @preview version from npm (5.0.0alpha-n).

Here’s the repo illustrating it : GitHub - emmbema/ng-babylon-dummy: Repo to test file-loading bug in Babylon.js 5.0.0

Pinging @RaananW to see if he can have a look

Assigning to me, will look at it as soon as i can.

I can only assume that the file is there and still shows 404?

Any luck on your side? If you still haven’t had time to test it, do you have a hunch of what it could be / something else we could test to help you?

I found the problem, but didn’t find what was changed. I want to be sure my fix will work.

It seems like the file protocol is being ignored. will need to check why

Here is a quick fix - Minor protocol change when draf-and-dropping files by RaananW · Pull Request #9614 · BabylonJS/Babylon.js (github.com)

Should we wait for the next release of the alpha to get the fix ?

It has been released a couple hour ago including the fix :wink: in 5.0.0-alpha.4

3 Likes