Jump to content

Unable to importmesh on iphone safari browser


Recommended Posts

Hi everyone, I am working on a scene that requires import meshes from .babylon file, most of the time I debug the scene on android mobile browser, and I got this error while trying to load the scene in iphone 5 & 6 (ios 10.2.1 up to date)safari browser:

Error status: 0 - Unable to load myfile.babylon

this is the link of the webpage

I have no problem loading the scene on desktop, android mobile browser(chrome, firefox, opera), however, when I try to load the scene on iphone 6, most of the times I encounter the above error during the middle of importing mesh, if you open the webpage using iphone, there is a chance for you to stuck in the loading screen, when the error occurs. Nonetheless, there is a few times the scene can be successfully loaded, but only a few times.

May I know if anyone who ever got with this error knows what is going on, as I am mainly working on the content of the 3D scene rather than handle the back-end part, thanks!

Link to comment
Share on other sites

Hello, iOS is a pile of crap when dealing with WebGL, it is the new IE6 :)

if the file is big, you can try to cut it into smaller parts using the incremental loading system: http://doc.babylonjs.com/tutorials/using_the_incremental_loading_system

Other thing to check: Did you turn on the gzip compression of .babylon file on your server?

Link to comment
Share on other sites

hi @Deltakosh, the gzip compression is on,

and after I convert .babylon file into .incremental.babylon file, same link:

the first few time i am finally able to enter the scene using iphone 6 safari, but as I tested again for a few more times(every time I clear safari cache before open the webpage again), more errors shows out, an error similar as previous one shows up again:

Error status: 0 - Unable to load fileRoot/myScene.someOfMySceneMeshName.babylonmeshdata

I am surprise as there are some of the .babylonmeshdata that have this error which are actually quick small in size.

also there is a new error:

Cross-origin image load denied by Cross-Origin Resource Sharing policy.

I am not familiar with server side knowledge, but since the scene is not hosted locally, I wonder why cross-origin error still occurs...

Also this times of using incremental babylon file, these error occurs on almost all iphone (5, 6, 6s as i asked friend to help me test), previously when I use non incremental babylon file to import mesh into the scene, iphone 6s seems to have no issue, although it could be iOS having a good day and decide to have a success loading on some of the iphone brand.

iOS is really giving me a huge pain...

Link to comment
Share on other sites

At least we know it is not related to the size of assets :)

Are you seeing any issue with this scene: http://www.babylonjs.com/Demos/Sponza/ ?

If not at all then there is something in your scene configuration that iOS dislikes :)

I would suggest trying to export without textures, or without big objects, etc.. to try to reduce the list of potential suspects


Regarding the cross-origin issue, this happens when you load an image or a texture from a different url that the one the page is hosted on.

Link to comment
Share on other sites


the Sponza scene loads perfectly on the iphone 6 that previously having issue loading my page.

And in fact, I just enable offline support by setting up the manifest file. And unexpectedly, after I did that, error's gone, I am able to enter the scene again, but I am uncertain about how reliable this is as it took me a few times of clear cache and reload to finally enter the scene.

Also, regarding the offline support, may i ask, will clear cache also remove offline resource? Once I clear cache, do I have to change the version number in manifest file in order to download assets again?



Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...