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

App keeps reloading in Chrome with Shopify app dev CLI #1334

Closed
tuanda-mh opened this issue Aug 23, 2024 · 9 comments
Closed

App keeps reloading in Chrome with Shopify app dev CLI #1334

tuanda-mh opened this issue Aug 23, 2024 · 9 comments

Comments

@tuanda-mh
Copy link

I'm running shopify app dev using CLI in Chrome and I have updated the code following your "Hot module replacement and Firefox" problem but I still ran into the "app keeps reloading" bug. Please help

@tuanda-mh tuanda-mh changed the title App keeps reloading in Chrome App keeps reloading in Chrome with Shopify app dev CLI Aug 23, 2024
@dani-sanomads
Copy link

dani-sanomads commented Aug 23, 2024

Our team is facing similar problem in the chrome. It keeps on reconnecting again when we open any app page while running the app locally. @paulomarg , @lizkenyon , @mkevinosullivan

@bjorn278
Copy link

Same issue here, App keeps refreshing

@bjorn278
Copy link

@tuanda-mh @dani-sanomads Have you found a solution yet?

@Lancer92
Copy link

Lancer92 commented Aug 23, 2024

same issue, it's just start doing so today without any changes from our side.
"@shopify/app": "3.49.3",
"@shopify/cli": "3.49.3",

in the logs
14:28:44 │ web-backend │ [shopify-app/INFO] Running ensureInstalledOnShop
14:28:44 │ web-backend │ GET / 400 16 - 1.906 ms
14:28:44 │ web-backend │ [shopify-app/ERROR] ensureInstalledOnShop did not receive a shop query argument | {shop:
undefined}

I the devTools there are requests from vite that fails and causes reload
/
-h Accept "text/x-vite-ping"

@paulomarg
Copy link
Collaborator

Hey folks, thanks for reporting this. I can see this happening right away as well, and it is affecting apps other than this template, so it's likely not an issue with the app itself. I'm going to forward this to the team, and we'll investigate right away.

I'll get back to you when I know more.

@dani-sanomads
Copy link

It's related to cloudflare connection, i guess. When we use the ngrok for tunneling it works fine on all templates[Remix + Node]. @paulomarg

@akshay-commerce9
Copy link

Got a temporary solution. Use Ngrok tunnel

https://community.shopify.com/c/extensions/my-app-suddenly-can-t-find-extensions-in-app-preview/m-p/2727253#M3948

@paulomarg
Copy link
Collaborator

paulomarg commented Aug 23, 2024

I was just coming here to flag that @dani-sanomads, thanks for raising it! It seems that cloudflare tunnels are currently stripping away all of the search parameters, so the requests that reach the app server don't have a shop, and therefore fail.

For the others, you use an ngrok tunnel by:

  • Installing the ngrok CLI
  • Running ngrok http 3000 (or any other port)
    • Take note of the https address that creates
  • Running shopify app dev --tunnel-url=https://<address>:<port> (see documentation)

@paulomarg
Copy link
Collaborator

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

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

6 participants