Unhandled error during execution of watcher callback and scheduler flush

See original GitHub issue

Version

3.0.0

Reproduction link

https://codesandbox.io/s/vigorous-nash-8lxt8?file=/src/Child.vue

Steps to reproduce

  • click the increment button

What is expected?

this.$el should be defined inside of the watcher like in Vue 2

What is actually happening?

it is null

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
LinusBorgcommented, Sep 30, 2020

https://github.com/vuejs/vue-next/blob/5d825f318f1c3467dd530e43b09040d9f8793cce/packages/runtime-core/src/renderer.ts#L1427-L1432

  • updateComponentPreRender() sets the instance.vnode to the next vnode, and then calls all queued effects.
  • at that moment, the new vnode doesn’t have an element assigned
  • only after that does the new vnode get the element assigned.
0reactions
kleinfreundcommented, Oct 3, 2020

I now understand @LinusBorg’s investigation and think I can provide a fix for this. If that’s alright, I’d like to submit a pull request for this.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unhandled error during execution of scheduler flush. This is ...
The error was caused by trying to iterate through a non-iterable (in your case undefined ), using v-for . Specifically, before the call...
Read more >
Unhandled error during execution of render function vue3 ...
Hey while i reconstruct my app, i run into this warning and now my main application is not shown anymore. [Vue warn]: Unhandled...
Read more >
Unhandled error during execution of mounted hook at 错误_ ...
在使用Echarts图标绘制数据时,报错:unhandled error during execution of watcher callback,提示的原因是因为当年数据还未拿到时就开始渲染Echarts图表 ...
Read more >
Error in callback for watcher in Vue reading properties of null ...
Coding example for the question Error in callback for watcher in Vue ... Vue error makes no sense: Unhandled error during execution of...
Read more >
Routing is not working as expected after integrated API calls
And I get to see the this console error. copy. runtime-core.esm-bundler.js?d2dd:38 [Vue warn]: Unhandled error during execution of scheduler flush.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found