[bug?] Shadow Endpoints fails to hydrate big data sent to their matching page because it is truncated. causing SyntaxError: Unexpected end of JSON input
See original GitHub issueDescribe the bug
i originally came to this issue when trying to use shadow endpoints for the first time:
EDIT: there are more discovery points in subsequent comments below.
Reproduction
https://stackblitz.com/edit/sveltejs-kit-template-default-ahljwi?file=src/routes/about.svelte
npm run dev
and go to the /about endpoint
Logs
9:03:33 PM [vite] hmr update /src/routes/about.svelte
System Info
this is my mac envinfo since stackblitz doesnt seem to be able to run envinfo
System:
OS: macOS 11.4
CPU: (8) x64 Apple M1
Memory: 51.47 MB / 16.00 GB
Shell: 5.8 - /bin/zsh
Binaries:
Node: 16.4.1 - /usr/local/bin/node
Yarn: 1.22.10 - /usr/local/bin/yarn
npm: 7.18.1 - /usr/local/bin/npm
Browsers:
Chrome: 98.0.4758.80
Safari: 14.1.1
npmPackages:
@sveltejs/adapter-netlify: ^1.0.0-next.44 => 1.0.0-next.44
@sveltejs/kit: ^1.0.0-next.260 => 1.0.0-next.260
svelte: ^3.44.3 => 3.46.4
Severity
blocking an upgrade
Additional Information
No response
Issue Analytics
- State:
- Created 2 years ago
- Comments:8 (8 by maintainers)
Top Results From Across the Web
Error : SyntaxError: Unexpected end of JSON input
Your code is trying to parse an incomplete JSON string, just the first chunk. The most common approach is to declare an array...
Read more >Fullstack React - dashboard
data flow and interactivity is rigidly defined. In React, when the inputs for a component change, the framework simply re-renders that component.
Read more >ChangeLog - ftp
pop3: Sending POP3 command with ':' character caused an assert-crash. v2.3.18 ... NULL' failed o Bug 798680 - Not able to match a...
Read more >Shadow Endpoints In Svelte Kit - Weekly Svelte - YouTube
Our first course drop coming March 3rd https://www.youtube.com/watch?v=LATf_lVYoMQ https://github.com/sveltejs/kit/issues/3532 Sign up for ...
Read more >wordlist ranked - Massachusetts Institute of Technology
the of and to a in for is on s that by this with i you it not or be are from at...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
WOW, amazing, thank you so much @PH4NTOMiki !
JSON.stringify makes a string but then JSON.parse fails to parse it, because because of those html elements in the string, the HTML becomes malformed and it breaks.