Cannot connect development store to local app

Last week I spun up a new Shopify App and haven’t had any issues running it until yesterday when suddenly, running shopify app dev launches the store with a “Application cannot be found” error. Opening the app directly (since it’s already installed) throws an error {application-url}.trycloudflare.com sent an invalid response. The application_url is managed by the shopify cli and I do not manually update it or manage a tunnel.

I have tried:

  • shopify app dev --reset both linking to the existing app AND creating a new app, upwards of 10 times at this point
  • Ensuring env vars match my API KEY and SECRET
  • Updating node version from 20.x.x to 22.14.0
  • Updating the shopify_cli version. I am not on the latest version released yesterday, 3.77.0
  • Spinning up an entirely new shopify app, and even on first launch, I get the same errors.
  • Accessing the application directly via the application-url which works. The app loads correctly, but I haven’t gone far enough to auth with it

I know for sure that the requests from the app running in the dev store are never even making it into the remix app from logging. I have not tried running the app and managing my own tunnel via ngrok and don’t want to unless absolutely necessary. I’d rather fix the problem directly.

Has anyone run into this sort of issue before? I’m not sure if there’s just something weird going on with my account or my machine, but the fact that spinning up a new app also didn’t work I 'm ruling out any app specific config.

Hi!

The CLI is installing and using cloudflared under the hood to create a tunnel and it looks like something is wrong with that.

Could you check if it works with Ngrok? You can find instructions here: Use ngrok for tunneling during app development

Another thing you can try is to directly install cloudflared globally and pass the path with something like SHOPIFY_CLI_CLOUDFLARED_PATH=/opt/homebrew/bin/cloudflared shopify app dev.

Also, could you please create a new app with shopify app init and then share the output of shopify app dev --verbose?

So interestingly, this just magically started working again. I didn’t change anything, just gave it another try this morning before troubleshooting with any of the steps above and it worked :dotted_line_face:

This was a really strange issue and I’m not confident it won’t pop back up, but at least it seems resolved for now and I have the above to reference if it reappears. Maybe some weird caching issues? I’m pretty stumped, but thanks for responding!

It could also be a temporary problem from Cloudflare. If it happens again, now you know there are some possible workarounds. Thanks for reporting!