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#
- Run the app in StackBlitz
- Open the console
- Click "Add value"
- 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#

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
You might consider modifying
vueQueryState.valuetotoRaw(vueQueryState.value)during hydration. This approach could potentially resolve your issue: