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

Dev server stops responding to fetch requests #11644

Closed
7 tasks done
matthargett opened this issue Jan 9, 2023 · 2 comments
Closed
7 tasks done

Dev server stops responding to fetch requests #11644

matthargett opened this issue Jan 9, 2023 · 2 comments
Labels
cannot reproduce The bug cannot be reproduced pending triage

Comments

@matthargett
Copy link

Describe the bug

Possibly related to #11468 , but in a very small application without many imports and running on Windows.

I can reproduce this problem with both node v18.13.0 and v19.3.0 running on Windows 10 and 11. This happens even with Windows Firewall completely disabled. A reduction is in this public repo:
https://github.com/rebeckerspecialties/threejs-tests

Using npm run preview -- --host works fine on the first page load, and all subsequent loads.

Using npm run dev, the server starts. Sometimes, but not always, the first page fetch will work fine and then fail when a second page load happens -- including from a secondary device. Often, the first fetch will also fail. Here is the relevant log lines, and a screenshot from the Network tab of DevTools

2023-01-09T19:43:20.639Z vite:cache [memory] /src/drawables/Floor/Floor.tsx
2023-01-09T19:43:20.640Z vite:time 1.02ms /src/drawables/Floor/Floor.tsx
2023-01-09T19:43:20.640Z vite:load 173.37ms [plugin] /node_modules/.vite/deps/chunk-IQ246GUW.js?v=fce32697
2023-01-09T19:43:20.659Z vite:import-analysis 14.40ms [1 imports rewritten] node_modules\.vite\deps\chunk-IQ246GUW.js?v=fce32697
2023-01-09T19:43:20.659Z vite:transform 19.15ms /node_modules/.vite/deps/chunk-IQ246GUW.js?v=fce32697
2023-01-09T19:43:20.667Z vite:cache [memory] /node_modules/.vite/deps/chunk-4EOJPDL2.js?v=fce32697
2023-01-09T19:43:20.671Z vite:load 160.09ms [plugin] /node_modules/.vite/deps/chunk-KEMJW5FU.js?v=fce32697
2023-01-09T19:43:20.685Z vite:import-analysis 9.99ms [1 imports rewritten] node_modules\.vite\deps\chunk-KEMJW5FU.js?v=fce32697
2023-01-09T19:43:20.685Z vite:transform 14.48ms /node_modules/.vite/deps/chunk-KEMJW5FU.js?v=fce32697
2023-01-09T19:43:20.691Z vite:cache [memory] /node_modules/.vite/deps/chunk-4EOJPDL2.js?v=fce32697
2023-01-09T19:43:20.912Z vite:cache [memory] /src/drawables/HighlightedText/HighlightedText.tsx
2023-01-09T19:43:20.912Z vite:time 1.15ms /src/drawables/HighlightedText/HighlightedText.tsx
2023-01-09T19:43:20.914Z vite:cache [memory] /src/drawables/ImmersiveStats/ImmersiveStats.tsx
2023-01-09T19:43:20.914Z vite:time 1.50ms /src/drawables/ImmersiveStats/ImmersiveStats.tsx
2023-01-09T19:43:20.916Z vite:cache [memory] /src/drawables/InstancedBlocks/InstancedBlocks.tsx
2023-01-09T19:43:20.916Z vite:time 1.38ms /src/drawables/InstancedBlocks/InstancedBlocks.tsx
2023-01-09T19:43:20.917Z vite:cache [memory] /node_modules/.vite/deps/chunk-4EOJPDL2.js?v=fce32697
2023-01-09T19:43:20.917Z vite:time 0.75ms /node_modules/.vite/deps/chunk-4EOJPDL2.js?v=fce32697
2023-01-09T19:43:20.918Z vite:cache [memory] /src/drawables/Button/Button.tsx
2023-01-09T19:43:20.918Z vite:time 0.98ms /src/drawables/Button/Button.tsx
2023-01-09T19:43:20.919Z vite:cache [memory] /node_modules/.vite/deps/chunk-YN3MIK7E.js?v=fce32697
2023-01-09T19:43:20.919Z vite:time 0.37ms /node_modules/.vite/deps/chunk-YN3MIK7E.js?v=fce32697
2023-01-09T19:43:20.920Z vite:cache [memory] /node_modules/.vite/deps/chunk-PO47HZDL.js?v=fce32697
2023-01-09T19:43:20.920Z vite:time 0.31ms /node_modules/.vite/deps/chunk-PO47HZDL.js?v=fce32697
2023-01-09T19:43:20.923Z vite:cache [memory] /node_modules/.vite/deps/chunk-IQ246GUW.js?v=fce32697
2023-01-09T19:43:20.923Z vite:time 0.33ms /node_modules/.vite/deps/chunk-IQ246GUW.js?v=fce32697
2023-01-09T19:43:20.928Z vite:cache [memory] /src/drawables/SampleBoxes/SampleBoxes.tsx
2023-01-09T19:43:20.928Z vite:time 0.92ms /src/drawables/SampleBoxes/SampleBoxes.tsx
2023-01-09T19:43:20.929Z vite:cache [memory] /node_modules/.vite/deps/chunk-SM667DEW.js?v=fce32697
2023-01-09T19:43:20.929Z vite:time 0.34ms /node_modules/.vite/deps/chunk-SM667DEW.js?v=fce32697

the chunk fetch that hangs is the W5FU one. the transform appears to be successful, but then the fetch is never serviced:

2023-01-09T19:43:20.671Z vite:load 160.09ms [plugin] /node_modules/.vite/deps/chunk-KEMJW5FU.js?v=fce32697
2023-01-09T19:43:20.685Z vite:import-analysis 9.99ms [1 imports rewritten] node_modules\.vite\deps\chunk-KEMJW5FU.js?v=fce32697
2023-01-09T19:43:20.685Z vite:transform 14.48ms /node_modules/.vite/deps/chunk-KEMJW5FU.js?v=fce3269

20230109_115152_HoloLens

Reproduction

https://github.com/rebeckerspecialties/threejs-tests

Steps to reproduce

on Windows 10/11 with nodejs v18.13.0 or v19.3.0:
npm install
npm run dev

load the page from another device. if it does load correctly, either manually refresh on the second device or try loading the page on a third device. it should not load and eventually display a Timeout error message in the browser.

System Info

System:
    OS: Windows 10 10.0.22621
    CPU: (8) x64 Intel(R) Core(TM) i7-8650U CPU @ 1.90GHz
    Memory: 5.12 GB / 15.92 GB
  Binaries:
    Node: 18.13.0 - C:\Program Files\nodejs\node.EXE
    npm: 9.2.0 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Edge: Spartan (44.22621.963.0), Chromium (108.0.1462.76), ChromiumDev (110.0.1556.0)
    Internet Explorer: 11.0.22621.1
  npmPackages:
    @vitejs/plugin-basic-ssl: ^1.0.1 => 1.0.1
    @vitejs/plugin-react: ^3.0.1 => 3.0.1
    vite: ^4.0.4 => 4.0.4

Used Package Manager

npm

Logs

No response

Validations

@sapphi-red sapphi-red added the cannot reproduce The bug cannot be reproduced label Jan 10, 2023
@fc
Copy link
Contributor

fc commented Jan 10, 2023

For me, that specific type of infinite pending requests issue was resolved by not using vite's proxy/dev server. We're using a separate proxy for all of the requests.
#11468 (comment)
I was never able to get anything useful out of the vite logs and I narrowed down the suspect to be http. There might be some magical config to set on vite's http that would solve it but in everything I tried, it did not resolve. In the separate proxy we setup, we needed to set the max connections per host limit to 100 but setting a similar setting on http did not resolve it.

What we really need is a small reproduction... if we can get that, we'll definitely get one step closer to figuring this out.

@patak-dev
Copy link
Member

Let's close this as duplicate of #11468

@github-actions github-actions bot locked and limited conversation to collaborators Apr 22, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cannot reproduce The bug cannot be reproduced pending triage
Projects
None yet
Development

No branches or pull requests

4 participants