Skip to content

Demo app broken when using the adapter with SvelteKit >= 1.0.0-next.356 #32

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
sfriedel opened this issue Jul 5, 2022 · 2 comments · Fixed by #34
Closed

Demo app broken when using the adapter with SvelteKit >= 1.0.0-next.356 #32

sfriedel opened this issue Jul 5, 2022 · 2 comments · Fixed by #34

Comments

@sfriedel
Copy link
Contributor

sfriedel commented Jul 5, 2022

While investigating why the integration tests in #29 continued to fail I saw that the /todos endpoint of the demo app is broken when using the svelte-adapter-appengine on SvelteKit versions >= 1.0.0-next.356.

Steps to reproduce:

yes "" | npm init svelte@next example-app
cd example-app
npm install
npm install --save-dev svelte-adapter-appengine
sed -i 's/@sveltejs\/adapter-auto/svelte-adapter-appengine/' svelte.config.js
npm run build
node .appengine_build_output/index.js

Afterwards open http://localhost:8080/todos in the browser. The browser will try to load the page but it will never complete. I tested this with Chrome and Firefox on Linux. Interestingly when using curl to fetch the same URL the response arrives immediately.

I also tried the same using the official SvelteKit node adapter but with the node adapter the page loads fine.

From the behavior I suspect the issue may be related to sveltejs/kit#5291 but I'm not exactly sure why this would lead to problems with the adapter.

@HalfdanJ
Copy link
Owner

HalfdanJ commented Jul 5, 2022

I'm also really puzzled by this. I've been trying to identify where the difference might lie between the standard node-adapter and this adapter, and the only difference that really makes sense to me is that esbuild is used to bundle the code. esbuild is also used in other adapters (like vercel and netify), but in those, polka isn't used for serving I think, making it slightly different setup.

HalfdanJ pushed a commit that referenced this issue Jul 5, 2022
Fixes #32. Compression is handled by appengine automatically anyways, so should be redundant
@HalfdanJ
Copy link
Owner

HalfdanJ commented Jul 5, 2022

Figured out the reason, its the compression middleware that does it. Not sure why its not giving issues in the node adapter, but i'm guessing it has to do with the bundling. But regardless, i dont think compression is needed. Appengine should be handling it automatically.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants