kit
kit copied to clipboard
Getting "Not found: /_app/immutable/...." on Vercel deployment even though the file exists
Describe the bug
In a production deployment on Vercel, I'm getting logs from my handleError function in hooks.server.ts saying that some routes in the .vercel/output/static/_app/immutable/assets/ are not found, even though they are in the folder. This also only happens on a couple of requests every few hours (on a small-medium site).
My setup is:
@sveltejs/kit - 1.0.0-next.504 @sveltejs/adapter-vercel - next My handleError function is very basic and just logs the error.
Here is an example of a route that is not found:
Not found: /_app/immutable/assets/_layout-ff3a027e.css
Here are some screenshots showing the file exists:
The requests are also not coming from bots and are indeed real user agents.
I don't know if this is a bug or something else. Does anyone have an idea of what might be happening?
Reproduction
New svelte kit project with vercel adapter, push to vercel.
Logs
{"error":"Not found: /_app/immutable/assets/_layout-ff3a027e.css"}
{"error":"Not found: /_app/immutable/assets/+layout-583477e6.css"}
{"error":"Not found: /_app/immutable/chunks/singletons-f2af6dd9.js"}
{"error":"Not found: /_app/immutable/components/pages/video/_page.svelte-a44f8798.js"}
{"error":"Not found: /_app/immutable/chunks/1-94989325.js"}
System Info
System:
OS: macOS 12.5.1
CPU: (16) x64 Intel(R) Core(TM) i9-9980HK CPU @ 2.40GHz
Memory: 20.71 MB / 32.00 GB
Shell: 5.8.1 - /bin/zsh
Binaries:
Node: 16.16.0 - ~/.nvm/versions/node/v16.16.0/bin/node
Yarn: 1.22.19 - ~/.nvm/versions/node/v16.16.0/bin/yarn
npm: 8.15.0 - ~/.nvm/versions/node/v16.16.0/bin/npm
Browsers:
Brave Browser: 105.1.43.88
Chrome: 105.0.5195.125
Firefox: 104.0.1
Safari: 15.6.1
npmPackages:
@sveltejs/adapter-vercel: next => 1.0.0-next.77
@sveltejs/kit: ^1.0.0-next.504 => 1.0.0-next.504
svelte: ^3.48.0 => 3.50.1
vite: ^3.0.3 => 3.1.3
Severity
annoyance
Additional Information
No response
Does this still happen with the latest version of the Vercel adapter and SvelteKit? Is this maybe related to you deploying a new version and existing browser connections which are still on an old version try to load no-longer-available assets? Also see https://kit.svelte.dev/docs/configuration#version
Closing due to inactivity; this may have been fixed. If not, please open a new issue.