Shopify / shopify-app-template-remix

374 stars 151 forks source link

Vite server server keeps refreshing. #837

Closed tajbowness closed 3 months ago

tajbowness commented 3 months ago

Hello,

This issue has only started occuring today. Everything was working perfectly fine yesterday. Also on my other project that I haven't touched in a week, is also getting the same issue.

Basically, the vite server keeps refreshing.

Image

Image

Browser console error logs

Image

Browser console info logs

In vite.config.js,

if (host === "localhost") {
  hmrConfig = {
    protocol: "ws",
    host: "localhost",
    port: 64999,
    clientPort: 64999,
  };
} else {
  hmrConfig = {
    protocol: "wss",
    host: host,
    port: parseInt(process.env.FRONTEND_PORT) || 8002,
    clientPort: 443,
  };
}

For now I've had to change the clientPort to something other than 443, which stops the issue, but you lose HMR.

Unsure if this issue should be posted to the this repo, so please move it if necessary. I believe it's a Shopify issue as creating a test remix app like this npx create-remix@latest , the issue doesn't occur. And someone on Shopify forums reported the same problem today.

https://community.shopify.com/c/shopify-apps/continuous-re-auth-by-shopify-admin-api/m-p/2726541#M82476

I'm on Chrome. But it's also occuring on Edge.

anhdd-kuro commented 3 months ago

Same here

vincaslt commented 3 months ago

Also getting the same issue, started getting it yesterday on an existing application, so decided to test on a completely fresh shopify app init project - also keeps refreshing.

Browser console says failed to connect to cloudflared tunnel wss://. I'm on the latest CLI version (just upgraded from npm).

JasmeetKaurVT14313 commented 3 months ago

Same here

Detek001 commented 3 months ago

same here and my checkout extension doesnt load:

Image

ccarlosm commented 3 months ago

same here

NavasMuhammed commented 3 months ago

same here

Image

skamarakas commented 3 months ago

+1

dani-sanomads commented 3 months ago

We are having exactly same issue

AEmre23 commented 3 months ago

same here

omeryucel-extra commented 3 months ago

same

yosef-grant commented 3 months ago

we're having the same issue. tried updating to the latest version of the CLI (3.66.0) but no change.

Image

CurtisPine commented 3 months ago

Also experiencing this issue. Cannot run any app at the moment.

SiddharthSham commented 3 months ago

Same here!

myrkoharmatiy commented 3 months ago

+1

themistoklis-bogiatzoglou commented 3 months ago

Workaround until they fix this:

  1. Install ngrok in your system.
  2. Create a free account in ngrok. And go to Domains and create a Domain and copy it.
  3. Run ngrok,exe
  4. Then change the port number in command from 80 to 8080 . Run the command in local to create a tunnel. eg. ngrok http --domain=xxx-xxxxxxxxx-xxxxxx.ngrok-free.app 80805
  5. In your shopify project run npm run dev -- --tunnel-url="xxx-xxxxxxxxx-xxxxxx.ngrok-free.app:8080"
tnishikata commented 3 months ago

same here

akshay-commerce9 commented 3 months ago

The above suggested is a temporary solution.It will work. Please note that the both ports need to be same. If you are creating ngrok tunnel on the port, the same port should be used with npm run command. If 8080 is using any other service you can use other unused port.

paulomarg commented 3 months ago

Hey folks, thanks for reporting this. It seems that cloudflare tunnels are stripping away all of the search parameters, and that causes app loads to fail.

As mentioned, the best workaround at the moment is to use e.g. ngrok (or any other tunnel software you want):

paulomarg commented 3 months ago

It seems that cloudflare tunnels are working again, so I'm going to close this issue.