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

[🐞] Unknown messages throw an error on PrefetchServiceWorker #6921

Open
DustinJSilk opened this issue Sep 28, 2024 · 0 comments · May be fixed by #6942
Open

[🐞] Unknown messages throw an error on PrefetchServiceWorker #6921

DustinJSilk opened this issue Sep 28, 2024 · 0 comments · May be fixed by #6942
Labels
STATUS-1: needs triage New issue which needs to be triaged TYPE: bug Something isn't working

Comments

@DustinJSilk
Copy link
Contributor

Which component is affected?

Qwik Runtime

Describe the bug

Unknown messages to the PrefetchServiceWorker should thrown an error with console.error('UNKNOWN MESSAGE:', msg);

Because of this line here, if the message is not an array, slice doesn't exist and the function throws an error which is difficult to debug:

  state.$log$('received message:', type, msg[1], msg.slice(2));

The type should be set as unknown and then validated first as a Qwik message before continuing.

Reproduction

N/A

Steps to reproduce

No response

System Info

na

Additional Information

No response

@DustinJSilk DustinJSilk added STATUS-1: needs triage New issue which needs to be triaged TYPE: bug Something isn't working labels Sep 28, 2024
@DustinJSilk DustinJSilk linked a pull request Oct 7, 2024 that will close this issue
5 tasks
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.

1 participant