Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

HTML streaming not working with Remix app #966

Closed
1 task done
tom-sherman opened this issue Feb 17, 2023 · 5 comments
Closed
1 task done

HTML streaming not working with Remix app #966

tom-sherman opened this issue Feb 17, 2023 · 5 comments
Labels

Comments

@tom-sherman
Copy link

Describe the bug

When I run this locally, page is rendered as HTML with the suspense boundary as "Loading..." then the promise resolves on the server and is streamed to the client, and the "Loading..." changes to "Hello World".

On stackblitz though, no data is sent until the entire response is done (and so you see no "Loading..." state)

Link to the blitz that caused the error

https://stackblitz.com/edit/remix-starter-updated-t1fani?file=app%2Froutes%2Findex.tsx,app%2Fentry.server.tsx

Steps to reproduce

  1. Open the linked blits
  2. Load the index route

Expected behavior

See a Loading... message, and then this changes to "Data: Hello World"

Parity with Local

Screenshots

No response

Platform

Browser name  = Chrome
Full version  = 110.0.0.0
Major version = 110
navigator.appName = Netscape
navigator.userAgent = Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36
performance.memory = {
  "totalJSHeapSize": 83867546,
  "usedJSHeapSize": 82016534,
  "jsHeapSizeLimit": 4294705152
}
Hash = 927bd077ab89da68c6338c4363cc22e79cccb4ef

Additional context

No response

@jrvidal
Copy link
Contributor

jrvidal commented Feb 17, 2023

👋 Thanks for the report. You're correct, the preview window does not properly stream the response back. This is something we haven't got around implementing.

We're tracking this internally now (thanks!).

@tom-sherman
Copy link
Author

@jrvidal I also couldn't get streaming to work when I opened the preview window in a new tab btw

@jrvidal
Copy link
Contributor

jrvidal commented Feb 17, 2023

Yes, that is expected 👍 It's an issue with our networking stack.

@Rich-Harris
Copy link

Chiming in with sveltejs/learn.svelte.dev#352, so that the issues are linked on GitHub! This is currently blocking us from documenting streaming behaviour on learn.svelte.dev, unfortunately

@Nemikolh
Copy link
Member

Hey everyone! We have added initial support for HTTP streaming! 🎉

@tom-sherman, I have tested your example and we can now see Loading.. before Data: Hello World!.

@Rich-Harris, I've tested your PR and it also works!

I'll be on the lookout for performance regressions, so if you notice anything please let me know! 😃

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

No branches or pull requests

4 participants