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

ClientOnly placeholder hydration error #14979

Closed
Kolobok12309 opened this issue Sep 20, 2022 · 1 comment
Closed

ClientOnly placeholder hydration error #14979

Kolobok12309 opened this issue Sep 20, 2022 · 1 comment

Comments

@Kolobok12309
Copy link
Contributor

Kolobok12309 commented Sep 20, 2022

Environment

From stackblits
Nuxi 3.0.0-rc.10 20:34:00
RootDir: /home/projects/github-daawqv 20:34:00
Nuxt project info: 20:34:00


  • Operating System: Linux
  • Node Version: v16.14.2
  • Nuxt Version: 3.0.0-rc.10
  • Nitro Version: 0.5.4
  • Package Manager: npm@7.17.0
  • Builder: vite
  • User Config: -
  • Runtime Modules: -
  • Build Modules: -

Reproduction

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

Describe the bug

After upgrade from rc.3 to rc.10 getting this bug
While i use ClientOnly component with slots, after mount vue give error this hydration mismatch

Additional context

After some debug, while ssr, context property slots is empty object for this component(mb for all, i don't use render function from setup)

https://github.com/nuxt/framework/blob/6309d223bb247764e32e90d196aca5fd4b913805/packages/nuxt/src/app/components/client-only.mjs#L7-L18

UPD:
I fully copy ClientOnly code to another component and all work normally

Logs

[Vue warn]: Hydration node mismatch:
- Client vnode: Symbol(Fragment) 
- Server rendered DOM: <span>​server prop​</span>​  
  at <ClientOnly placeholder="server prop" > 
  at <App key=1 > 
  at <NuxtRoot>
warn2 @ vue.js?v=474e5c07:1272
handleMismatch @ vue.js?v=474e5c07:5065
onMismatch @ vue.js?v=474e5c07:4866
hydrateNode @ vue.js?v=474e5c07:4921
hydrateSubTree @ vue.js?v=474e5c07:5586
componentUpdateFn @ vue.js?v=474e5c07:5596
run @ vue.js?v=474e5c07:386
instance.update @ vue.js?v=474e5c07:5698
setupRenderEffect @ vue.js?v=474e5c07:5706
mountComponent @ vue.js?v=474e5c07:5531
hydrateNode @ vue.js?v=474e5c07:4936
hydrateChildren @ vue.js?v=474e5c07:5034
hydrateElement @ vue.js?v=474e5c07:5002
hydrateNode @ vue.js?v=474e5c07:4931
hydrateSubTree @ vue.js?v=474e5c07:5586
componentUpdateFn @ vue.js?v=474e5c07:5596
run @ vue.js?v=474e5c07:386
instance.update @ vue.js?v=474e5c07:5698
setupRenderEffect @ vue.js?v=474e5c07:5706
mountComponent @ vue.js?v=474e5c07:5531
hydrateNode @ vue.js?v=474e5c07:4936
hydrateSuspense @ vue.js?v=474e5c07:2450
hydrateNode @ vue.js?v=474e5c07:4959
hydrateSubTree @ vue.js?v=474e5c07:5586
componentUpdateFn @ vue.js?v=474e5c07:5596
run @ vue.js?v=474e5c07:386
instance.update @ vue.js?v=474e5c07:5698
setupRenderEffect @ vue.js?v=474e5c07:5706
mountComponent @ vue.js?v=474e5c07:5531
hydrateNode @ vue.js?v=474e5c07:4936
hydrate2 @ vue.js?v=474e5c07:4857
mount @ vue.js?v=474e5c07:4724
app.mount @ vue.js?v=474e5c07:8596
initApp @ entry.mjs:52
await in initApp (async)
(anonymous) @ entry.mjs:60
Show 4 more frames
vue.js?v=474e5c07:4861 Hydration completed but contains mismatches.
@mohammad-ashrafi2020
Copy link

It has been already reported: #14896

@danielroe danielroe added the 3.x label Jan 19, 2023
@danielroe danielroe transferred this issue from nuxt/framework Jan 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants