Why does the application URL change every time I run npm run dev on Shopify?

Topic summary

Developers encounter a recurring issue where running npm run dev repeatedly prompts them to update callback URLs, creating an endless loop. The initial problem involves deprecated commands—npm run shopify app config push no longer works and has been replaced by npm run shopify app deploy.

Core Issue:
Application URLs change with each npm run dev execution, causing callback URL mismatches and preventing the app preview from loading.

Attempted Solutions:

  • Setting automatically_update_urls_on_dev = false in the TOML configuration file (reported as ineffective)
  • Running deploy commands in separate terminal tabs
  • Manually updating URLs in the Partners dashboard

Working Workaround:
A multi-step process using two terminals:

  1. Set automatically_update_urls_on_dev = true in TOML file
  2. Run shopify app dev in first terminal
  3. Verify URLs auto-update in TOML
  4. Execute shopify app deploy in second terminal
  5. Confirm new app version appears in Partners dashboard with correct URLs

Note: This workaround must be repeated every development session, indicating an unresolved underlying configuration issue.

Summarized with AI on November 2. AI used: claude-sonnet-4-5-20250929.

I am having an issue where I try and run “npm run dev” and it tells me the callback urls need to be changed to the values presented, then run “npm run shopify app config push” which I do.

When I run the command, however, I get the error “Command no longer supported” and instead tells me to run “npm run shopify app deploy”, which I do.

After running the deploy command, I try running “npm run dev” again, but when I do, it tells me the callback urls need to be changed again, and the loop keeps going.

Is there something I am doing wrong? Why does the application url change every time I run “npm run dev”?

I’ve also tried running dev, then in a separate cli tab, change the callback urls and run the deploy command. I have also changed the urls in the partners page while dev was still running, but none of that works. Every time I run dev and click on the 'Preview Url", the app page errors out saying it can’t find the page.

4 Likes

[build]
automatically_update_urls_on_dev = false

Doesn’t help. URLs keep changing on shopify app dev

1 Like

I found a solution that works for me
Same problem, after app dev the URLs change and accordingly webhooks are sent to the wrong addresses
To fix this you will need 2 opened terminals

  1. configure in the toml file
    [build]
    automatically_update_urls_on_dev = true
  2. in the first terminal execute shopify app dev
  3. make sure that the urls in the toml file have automatically changed
  4. in the second terminal execute the shopify app deploy
  5. make sure that on the partner page has a new app version with correct urls
    You need to do this every time