vuejs / core

🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
https://vuejs.org/
MIT License
47.57k stars 8.31k forks source link

Unhandled error during execution of scheduler flush. This is likely a Vue internals bug. #10815

Closed donghao-doc closed 3 days ago

donghao-doc commented 6 months ago

Vue version

3.4.21

Link to minimal reproduction

https://github.com/dongdong12138/vue3-bug-report

Steps to reproduce

  1. Please download and run the provided vue3-bug-report repository first.
  2. Open your browser’s console, wait a few seconds, and you will see some warnings and errors.

What is expected?

I expect that after the loading data changes, the page’s loading status can be updated.

What is actually happening?

When I modify the value of loading in the finally block, it indeed changes, but the page remains in the loading state. In my project, loading is an overlay effect, which causes the overlay to not disappear even though the value of loading has been changed to false.

System Info

No response

Any additional comments?

BTW, In my demo, when I comment out v-show, there are no more warnings or errors in the console.

jacekkarczmarczyk commented 6 months ago

Value returned by reqProductIndex doesn't have list property, so you're setting productList to undefined, undefined doesn't have length property

donghao-doc commented 6 months ago

Value returned by reqProductIndex doesn't have list property, so you're setting productList to undefined, undefined doesn't have length property

I'm aware of this, but I think that since the loading has been updated, the page’s loading status should also be updated accordingly. As for the error about the doesn't have length property, it can be prompted separately in the console.

Or am I understanding that you mean, since Vue has already thrown an error, it will not update the page anymore?

bsuooo commented 6 months ago

Value returned by reqProductIndex doesn't have list property, so you're setting productList to undefined, undefined doesn't have length property

I'm aware of this, but I think that since the loading has been updated, the page’s loading status should also be updated accordingly. As for the error about the doesn't have length property, it can be prompted separately in the console.

Or am I understanding that you mean, since Vue has already thrown an error, it will not update the page anymore?

Since the current component has thrown an error, it will no longer update this component. Other components on the page will update normally

edison1105 commented 3 days ago

As @bsuooo said.