vitejs / vite

Next generation frontend tooling. It's fast!
http://vite.dev
MIT License
68.55k stars 6.19k forks source link

Random errors using dev server in Firefox: "Loading failed for the module with source" & NS_ERROR_NET_PARTIAL_TRANSFER #18182

Closed jordanade closed 1 week ago

jordanade commented 1 month ago

Describe the bug

Running VITE v5.4.7 and LARAVEL v10.48.22 (plugin v1.0.5). Running "npm run dev". Using Firefox 130 on Mac. Using about 40 inputs.

Page loads only work roughly half the time. Often one or more modules will fail to load. Seems to happen more on initial page load but not always.

Console shows "Loading failed for the module with source XXX". Network inspector shows modules failed with NS_ERROR_NET_PARTIAL_TRANSFER error.

Works fine on Chrome.

Reproduction

I can't do this at the moment (understand this is a problem) but wanted to put this issue in so others could find it.

Steps to reproduce

Run dev server with many inputs configured, open in Firefox.

System Info

System:
    OS: macOS 14.6
    CPU: (8) x64 Apple M2
    Memory: 24.99 MB / 16.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 18.20.1 - /usr/local/opt/node@18/bin/node
    npm: 10.5.0 - /usr/local/opt/node@18/bin/npm
  Browsers:
    Chrome: 129.0.6668.59
    Safari: 17.6
  npmPackages:
    vite: ^5.4 => 5.4.7

Used Package Manager

npm

Logs

Nothing out of ordinary seen in logs when errors occur ``` vite:cache [memory] /resources/js/autocompleter.js +3ms vite:time 0.16ms /resources/js/autocompleter.js +2ms vite:cache [memory] /node_modules/.vite/deps/bootstrap-sass_assets_javascripts_bootstrap_tab__js.js?v=d2f26588 +0ms vite:time 0.20ms /node_modules/.vite/deps/bootstrap-sass_assets_javascripts_bootstrap_tab__js.js?v=d2f26588 +0ms vite:cache [memory] /node_modules/.vite/deps/tinymce_tinymce.js?v=d2f26588 +0ms vite:time 65.05ms /node_modules/.vite/deps/tinymce_tinymce.js?v=d2f26588 +65ms vite:cache [memory] /node_modules/.vite/deps/tinymce_themes_silver_theme.js?v=d2f26588 +96ms vite:time 38.25ms /node_modules/.vite/deps/tinymce_themes_silver_theme.js?v=d2f26588 +69ms vite:cache [memory] /node_modules/.vite/deps/tinymce_plugins_quickbars.js?v=d2f26588 +70ms vite:time 5.75ms /node_modules/.vite/deps/tinymce_plugins_quickbars.js?v=d2f26588 +35ms vite:cache [memory] /node_modules/.vite/deps/tinymce_plugins_autolink.js?v=d2f26588 +5ms vite:time 0.38ms /node_modules/.vite/deps/tinymce_plugins_autolink.js?v=d2f26588 +2ms vite:cache [memory] /node_modules/.vite/deps/tinymce_plugins_autoresize.js?v=d2f26588 +1ms vite:time 0.26ms /node_modules/.vite/deps/tinymce_plugins_autoresize.js?v=d2f26588 +1ms vite:cache [memory] /node_modules/.vite/deps/tinymce_plugins_lists.js?v=d2f26588 +0ms vite:time 2.97ms /node_modules/.vite/deps/tinymce_plugins_lists.js?v=d2f26588 +3ms vite:cache [memory] /node_modules/.vite/deps/tinymce_plugins_table.js?v=d2f26588 +5ms vite:time 3.92ms /node_modules/.vite/deps/tinymce_plugins_table.js?v=d2f26588 +6ms vite:cache [memory] /node_modules/.vite/deps/tinymce_plugins_link.js?v=d2f26588 +6ms vite:time 1.52ms /node_modules/.vite/deps/tinymce_plugins_link.js?v=d2f26588 +4ms vite:cache [memory] /node_modules/.vite/deps/tinymce_plugins_media.js?v=d2f26588 +3ms vite:time 1.56ms /node_modules/.vite/deps/tinymce_plugins_media.js?v=d2f26588 +2ms ```

Validations

bluwy commented 1 week ago

Closing as it can't be reproduced. There's not much we can do with the information and there hasn't been similar reports of it.

numfin commented 1 week ago

@bluwy problem occurs when you have monorepo. For example: 1 package with ui components, 2 package is app. When you stat app with dev server and open page from firefox - you get: Loading failed for the module with source “http://localhost:5173/@fs/path_to_package1/filename.js”.

jordanade commented 1 week ago

@bluwy problem occurs when you have monorepo. For example: 1 package with ui components, 2 package is app. When you stat app with dev server and open page from firefox - you get: Loading failed for the module with source “http://localhost:5173/@fs/path_to_package1/filename.js”.

Thanks @numfin , can you explain more? Are you saying this is an issue anytime there's more than one "entry"?

numfin commented 1 week ago

@jordanade i'm not sure. I just have monorepo project and when i open main app with imported component library - i get this err in firefox (just reporting the problem, not solving it)