How to publish Babylon.js from BabylonJS Editor to Web server

I am trying to host the Babylon scene created on the Babylon.JS Editor. However, when I dragged and dropped the index.html, dist folder and scenes folder to the server like Amplify. It threw 403 error. Does anyone successfully host a Babylon scene to the server before?

Hello! It’s a bit hard to know without more information, but a 403 error usually indicates something in your authorization/security setup ( 403 Forbidden - HTTP | MDN ( ), so I`d check that first :slight_smile:

@julien-moreau is the editor creator and might have some idea of what’s going on editor-side

1 Like

As @carolhmj said there is a file (or files) which couldn’t be accessed. Check the developer console to see which file is it.

Yes. I dropped “scenes” folder which contains a scene.babylon file and the server was unable to load it.

Unable to load from ./scenes/scene/scene.babylon: importScene of scene.babylon from Babylon.JS Editor version: v4.0.5, exporter version: v4.2.0
(anonymous) @ index.ts:48

It happened on the Chrome but not on the FireFox.

I have problems with running the deployed application of Chrome as well, but I get another kind of error. I will create a topic in the Debug section.

On Firefox it runs well.


EDIT: Can you try this?

it is not using 4.2.1 so it won t work on Chrome :frowning:

Hi !
Nice catch @sebavan !
@ZzMarmot you can update the version of BabylonJS to 4.2.1 in your project and reinstall the dependencies using npm. Also don’t forget to rebuild (via the editor or “npm run build”) before re-uploading :slight_smile:

1 Like

Hello @ZzMarmot just checking in if you still have issues

Not for now. The new version V4.1.0 has solved the problem.

I am happy to share that our team launched an Open Source BabylonJS Editor Plugin with a feature to publish your scene to AWS Amplify which can help you easily host the webpage. GitHub - aws-samples/aws-tools-for-babylonjs-editor: AWS Tools for Babylon.JS Editor is a suite of tools meant to interact with Babylon.JS Editor by utilizing the capabilities of AWS products. Please play with it and hope it can help the community.


Excellent @ZzMarmot !! You rox !!
Still don’t hesitate if you need more tools from the editor’s API for your plugin(s) !

1 Like