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

[vue-query] broadcast client + nuxt DataCloneError #8356

Open
haakonmt opened this issue Nov 27, 2024 · 0 comments
Open

[vue-query] broadcast client + nuxt DataCloneError #8356

haakonmt opened this issue Nov 27, 2024 · 0 comments

Comments

@haakonmt
Copy link

haakonmt commented Nov 27, 2024

Describe the bug

When using the broadcast client with Nuxt (v3.14.1592), some actions, such as invalidations, will not be broadcasted correctly, seemingly due to the payload sent with postMessage not being serializable.

I have provided a screenshot showing the Firefox debugger with a breakpoint at postMessage. It shows that the data.queryKey field of the payload is a Proxy, which is probably likely to be the culprit?

Your minimal, reproducible example

https://stackblitz.com/edit/github-scuhgu?file=app.vue

Steps to reproduce

  1. Run the app in StackBlitz
  2. Open the console
  3. Click "Add value"
  4. Observe that there are errors in the console

Expected behavior

As a user, I expect the postMessage call to succeed, but it does not.

How often does this bug happen?

Every time

Screenshots or Videos

Error message in Chrome
Screenshot from Firefox showing how the queryKey is a Proxy

Platform

  • OS: MacOS Sonoma 14.6.1
  • Browser: Chrome/Firefox
  • Version: 131.0.6778.86/133.0b9 respectively

Tanstack Query adapter

vue-query

TanStack Query version

5.61.4

TypeScript version

5.7.2

Additional context

No response

@haakonmt haakonmt changed the title broadcastQueryClient + nuxt DataCloneError [vue-query] broadcast client + nuxt DataCloneError Nov 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant