Shopify / cli

Build apps, themes, and hydrogen storefronts for Shopify
https://shopify.dev
MIT License
432 stars 130 forks source link

Websocket makes dev server crash #3263

Closed dkcamargo closed 8 months ago

dkcamargo commented 10 months ago

Issue summary

when i start my Dev server on my machine for local development the server seems to not handle the web-socket comunication and makes the dev-server die.

I've tried:

Specs

Expected behavior

When running the dev server through npm run dev, the server should be able to keep serving for more then 10minutes.

Actual behavior

Seems to have an error handling the web-socket

20:36:38 │ remix      │ GET /app?embedded=1&hmac=c4c5b86c2889c6061935d0bdffed798dcf9be40a31c4a7fa37704415be4bd3a5&host=YWRtaW4uc2hvcGlmeS5jb20vc3RvcmUvcml2a2EtZXh0ZW5zaWJpbGl0eS10ZXN0aW5n&id_token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJodHRwczpcL1wvcml2a2EtZXh0ZW5zaWJpbGl0eS10ZXN0aW5nLm15c2hvcGlmeS5jb21cL2FkbWluIiwiZGVzdCI6Imh0dHBzOlwvXC9yaXZrYS1leHRlbnNpYmlsaXR5LXRlc3RpbmcubXlzaG9waWZ5LmNvbSIsImF1ZCI6ImM4MDliMjdiYTM3NWRiZDllZTJmODk4NjA2ZGFhMjY1Iiwic3ViIjoiODEyMzcyMTMzMzYiLCJleHAiOjE3MDQ5Mjk4NTYsIm5iZiI6MTcwNDkyOTc5NiwiaWF0IjoxNzA0OTI5Nzk2LCJqdGkiOiJjYmU5YTIwMS05MzAwLTRiOTgtODgzNi1iN2Y0ZDFkYjcxZDAiLCJzaWQiOiJjNWU2NDA5ZmNkZGJjZWMxMTgzMTVhMjliM2FkZTFlYzNiOTNkMzY3ZTNiMTE1NmQwYzA1NGVhOWM5ZTM1YmE3Iiwic2lnIjoiYmM1MjUxZjVjODEwYjkxZmM3YjA4YjZjZmYyNDIzMjI3YTc5NjlmZTc0MmIxNjk3ZmVkYmU2Nzc4Y2ExZTVkYyJ9.CPKXbeavUgmMguWnepcsyd81RrwaejHslPvYky7b784&locale=en-US&session=1e8d77bbe765b4f0d581e57580e74f6223dff5c0e727be04ab7ceefd5c95df17&shop=rivka-extensibility-testing.myshopify.com&timestamp=1704929796 200 - - 245.510 ms
20:36:39 │ remix      │ [shopify-app/INFO] Authenticating admin request
20:36:39 │ remix      │ [shopify-app/INFO] Authenticating admin request
20:36:39 │ remix      │ GET /app?embedded=1&hmac=c4c5b86c2889c6061935d0bdffed798dcf9be40a31c4a7fa37704415be4bd3a5&host=YWRtaW4uc2hvcGlmeS5jb20vc3RvcmUvcml2a2EtZXh0ZW5zaWJpbGl0eS10ZXN0aW5n&id_token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJodHRwczpcL1wvcml2a2EtZXh0ZW5zaWJpbGl0eS10ZXN0aW5nLm15c2hvcGlmeS5jb21cL2FkbWluIiwiZGVzdCI6Imh0dHBzOlwvXC9yaXZrYS1leHRlbnNpYmlsaXR5LXRlc3RpbmcubXlzaG9waWZ5LmNvbSIsImF1ZCI6ImM4MDliMjdiYTM3NWRiZDllZTJmODk4NjA2ZGFhMjY1Iiwic3ViIjoiODEyMzcyMTMzMzYiLCJleHAiOjE3MDQ5Mjk4NTYsIm5iZiI6MTcwNDkyOTc5NiwiaWF0IjoxNzA0OTI5Nzk2LCJqdGkiOiJjYmU5YTIwMS05MzAwLTRiOTgtODgzNi1iN2Y0ZDFkYjcxZDAiLCJzaWQiOiJjNWU2NDA5ZmNkZGJjZWMxMTgzMTVhMjliM2FkZTFlYzNiOTNkMzY3ZTNiMTE1NmQwYzA1NGVhOWM5ZTM1YmE3Iiwic2lnIjoiYmM1MjUxZjVjODEwYjkxZmM3YjA4YjZjZmYyNDIzMjI3YTc5NjlmZTc0MmIxNjk3ZmVkYmU2Nzc4Y2ExZTVkYyJ9.CPKXbeavUgmMguWnepcsyd81RrwaejHslPvYky7b784&locale=en-US&session=1e8d77bbe765b4f0d581e57580e74f6223dff5c0e727be04ab7ceefd5c95df17&shop=rivka-extensibility-testing.myshopify.com&timestamp=1704929796 200 - - 202.679 ms
Error forwarding websocket request: AggregateError
Error forwarding websocket request: AggregateError
Error forwarding websocket request: AggregateError
Error forwarding websocket request: AggregateError
Error forwarding websocket request: AggregateError
Error forwarding websocket request: AggregateError
Error forwarding websocket request: AggregateError
Error forwarding websocket request: AggregateError
Error forwarding websocket request: AggregateError
Error forwarding websocket request: AggregateError
Error forwarding websocket request: AggregateError
Error forwarding websocket request: AggregateError
Error forwarding websocket request: AggregateError
Error forwarding websocket request: AggregateError
Error forwarding websocket request: AggregateError
Error forwarding websocket request: AggregateError
Error forwarding websocket request: AggregateError
Error forwarding websocket request: AggregateError
Error forwarding websocket request: AggregateError
Error forwarding websocket request: AggregateError
Error forwarding websocket request: AggregateError
Error forwarding websocket request: AggregateError
Error forwarding websocket request: AggregateError
Error forwarding websocket request: AggregateError
Error forwarding websocket request: AggregateError
Error forwarding websocket request: AggregateError
Error forwarding websocket request: AggregateError
Error forwarding websocket request: AggregateError
Error forwarding websocket request: AggregateError
Error forwarding websocket request: AggregateError
Error forwarding websocket request: AggregateError
Error forwarding websocket request: AggregateError
Error forwarding websocket request: AggregateError
Error forwarding websocket request: AggregateError
Error forwarding websocket request: AggregateError
Error forwarding websocket request: AggregateError
Error forwarding websocket request: AggregateError
Error forwarding websocket request: AggregateError

Steps to reproduce the problem

  1. git clone this repo
  2. npm install
  3. npm run dev
AntonioChagoya commented 10 months ago

Are you using WSL?

dkcamargo commented 10 months ago

Hey, yes i've tried in WSL and in Powershell both of them same issue...

matteodepalo commented 9 months ago

Hi @dkcamargo I'm moving this to the cli repo. @Shopify/cli-foundations

github-actions[bot] commented 8 months ago

This issue seems inactive. If it's still relevant, please add a comment saying so. Otherwise, take no action. → If there's no activity within a week, then a bot will automatically close this. Thanks for helping to improve Shopify's dev tooling and experience.

P.S. You can learn more about why we stale issues here.

grantnilsson commented 8 months ago

Yes this is still active. I create the latest version of the Shopify Admin App using npm init @shopify/app@latest image And just started a debug window using 'Debug npm script' from VS Code and selecting 'npm run dev' and as soon as i go to Preview this new app (after installing to a brand new dev store), I immediately get this image I used to have no issues debugging admin apps prior to the change over to using Vite? Any help much appreciated as this is a major loss of functionality in working with the code