asset load failure results in entire page broken
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 20.8k
- Forks
- 2.3k
- Avg merge
- 1d 16h
- Merged PRs (30d)
- 156
Description
Describe the bug
This is the same bug as reported in https://github.com/sveltejs/kit/issues/2699
I am only opening a new one as the previous one was closed and might not get any traction. If you want to reopen the old one, feel free to close this as duplicate.
This is a real world problem any asset load failure during network fluctuation results in entire page broken even when the page is fully Server side rendered. This is a problem affecting real users, and we are really hoping to get this resolved for our Yahoo Finance users.
Proposal
Introduce an option in kit which when enabled, is going to catch such errors, so we don't show the default error page and atleast show the server side rendered markup.
Reproduction
https://github.com/benmccann/500-import-failure
Logs
System Info
System:
OS: macOS 14.7.4
CPU: (12) arm64 Apple M3 Pro
Memory: 69.66 MB / 36.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 18.20.4 - ~/.nvm/versions/node/v18.20.4/bin/node
npm: 10.7.0 - ~/.nvm/versions/node/v18.20.4/bin/npm
Browsers:
Chrome: 133.0.6943.142
Safari: 18.3
npmPackages:
@sveltejs/adapter-node: ^5.2.9 => 5.2.9
@sveltejs/kit: ^2.10.1 => 2.10.1
@sveltejs/vite-plugin-svelte: ^3.1.2 => 4.0.4
svelte: ^4.2.19 => 5.16.2
vite: 5.2.13 => 5.2.13
Severity
blocking all usage of SvelteKit
Additional Information
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the 500-import-failure reproduction linked in the issue and compare its behavior with the earlier issue #2699. Trace how SvelteKit handles an asset or import failure during SSR and hydration; done means a configured failure does not replace the server-rendered markup with the default error page.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, node.js, vite
- Domain
- frontend, web-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100