NordicPlayground / webapp-nordic-thingy

Thingy:52 reference web app
https://developer.nordicsemi.com/thingy/52
Other
54 stars 19 forks source link

404 on my-3d/assets/thingyobjectfinal_mtl.mtl #4

Closed WillGeller closed 6 years ago

WillGeller commented 6 years ago

When cloned locally and run as described in instructions I get error: 404 on http://127.0.0.1:8081/thingy/thingy/52/src/my-3d/assets/thingyobjectfinal_mtl.mtl

Had to change https://github.com/NordicPlayground/webapp-nordic-thingy/blob/d50b97ccce1ae2a6480392e628769c6d64d8618a/src/my-3d/my-3d.html#L76 to let path = '../src/my-3d/assets/'; to properly load the 3d assets. I know this has to do with some of the weirdness how polyserve serves up files but I am not sure where the /thingy/52 part of the path is coming from. What is the reason for this?

ketile commented 6 years ago

The /thingy/52 path was necessary to get the assets to load from the production site, if I remember correctly. There were quite a few issues during development with the way Polymer was set up to serve files from the root folder. Once the site was placed inside nested folders on the server strange things happened.

I will consider updating the README as it is likely that others will run into this error message. We have a new version of the Thingy Web App in the pipeline but I can't provide any details at this time.