ShadowMario / FNF-PsychEngine

Engine originally used on Mind Games mod
Apache License 2.0
1.11k stars 2.18k forks source link

HTML5 not finding song #6249

Closed mayo78 closed 2 years ago

mayo78 commented 2 years ago

Describe your bug here.

i do have the mp3 files in the assets folder but it still crashes and gives an error

Command Prompt/Terminal logs (if existing)

source/LoadingState.hx:162: Setting asset folder to shared
127.0.0.1꞉3000/ReallyGoodGaem.js:51298

127.0.0.1꞉3000/ReallyGoodGaem.js:139996
[lime.utils.Assets] ERROR: There is no SOUND asset with an ID of "assets/songs/its-a-bit-lame/Inst.mp3"
127.0.0.1꞉3000/ReallyGoodGaem.js:139998

Called from <unknown>.__handleError (http://127.0.0.1:3000/ReallyGoodGaem.js line 140005 column 55)
Called from <unknown>.__broadcastEvent (http://127.0.0.1:3000/ReallyGoodGaem.js line 139838 column 12)
Called from <unknown>.__onLimeRender (http://127.0.0.1:3000/ReallyGoodGaem.js line 140851 column 8)
Called from <unknown>.dispatch (http://127.0.0.1:3000/ReallyGoodGaem.js line 119403 column 16)
Called from <unknown>.handleApplicationEvent (http://127.0.0.1:3000/ReallyGoodGaem.js line 6101 column 23)
127.0.0.1꞉3000/ReallyGoodGaem.js:140006

Are you modding a build from source or with Lua?

Source

What is your build target?

HTML5

Did you edit anything in this build? If so, mention or summarize your changes.

normal mod stuff (songs, stages, etc, nothing to do with paths and stuff)

ZufengW commented 2 years ago

I got this error too. I was just trying to build the repo without any modded assets, so the problem was not caused by custom assets.

I think it's related to how some kinds of assets (such as Inst) are not preloaded in web builds.

The returnSound function in Paths.hx is suspicious. I tried replacing the implementation of inst with the implementation from the original FNF repo. It made the error stop happening, but then I got a different error: '[lime.utils.Assets] ERROR: SOUND asset "songs:asse…horns/Voices.mp3" exists, but only asynchronously'.