Subscribe on changes!

defineAsyncComponent onError

avatar
Mar 23rd 2023

Vue version

3.2.45

Link to minimal reproduction

https://github.com/nestle49/FoodSoul

Steps to reproduce

For reproduction:

  1. Install packages yarn && yarn dev
  2. Inside src/pages/MainPage.vue change params inside in this line on non-exist, for example 'Test2' const { dynamicLoadComponent } = useDynamicLoadComponent('Test');
  3. Refresh page -> infinity loading

If remove onError, SPA working fine

For any projects:

  1. Create SPA with vue & vite ssr;
  2. Create dynamically component with defineAsyncComponent;
  3. Use onError callback inside defineAsyncComponent on ssr;

Crash application with error on server side: Error: [vite-plugin-ssr@0.4.68] Hook timeout: the render() hook of /renderer/_default.page.server.ts didn't finish after 40 seconds

On client side everything is fine

What is expected?

SPA works with ssr

What is actually happening?

Error: [vite-plugin-ssr@0.4.68] Hook timeout: the render() hook of /renderer/_default.page.server.ts didn't finish after 40 seconds

What is actually happening?

Any ideas

System Info

System:
    OS: macOS 13.0.1
    CPU: (8) arm64 Apple M1
    Memory: 327.75 MB / 16.00 GB
    Shell: 5.8.1 - /bin/zsh
Binaries:
    Node: 16.15.0 - ~/.nvm/versions/node/v16.15.0/bin/node
    Yarn: 1.22.19 - ~/.nvm/versions/node/v16.15.0/bin/yarn
    npm: 8.5.5 - ~/.nvm/versions/node/v16.15.0/bin/npm
Browsers:
    Chrome: 109.0.5414.119
    Firefox: 106.0.1
    Safari: 16.1
npmPackages:
    vue: ^3.2.45 => 3.2.45

Any additional comments?

No response

avatar
Mar 23rd 2023

You opened the same issue a month ago #7661

avatar
Mar 24th 2023

A Galaxy far, far away...