Downloaded project hangs at 98% running on server (Dropbox)

Hi,

I am absolutely new to PlayCanvas and have just downloaded my first project as a ZIP-file.
After that I extracted the ZIP and uploaded the folder into my public dropbox folder.
(This public dropbox folder usually can host websites without any problems.)

When trying to open the index.html in a browser (tested Firefox+Chrome) it starts downloading but hangs at ~98%.

What´s wrong?

Thanks,
Carsten

If you publish your project with playcanvas does it work? Can you open the developer console in your browser and check if there are any errors?

Yes, it´s running fine on PlayCanvas server.
Yes, there´s an error:
“Uncaught TypeError: Cannot read property ‘version’ of undefined” playcanvas-stable.min.js:779

Oh, maybe because I am a “free” user?
But why am I allowed to download at all?

Can you send your downloaded ZIP to support ‘at’ playcanvas ‘dot’ com please?

Hmm, I don’t know how well dropbox deals with hosting websites. It’s probably better to host it on a proper webhost. There are many free options, I’m currently using byethost.com for my websites.

I believer that dropbox wraps links to images with some other HTML, so it may be that getting in the way.

Thanks for your help!

I´ve signed up a bytehost account and voilà the project opens.
So, it looks like the PlayCanvas projects are not Dropbox compatible.

But now I have another problem:
The project shows my environment cubemap and a sphere primitive but misses the main 3d-asset (FBX-asset).

Working PlaycanvasServer
Missing FBX-Asset on bytehost

:frowning:

I can now see, that the Dortmund.json file in the assets is missing on the server.
After reuploading it manually it disappears/gets deleted somehow!

What´s going on?

Maybe there’s an issue with your server? Perhaps it’s not accepting all file formats? It shouldn’t be a problem with your project though if the asset is deleted from the server it’s a server issue…

Yes, definately a server problem, the projects runs fine on another server!
The question now is how to solve it… I´m not an expert on this at all… :unamused:

So if you look at the model files (JSON files) in your Network tab in Chrome, it seems to report the following:

Content-Type:text/plain; charset=utf-8

However, JSON files need to be served with the following in order to load properly:

Content-Type:application/json

The PlayCanvas web server is set up to do this. I believe Apache does this by default. It seems DropBox doesn’t.

Ok, sounds interesting - but how can I change the server settings, me as a noob?

I think this might be a bug in PlayCanvas actually!

https://github.com/playcanvas/engine/blob/master/src/net/net_http.js#L340

@max A timestamp is added at the end of the URL so the endsWith(’.json’) fails. What do you think?

Hi @Cascho.
I’ve made small fix in engine to better identify if url contains JSON.
Please try downloading it again, or just replace the engine on drop box with new one: https://code.playcanvas.com/playcanvas-stable.js (should be v0.173.1+)

And let me know if that fixes it.

And few more tips on your project, it looks cool already, but you can improve quality way more by using some interior cubemap, and applying it to furniture with Physical type of material, and playing with metalness/glossiness. You could add me to your project (max) and I could do some of those changes just to show you as example.

@max
Thanks very much for your kind help!
Hopefully the support here will stay like this, even when PlayCanvas becomes bigger.

The Dropbox-Version now works!
(The original Js was named “playcanvas-stable.min.js”)

1 Like

You .min. new one too, it will be smaller (https://code.playcanvas.com/playcanvas-stable.min.js)
Regarding your scene. If you could upload one CubeMap that has office interior in it, possibly from your renders, then it would make big difference for furniture inside.

Other few tips, it is better to import in Editor smaller models, like Chair, Table, etc, and position them in editor. Separating things is good to some point as well, gives you more flexibility over setting up materials.
Another good practice, is to set up materials independently of the model, and reuse them. Less materials in scene, faster it will load.