You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
in its setup. The fieldsByPath.value is a context object shared by its consumer. Which may already has been rendered in the vdom but not hydrated yet like report above.
The text was updated successfully, but these errors were encountered:
Although the prompt way of fix this issue seems questionable to me. (I don't have enough knowledge about suspense to say it is right or wrong with confident)
Is it actually actually okay to ignore a partially loaded component when update the tree?
Vue version
3.2.41
Link to minimal reproduction
https://github.com/mmis1000/vue-ssr-hydration-bug-report
Steps to reproduce
The Sync.vue is a bad component that tries to change the value from context before rendering, which is already tracked by its sibling component.
This would cause the AsyncWrapper to be re-rendered even it is not hydrated yet.
What is expected?
The app reports hydration mismatch but otherwise functions normally.
What is actually happening?
The whole app crashed with following error.
Uncaught (in promise) TypeError: can't access property "shapeFlag", vnode is null
System Info
Any additional comments?
The bug is caused by conflict between
core/packages/runtime-core/src/renderer.ts
Line 1231 in aa70188
core/packages/runtime-core/src/renderer.ts
Line 1494 in aa70188
During hydration, the
el
exists butsubtree
is actuallynull
.And when you trigger update in this case.
The second line above calls
core/packages/runtime-core/src/renderer.ts
Line 2306 in aa70188
This bug happened to me when I am using vee-validate in the nuxt3 and it does this
https://github.com/logaretm/vee-validate/blob/8ccfd2b2b542963d3d35cfe5f82490c94ec1635f/packages/vee-validate/src/useForm.ts#L526
in its setup. The
fieldsByPath.value
is a context object shared by its consumer. Which may already has been rendered in the vdom but not hydrated yet like report above.The text was updated successfully, but these errors were encountered: