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

Timeouts for async components are not cleared, blocking node on ssr #9648

Closed
ahus1 opened this issue Mar 7, 2019 · 4 comments · Fixed by #9649
Closed

Timeouts for async components are not cleared, blocking node on ssr #9648

ahus1 opened this issue Mar 7, 2019 · 4 comments · Fixed by #9649

Comments

@ahus1
Copy link
Contributor

ahus1 commented Mar 7, 2019

Version

2.6.9

Reproduction link

Vue:

Nuxt:

Steps to reproduce

Vue:

  • Add an async component with a delay/timeout
  • When the real component is rendered and the loading and error components never showed, the timeouts are not cleared, but will be triggered.

Nuxt:

What is expected?

Vue:

  • When component is rendered, the timeout and delay timeouts should be cleared if the haven't fired yet.

Nuxt:

  • generation should complete without an error

What is actually happening?

Vue:

  • Timeouts for delay and timeout fire after the component has been rendered.

Nuxt:

  • node blocks after rendering. Nuxt presents and error message:

The command 'nuxt generate' finished but did not exit after 5s
This is most likely not caused by a bug in Nuxt.js
Make sure to cleanup all timers and listeners you or your plugins/modules start.
Nuxt.js will now force exit 

DeprecationWarning: Starting with Nuxt version 3 this will be a fatal error

This happens both for timeout and loading elements. I'm about to submit a PR submitted as #9649.

@posva
Copy link
Member

posva commented Mar 7, 2019

Please provide a boiled down repro when reporting a bug (no nuxt) thanks!

@posva posva closed this as completed Mar 7, 2019
@ahus1
Copy link
Contributor Author

ahus1 commented Mar 7, 2019

@posva - can you please help me and point me to a minimal SSR example that writes generated files to disk? With a standard SSR example from https://ssr.vuejs.org/ with a permanently running node instance I think I can't show the dangling timeouts. Thanks!

@tpiros
Copy link

tpiros commented Mar 14, 2019

I have run into the same issue @ahus1 - have you heard back from anyone regarding this?

@ahus1
Copy link
Contributor Author

ahus1 commented Mar 15, 2019

@posva - I've updated the ticket to show the late-triggering timeouts with a pure-Vue example. Is that sufficient?

Vue:

@LinusBorg LinusBorg reopened this Mar 16, 2019
kiku-jw pushed a commit to kiku-jw/vue that referenced this issue Jun 18, 2019
Lostlover pushed a commit to Lostlover/vue that referenced this issue Dec 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants