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

[🐞] TextEncoderStream polyfill breaks resumability #6458

Closed
mhuretski opened this issue Jun 4, 2024 · 4 comments · Fixed by #6466
Closed

[🐞] TextEncoderStream polyfill breaks resumability #6458

mhuretski opened this issue Jun 4, 2024 · 4 comments · Fixed by #6466
Labels
STATUS-1: needs triage New issue which needs to be triaged TYPE: bug Something isn't working

Comments

@mhuretski
Copy link
Contributor

Which component is affected?

Qwik Runtime

Describe the bug

In qwik-city 1.5.5 new TextEncoderStream polyfill was introduced.

When deployed to Cloudflare useLexicalScope might return undefined for signals in some weird scenarios. Or qrls might stop working or anything else due to errors during resumability on client.
I assume it occurs due to encoding issues, for example with new TextEncoderStream containers have class="qc�" when in 1.5.4 class="qc📦". Some other symbols might also be corrupted, so qwik can't resume containers in edge cases.

Issue might not be reproducible if amount or sequence of counters is different or even if something irrelevant is removed like head nodes somewhere else.

Reproduction

https://github.com/mhuretski/qwik-starter-1djsma

Steps to reproduce

qwik-city 1.5.4 https://30efff55.check-qwik-155.pages.dev/ (OK)
qwik-city 1.5.5:

  1. click any of first 2 buttons
  2. in 1.5.5 version containers are resumed corrupted when in 1.5.4 it's ok.

System Info

cloudflare pages, qwik-city 1.5.5

Additional Information

No response

@mhuretski mhuretski added STATUS-1: needs triage New issue which needs to be triaged TYPE: bug Something isn't working labels Jun 4, 2024
@octet-stream
Copy link
Contributor

Can confirm the 📦 emoji is busted up by this polyfill and that everything works in dev/preview mode (under Node.js), so I definitely messed up the encoding and I think I know where to look.

@octet-stream
Copy link
Contributor

octet-stream commented Jun 7, 2024

@PatrickJS was this #6373 change released? Because the issue is seem to be related and I am working on fixing my polyfill.

UPD: Never mind, I already see your fix not part of 1.5.5

@octet-stream
Copy link
Contributor

@mhuretski you can test the fix by installing qwik-city from here: #6466 (comment)

@PatrickJS
Copy link
Member

yeah, you have to setup Cloudflare to use nodejs api for 1.5.5 for it to work otherwise in the next release 1.5.6 it will work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
STATUS-1: needs triage New issue which needs to be triaged TYPE: bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants