Skip to content

Fresh dies with "transport was disconnected" on hmr in firefox #3518

@MonstraG

Description

@MonstraG

Steps:

  1. install deno via curl -fsSL https://deno.land/install.sh | sh to make sure you get last (my distro has older version)
  2. deno clean
  3. deno run -Ar jsr:@fresh/init
  4. enter twice to not install tailwind or vscode stuff
  5. set "nodeModulesDir": "manual" in deno.json, otherwise it might not even run due to error 26 (I think it's VitePress fails to build deno#30424)
  6. deno i --allow-scripts (I don't know if I actually need to allow them but to make sure)
  7. deno task dev
  8. open the page in firefox (http://localhost:5173/) (important!)
  9. open assets/styles.css with editor like kate and press Ctrl+S without modifying anything.

server dies with:

GET http://localhost:5173/
Shared value hello
8:44:12 AM [vite] vite.config.ts changed, restarting server...
8:44:12 AM [vite] (ssr) hmr update /@id/fresh:server_entry
8:44:12 AM [vite] (ssr) hmr update /@id/fresh:server_entry (x2)
8:44:12 AM [vite] (client) page reload client.ts
8:44:12 AM [vite] (ssr) hmr update /@id/fresh:server_entry
8:44:12 AM [vite] (client) hmr update /assets/styles.css
8:44:12 AM [vite] (client) hmr update /@id/fresh-island::Counter.tsx
8:44:12 AM [vite] (ssr) hmr update /@id/fresh:server_entry
8:44:12 AM [vite] (client) hmr update /components/Button.tsx
8:44:12 AM [vite] (ssr) hmr update /@id/fresh:server_entry
8:44:12 AM [vite] (ssr) hmr update /@id/fresh:server_entry (x2)
8:44:12 AM [vite] (ssr) Error when evaluating SSR module fresh:server_entry: transport was disconnected, cannot call "fetchModule"
      at reviveInvokeError (/home/arsga/Downloads/fresh-project-3/node_modules/.deno/[email protected]/node_modules/vite/dist/node/module-runner.js:473:14)
      at Object.invoke (/home/arsga/Downloads/fresh-project-3/node_modules/.deno/[email protected]/node_modules/vite/dist/node/module-runner.js:547:11)
      at eventLoopTick (ext:core/01_core.js:179:7)
      at async SSRCompatModuleRunner.getModuleInformation (/home/arsga/Downloads/fresh-project-3/node_modules/.deno/[email protected]/node_modules/vite/dist/node/module-runner.js:1053:7)
      at async request (/home/arsga/Downloads/fresh-project-3/node_modules/.deno/[email protected]/node_modules/vite/dist/node/module-runner.js:1070:83)
      at async eval (fresh-route::__app:8:31)
      at async ESModulesEvaluator.runInlinedModule (/home/arsga/Downloads/fresh-project-3/node_modules/.deno/[email protected]/node_modules/vite/dist/node/module-runner.js:906:3)
      at async SSRCompatModuleRunner.directRequest (/home/arsga/Downloads/fresh-project-3/node_modules/.deno/[email protected]/node_modules/vite/dist/node/module-runner.js:1113:59)
      at async SSRCompatModuleRunner.directRequest (/home/arsga/Downloads/fresh-project-3/node_modules/.deno/[email protected]/node_modules/vite/dist/node/chunks/dep-Chhhsdoe.js:18607:22)
      at async SSRCompatModuleRunner.cachedRequest (/home/arsga/Downloads/fresh-project-3/node_modules/.deno/[email protected]/node_modules/vite/dist/node/module-runner.js:1031:73)
      at async eval (fresh:server-snapshot:11:31)
      at async ESModulesEvaluator.runInlinedModule (/home/arsga/Downloads/fresh-project-3/node_modules/.deno/[email protected]/node_modules/vite/dist/node/module-runner.js:906:3)
      at async SSRCompatModuleRunner.directRequest (/home/arsga/Downloads/fresh-project-3/node_modules/.deno/[email protected]/node_modules/vite/dist/node/module-runner.js:1113:59)
      at async SSRCompatModuleRunner.directRequest (/home/arsga/Downloads/fresh-project-3/node_modules/.deno/[email protected]/node_modules/vite/dist/node/chunks/dep-Chhhsdoe.js:18607:22)
      at async SSRCompatModuleRunner.cachedRequest (/home/arsga/Downloads/fresh-project-3/node_modules/.deno/[email protected]/node_modules/vite/dist/node/module-runner.js:1031:73)
      at async eval (fresh:server_entry:7:31)
      at async ESModulesEvaluator.runInlinedModule (/home/arsga/Downloads/fresh-project-3/node_modules/.deno/[email protected]/node_modules/vite/dist/node/module-runner.js:906:3)
      at async SSRCompatModuleRunner.directRequest (/home/arsga/Downloads/fresh-project-3/node_modules/.deno/[email protected]/node_modules/vite/dist/node/module-runner.js:1113:59)
      at async SSRCompatModuleRunner.directRequest (/home/arsga/Downloads/fresh-project-3/node_modules/.deno/[email protected]/node_modules/vite/dist/node/chunks/dep-Chhhsdoe.js:18607:22)
      at async SSRCompatModuleRunner.cachedRequest (/home/arsga/Downloads/fresh-project-3/node_modules/.deno/[email protected]/node_modules/vite/dist/node/module-runner.js:1031:73)
      at async SSRCompatModuleRunner.import (/home/arsga/Downloads/fresh-project-3/node_modules/.deno/[email protected]/node_modules/vite/dist/node/module-runner.js:992:10)
      at async instantiateModule (/home/arsga/Downloads/fresh-project-3/node_modules/.deno/[email protected]/node_modules/vite/dist/node/chunks/dep-Chhhsdoe.js:18580:10)
      at async https://jsr.io/@fresh/plugin-vite/1.0.4/src/plugins/dev_server.ts:72:23
error: Uncaught (in promise) Error: transport was disconnected, cannot call "fetchModule"
    at reviveInvokeError (file:///home/arsga/Downloads/fresh-project-3/node_modules/.deno/[email protected]/node_modules/vite/dist/node/module-runner.js:473:14)
    at Object.invoke (file:///home/arsga/Downloads/fresh-project-3/node_modules/.deno/[email protected]/node_modules/vite/dist/node/module-runner.js:547:11)
    at eventLoopTick (ext:core/01_core.js:179:7)
    ...

Versions:

deno 2.5.3
fresh and all dependencies - whatever would `deno i` give in this template at the time of writing:
fresh itself: 2.1.1
vite: 7.1.9
firefox: 143.0.3
os: EndeavorOS
kernel: 6.16.8-arch3-1 (64-bit)

I'm gonna again stress that you have to open the page in the browser.

Metadata

Metadata

Assignees

No one assigned

    Labels

    upstreamThe issue is with an upstream dependency.

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions