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

"Request is outdated" on Vite preview sometimes #11

Open
kettanaito opened this issue Aug 19, 2024 · 2 comments
Open

"Request is outdated" on Vite preview sometimes #11

kettanaito opened this issue Aug 19, 2024 · 2 comments

Comments

@kettanaito
Copy link
Owner

This happens intermittently during the build sometimes:

Error: The server is being restarted or closed. Request is outdated
    at throwClosedServerError (file:///Users/kettanaito/Documents/web/vite-remix-og-image-plugin/node_modules/.pnpm/[email protected]_@[email protected]/node_modules/vite/dist/node/chunks/dep-Cy9twKMn.js:48746:15)
    at PluginContainer.resolveId (file:///Users/kettanaito/Documents/web/vite-remix-og-image-plugin/node_modules/.pnpm/[email protected]_@[email protected]/node_modules/vite/dist/node/chunks/dep-Cy9twKMn.js:48900:33)
    at ModuleGraph.resolveId (file:///Users/kettanaito/Documents/web/vite-remix-og-image-plugin/node_modules/.pnpm/[email protected]_@[email protected]/node_modules/vite/dist/node/chunks/dep-Cy9twKMn.js:62691:29)
    at ModuleGraph._resolveUrl (file:///Users/kettanaito/Documents/web/vite-remix-og-image-plugin/node_modules/.pnpm/[email protected]_@[email protected]/node_modules/vite/dist/node/chunks/dep-Cy9twKMn.js:62511:52)
    at ModuleGraph.getModuleByUrl (file:///Users/kettanaito/Documents/web/vite-remix-og-image-plugin/node_modules/.pnpm/[email protected]_@[email protected]/node_modules/vite/dist/node/chunks/dep-Cy9twKMn.js:62262:30)
    at addFromUrl (/node_modules/.pnpm/@[email protected]_@[email protected]_@[email protected]_@[email protected]_ty_ckffa5sne7pkspnm75mfxrd45e/node_modules/@remix-run/dev/dist/vite/styles.js:115:39)
    at /node_modules/.pnpm/@[email protected]_@[email protected]_@[email protected]_@[email protected]_ty_ckffa5sne7pkspnm75mfxrd45e/node_modules/@remix-run/dev/dist/vite/styles.js:122:65
    at Array.forEach (<anonymous>)
    at findDeps (/node_modules/.pnpm/@[email protected]_@[email protected]_@[email protected]_@[email protected]_ty_ckffa5sne7pkspnm75mfxrd45e/node_modules/@remix-run/dev/dist/vite/styles.js:122:36)
    at getStylesForFiles (/node_modules/.pnpm/@[email protected]_@[email protected]_@[email protected]_@[email protected]_ty_ckffa5sne7pkspnm75mfxrd45e/node_modules/@remix-run/dev/dist/vite/styles.js:78:13)
    at async Object.getStylesForUrl (/node_modules/.pnpm/@[email protected]_@[email protected]_@[email protected]_@[email protected]_ty_ckffa5sne7pkspnm75mfxrd45e/node_modules/@remix-run/dev/dist/vite/styles.js:165:16)
    at async requestHandler (/node_modules/.pnpm/@[email protected][email protected]/node_modules/@remix-run/server-runtime/dist/server.js:159:66)
    at async /node_modules/.pnpm/@[email protected]_@[email protected]_@[email protected]_@[email protected]_ty_ckffa5sne7pkspnm75mfxrd45e/node_modules/@remix-run/dev/dist/vite/cloudflare-proxy-plugin.js:70:25 {
  code: 'ERR_CLOSED_SERVER'
}

When looking at the preview, sometimes Vite spawns but the app is a blank page that has to be reloaded. Not sure if this is caused by the plugin, but it needs to make sure that if the browser opens such page, it reloads before proceeding with taking the screenshot.

@kettanaito
Copy link
Owner Author

This needs additional testing after #14, which moves the Vite preview server spawning to the beginning of the build (so it spawns as the build is in progress).

@kettanaito
Copy link
Owner Author

This happened to me once when running build while the serve was also running. Perhaps this error is an indicator that Vite preview conflicts with Vite build.

That shouldn't be the case anymore after #14, since those changes move vite preview to be in parallel with the build, but run it only when the build is complete.

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

No branches or pull requests

1 participant