You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Following the introduction of svelteKit, init the demo project and start the dev server.
Index and about page work fine, but get errors when loading todo page.
Specifically, when load the todo's page, internal server error 500 with message
Unexpected token F in JSON at position 0
SyntaxError: Unexpected token F in JSON at position 0
received, rather than proper Todo page
I've done some experiments to figure out what happens, but with no luck. However,
I located that the problem is issued by
Also tried to fetch the page from api.svelte.dev directly with url, and find out that
Direct request the data from the URL can receive response correctly.
Make a fetch directly from the browser with the same page can receive correct response.
Make a fetch to the URL from browser with different page receives an abnormal response ( e.g. open google in the browser, call fetch from devtools console)
Make a get request form a test client, like thunder client extension of vscode, get "Connection was forcibly closed by a peer." message.
Not sure what's the problem and what can I do to solve this.
Thanks very much in advance.
Reproduction
Simply run following commands as shown on sveltekit's webpage and navigate to Todo page.
npm init svelte@next
npm install
npm run dev
Logs
Browser console displays
client.ts:22 [vite] connecting...
client.ts:52 [vite] connected.
index.mjs:1983 <Routes> received an unexpected slot "default".
todos.json:1 Failed to load resource: the server responded with a status of 500 (Internal Server Error)
index.mjs:1983 <Error> received an unexpected slot "default".
todos:1 Failed to load resource: the server responded with a status of 500 (Internal Server Error)
Server Console shows
request to https://api.svelte.dev/todos/3f40df25-3547-43a7-b29f-dadd18d70a49 failed, reason: read ECONNRESET
FetchError: request to https://api.svelte.dev/todos/3f40df25-3547-43a7-b29f-dadd18d70a49 failed, reason: read ECONNRESET
at ClientRequest.<anonymous> (file:///C:/home/anony/Playground/nodejs/SvelteDemo/node_modules/@sveltejs/kit/dist/install-fetch.js:5810:11)
at ClientRequest.emit (node:events:390:28)
at ClientRequest.emit (node:domain:475:12)
at TLSSocket.socketErrorListener (node:_http_client:447:9)
at TLSSocket.emit (node:events:390:28)
at TLSSocket.emit (node:domain:475:12)
at emitErrorNT (node:internal/streams/destroy:157:8)
at emitErrorCloseNT (node:internal/streams/destroy:122:3)
at processTicksAndRejections (node:internal/process/task_queues:83:21)
I had the problem too, but only because of an internal proxy and a resulting "unable to get local issuer certificate" when accessing api.svelte.dev. Without the proxy it works as it should.
I had the problem too, but only because of an internal proxy and a resulting "unable to get local issuer certificate" when accessing api.svelte.dev. Without the proxy it works as it should.
Em… interesting, I recently found that I can access api.svelte.dev with a proxy… but still have the issue. Do I miss something?
Describe the bug
Following the introduction of svelteKit, init the demo project and start the dev server.
Index and about page work fine, but get errors when loading todo page.
Specifically, when load the todo's page, internal server error 500 with message
received, rather than proper Todo page
I've done some experiments to figure out what happens, but with no luck. However,
I located that the problem is issued by
of
src/route/todos/_api.ts
.Also tried to fetch the page from api.svelte.dev directly with url, and find out that
Not sure what's the problem and what can I do to solve this.
Thanks very much in advance.
Reproduction
Simply run following commands as shown on sveltekit's webpage and navigate to Todo page.
Logs
Browser console displays
Server Console shows
System Info
Windows 11
WSL2
I also tried with my old laptop which have Windows 7 installed, node, npm and svelte related stuffs should be the same as above two setups.
Severity
serious, but I can work around it
Additional Information
Created a thread in Discord talk about the issue.
The text was updated successfully, but these errors were encountered: