How to update tunnel URLs for application custom installed in non-dev plus store?

I develop a custom embeded app (admin & pos) for internal use. Previously this app was installed in a fully fledged shopify plus store using the merchant link from partners dash.

I understand it is atypical to use anything but a dev store. However, our plus store has a ton of custom products w/ crazy metafields, locations w/ metafields, all kinds of stuff. It was very useful for testing our embedded app, as that app relies on a lot of that customization/configuration.

It worked because the tunnel urls for the application were global. So we would setup and install different testing application that we would use when running the application locally using “shopify app dev”

Now on the new dev platform, the tunnel urls are directly updated for a dev store when starting the app locally. But we currently cannot use dev stores (for reasons stated above), and the cli will not let me work with a plus store.

I need some guidance here as our devs are currently stuck and can’t get their work done.

The workaround I’ve come up with is to use a paid ngrok tunnel for each dev, so we can use reliable tunnel names, set the app tunnel urls to a named ngrok tunnel, and use that. It’s not ideal.

BTW: the whole reason we are using a plus store instead of a dev store is because at the time dev stores could not run apps embedded within the shopify pos, a requirement for our app.

My team is having the same problem and we’ve attempted the same workaround without success. We’ve been fully blocked on local dev since the upgrade and it’s been really frustrating.

Can you explain more about your previous workflow? Do I understand correctly?

  1. You ran shopify app dev with Cloudflare tunnels and automatically_update_urls_on_dev=true
  2. You selected a dev store, but not the one you wanted to test on
  3. Shopify updated the URL of your app
  4. You installed the shop on a non-dev Plus store
  5. You tested the app on the non-dev Plus store

And I assume each developer then has their own copy of the app and is installing on the same non-dev Plus store?

Hi @NickWesselman ! You have correctly understood our previous workflow, exactly.

And yes, each developer had their own copy of the app installed in the same non-dev Plus store

I take it then that your app was purely embedded as well – no extensions to test? Where do you manage other app config?

Yes, app was purely embedded. Used in embedded in admin as well as POS, nowhere else. No extensions.

Not sure what you mean by managing other app config. Configuration for apps other than the one we are talking about, or other configuration for the app we are talking about?

Yeah other configuration fields, such as webhook API versions or similar. Did you manage those in the Partner Dash or in app.toml?

We managed those in the partner dashboard. We didn’t keep the developer app copy’s toml files in source control since those previously had the tunnel urls that updated every time we ran shopify app dev

Got it. Thanks for the details.

I’m afraid I would say that your workflow was an unintended feature made possible by the global URL update we previously did during dev. This update caused many many problems for other developers, who would accidentally run dev on prod app instances and end up with Cloudflare URLs in production. :sweat_smile: … a core goal for us with the new dev was to make the command always safe to run.

100% understand the need to test on your Plus store though – if we allowed you to dev against this Plus testing store, would that solve your workflow?

A workaround would be to run dev, then manually copy the Cloudflare App URL into your toml and shopify app deploy. You could potentially script this. You would need to app config link as well to avoid overwriting dashboard-edited configuration. We strongly recommend managing via app toml however.

Something else you could try is localhost-based development. Do you use webhooks or app proxies?

Yeah, I get it. We updated our production apps URLs from the cli accidentally. Once only, as it was a hard lesson.

If we could dev against this Plus testing store that would solve the workflow. Is that a possibility?

Okay, so the localhost dev path will work for some of the development work, specifically the parts we can test when embedded in admin.

My understanding is that the localhost route won’t work when the app is booted from within the POS, which is definitely a need we have for development.

Is the store you test on your actual prod store, or a separate Plus Development/Staging store?

It is a separate Plus store, used only for staging/testing purposes.

Since you can create Plus stores on the Dev Dashboard now, is that a potential short term solution for you? Perhaps with a tool from the app store to copy your existing data into it?

I will look in to that. I don’t think it’s a short term solution, but definitely the preferred longer term solution.

Short term solution so far seems to be a mix of localhost reverse proxy and then ngrok when we need to boot application in the POS.