Skip to content

[vue-query] Devtools is not mounted with @vue/server-renderer@3.5.31 while SSR #10374

Description

@n0099

Describe the bug

Due to renderToString() of @vue/server-renderer now will invoke cleanupContext(): https://github.com/vuejs/core/blame/fa23116437250b3fdec41112f276211cb284136e/packages/server-renderer/src/renderToString.ts#L98 that introduced in vuejs/core#14548,

thrownewError('Devtools is not mounted')
will always get thrown.

Your minimal, reproducible example

https://stackblitz.com/edit/tanstack-query-vodk6pjy?file=src%2FApp.vue

Steps to reproduce

  1. Open the preview of port 3000.
  2. Checkout the console of browser's devtools.
  3. Uncaught(inpromise) Error: Devtoolsisnotmountedunmount @tanstack_vue-query-devtools.js:157setup @tanstack_vue-query-devtools.js:350stopchunk-6BD2MEKE.js:483cleanupContext @vue_server-renderer.js:598renderToString @vue_server-renderer.js:949setupApp.vue:13createHookchunk-6BD2MEKE.js:5324callWithErrorHandlingchunk-6BD2MEKE.js:2412callWithAsyncErrorHandlingchunk-6BD2MEKE.js:2419__wehchunk-6BD2MEKE.js:5304flushPostFlushCbschunk-6BD2MEKE.js:2597render2chunk-6BD2MEKE.js:9042mountchunk-6BD2MEKE.js:6466mountchunk-6BD2MEKE.js:12725<anonymous>main.ts:5

Expected behavior

Not throwing.

How often does this bug happen?

Every time

Screenshots or Videos

No response

Platform

  • OS: NixOS
  • Browser: Firefox
  • Version: 148

Tanstack Query adapter

vue-query

TanStack Query version

5.96.1

TypeScript version

5.8.3

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions