Skip to content
This repository has been archived by the owner on Mar 22, 2024. It is now read-only.

Slinkity asset contains url encoded slashes which prevent loading #240

Open
insanity54 opened this issue Mar 27, 2023 · 2 comments
Open
Labels
🐞 bug Something isn't working

Comments

@insanity54
Copy link

Thank you for slinkity. I've been enjoying it's features.

Describe the bug

I've got a slinkity site with a Svelte renderer and I'm having trouble with the js asset file named http://localhost:8080/assets/_slinkity_props_inputPath_.%2F_website%2Fbird-pages.e3cc352d.js

Said file 404's after I build and serve my site.

I can see that the file was properly rendered as js. It definitely exists in my _site/assets/folder, but for whatever reason, my browser cannot load it. I'm guessing it's the period and url encoded forward slashes, but I'm not sure.

To Reproduce

I've got a huge monorepo site where I first saw the issue. Instead of sharing that, I've created a minimum repo which reproduce and illustrates the issue.

https://github.com/insanity54/bird-site

cloning the repo, then running pnpm i and pnpm run serve should be enough to get the site up and running. The problem exists on any of the bird pages. The bird sighting counter is not operatable when the _slinkity_props_inputPath_.%2F_website%2Fbird-pages.e3cc352d.js file 404's.

The issue is not present when running eleventy dev server. The issue is only present in the built site.

Expected behavior

_slinkity_props_inputPath_.%2F_website%2Fbird-pages.e3cc352d.js should load (Status code 200)

Screenshots

problem-on-firefox

problem-on-chromium

(please complete the following information):

  • OS: Ubuntu 22.04
  • Browser: Chromium Version 111.0.5563.110 (Official Build) snap (64-bit)
    and Firefox 110.0.1 (64-bit)
@insanity54 insanity54 added the 🐞 bug Something isn't working label Mar 27, 2023
@insanity54
Copy link
Author

I'm having a hard time debugging this. I haven't been able to find the code that generates the _slinkity_props_inputPath_.%2F_website%2Fbird-pages.e3cc352d.js filename.

@insanity54
Copy link
Author

insanity54 commented Mar 29, 2023

The plot thickens. I deployed the bird site to netlify and it loads just fine https://neon-lamington-0e075a.netlify.app/birds/seagull/

Further investigation as to why the asset file 404s on my local machine reveals that the request URL must be double url encoded for it to load.

GET /assets/_slinkity_props_inputPath_.%2F_website%2Fbirdpages.7efac2f7.js 404 2.610 ms - -
GET /assets/_slinkity_props_inputPath_.%252F_website%252Fbirdpages.7efac2f7.js 200 1.718 ms - -

The file 404's on Fleek too, which is where I want to deploy. https://silent-tooth-9725.on.fleek.co/birds/seagull/

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
🐞 bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant