Loading a .love file results in a 404 error

I’m using glitch to test out my fork of this love.js standalone player, but whenever I try to load a .love file I always get a 404 error message (Screenshot below). I’ve tried to reupload the .love file but the 404 persists.

The .love game im using for testing (if your interested) is a Tetris clone called STACKR-X.love

Hi @Asterisk - so I’m not familiar with love.js but because you set your frontend to the Glitch CDN url but it’s 404’ing on a URL of that asset as if it were in the root of your app, I’m wondering if the library is not compatible for linking to assets outside the root app folder. I tried the following:

  • remixed your app
  • opened the terminal and ran wget https://cdn.glitch.global/1f480c03-f9b4-4a58-8e89-3a0d4b52e6a4/STACKR-X.love?v=1682010854412
  • ran refresh so the file list in the sidebar would sync
  • updated line 7 so that it had `var Frontend = “STACKR-X.love?v=1682010854412” as that is the file name that showed in the sidebar.

This still didn’t work so I renamed “STACKR-X.love?v=1682010854412” to just “STACKR-X.love” (removing that cacheing parameter, and then it worked!

Again, I’m not sure why it works that way but it does. Hope this helps!

2 Likes

Thank you very much, Im pretty bad with web development in general but especially javascript. Again Thank you.

1 Like

Don’t worry, I’m pretty good with JavaScript and am still often stumped when it comes to how game engines handle assets!

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.