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

watch callback is run twice when calling createApp in the callback #6614

Closed
deot opened this issue Sep 7, 2022 · 4 comments
Closed

watch callback is run twice when calling createApp in the callback #6614

deot opened this issue Sep 7, 2022 · 4 comments
Labels
❗ p4-important Priority 4: this fixes bugs that violate documented behavior, or significantly improves perf. regression

Comments

@deot
Copy link

deot commented Sep 7, 2022

Vue version

3.2.38

Link to minimal reproduction

SFC Playground

Steps to reproduce

  1. Open the demo@vue3.2.38
  2. After clicking it, two nodes will appear

CleanShot 2022-09-07 at 15 26 02

What is expected?

  1. open the demo@vue3.2.37
  2. After clicking it, one node will appear

CleanShot 2022-09-07 at 15 24 55

What is actually happening?

Two nodes will appear!!!

System Info

No response

Any additional comments?

No response

@tazyong
Copy link

tazyong commented Sep 7, 2022

@LinusBorg Both Vant's Toast component and Arco-Design's Message component are implemented using Vue.render. Here is the core code. demo

Duplicate of #6609

@LinusBorg
Copy link
Member

I'll keep this issue open and keep #6609 closed because this issue here as a minimal reproduction out of the gate and focusses on the actual issue.

@LinusBorg LinusBorg changed the title executed twice watch when using createApp watch callback is run twice when calling createApp in the callback Sep 7, 2022
@LinusBorg LinusBorg added the ❗ p4-important Priority 4: this fixes bugs that violate documented behavior, or significantly improves perf. label Sep 7, 2022
@edison1105
Copy link
Member

related to

}
flushPreFlushCbs()

@Akryum
Copy link
Member

Akryum commented Sep 28, 2022

@yyx990803 I can still reproduce the issue on a deployed app (Vue 3.2.39 in production mode) but it's very difficult to create a reproduction as it seems to be random. I guess there is a timing or race condition at play...

Here is a screenshot of requests failing becase watchers are being executed while unmounting components after changing route:
image

I will continue to investigate and try to narrow the issue down.

chrislone pushed a commit to chrislone/core that referenced this issue Feb 4, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Sep 21, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
❗ p4-important Priority 4: this fixes bugs that violate documented behavior, or significantly improves perf. regression
Projects
None yet
Development

No branches or pull requests

5 participants