[SOLVED] Wrong asset id's on build

he guys …
i have a problem with my complex project since last week. i had a bug which i figured fixing was like needle and haystack so i decided to upload a working backup i made. after uploading everything worked fine but the built version when running on my server produces 404s. looking into it i found out that the path/id i get from the asset registry refers to the old id/folder structure.

i.e. i try to load ‘files/assets/50063896/1/cloudStormEmissive_3.basis’
while the asset has the id ‘54755534’ and the respective folder in the build.

all the files that are problematic are set to preload = false … i find them using this.app.assets.find('name') … so how does that result in wrong id’s/folders … they match with the old project though… so i have messed something up. but what ?

@vaios is perhaps the person to help on this.

I would also pass in the asset type to ensure you get correct asset.

eg

this.app.assets.find('cloudStormEmissive_3', 'texture');

If you don’t pass the asset type, it is undefined on which asset it gets of the same name. Folders are also ‘assets’

@yaustar … i’m getting the texture name from cycling through the material slots. worked like this for months now without ever touching it again. though of cause your suggestion is more accurate. would not resolve the incorrect folders. my loadrequest points to the right file but seems to be in the wrong folder.

or maybe …
need to check :wink:

I’m not 100% of the current issue :sweat_smile:

Just to check:

  • The project is fine on playcanvas.com?
  • When downloading a build and uploading to your server, the texture name is correct but the id is wrong?

The only thing I can think of is that config.json hasn’t been updated correctly on the server?

@yaustar … yep this is what i’m suspecting … it works in playmode … but not on server… it refers to the old ids/folders … how would i resolve this? … the config json i upload is from playcanvas build though …

Is this a forked project of the original?

@yaustar
hmmmm it is very old … so i can’t rule that out… it’s very much likely … fun fact. just checked the config.json … it provides the correct ids so that’s odd…
where do the wrong ones come from then !??!

Is it a caching issue either by the browser or any CDNs? (ie config.json is cached somewhere?)

it appeared yesterday and is still not working after returning today. i also use cloudfront which usually is super fast… changing the type finding the assets didnt do anything btw …

Does the config.json that you download from playcanvas.com match the one on the server?

@yaustar tripple checked … removed the Wohle folder several times and just uploaded what was in my Build. It’s super weired though that the config.json points to the correct folders… can‘t rule out something stupid on my side…

If you want to https://wherevergameishosted/config.json, does it match the one from playcanvas.com?

Can you link a published build from PlayCanvas and also a link to where you uploaded and I can take a quick look. DM me if they are private.

@yaustar hmmmm indeed the file i get from server is providing the wrong folder names unlike the one i upload… so that might indeed be some caching problem maybe from amazon side. cause i’ve uploaded it like 10 times since yesterday now … it might also not be impossible that it is an aws related problem - i’d need to check my whole setup there again … if i don’t find anything i’ll get back to you, thanks!

1 Like

@yaustar

it was of cause a problem with aws configuration. thanks for handholding.

1 Like