v3.38.0 | shopify theme dev | Staging IP issue

After upgrading to Shopify cli 3.38.0, I’m now running into this issue trying view my theme updates on the staging url in my browser. Upon pressing any key after the prompt, I’m directed to log in with my credentials in my browser; however the staging url is no longer rendering in the Shopify CLI. Any ideas on how to resolve?

shopify theme dev

To run this command, log in to Shopify Partners.
 Press any key to open the login page on your browser
/opt/homebrew/Cellar/shopify-cli/3.38.0/libexec/lib/node_modules/@shopify/cli/node_modules/yoga-layout-prebuilt/yoga-layout/build/Release/nbind.js:53
        throw ex;
        ^

AbortError: invalid_target
    at tokenRequestErrorHandler (file:///opt/homebrew/Cellar/shopify-cli/3.38.0/libexec/lib/node_modules/@shopify/theme/node_modules/@shopify/cli-kit/dist/private/node/session/exchange.js:130:12)
    at Err.mapError (file:///opt/homebrew/Cellar/shopify-cli/3.38.0/libexec/lib/node_modules/@shopify/theme/node_modules/@shopify/cli-kit/dist/public/node/result.js:130:20)
    at requestAppToken (file:///opt/homebrew/Cellar/shopify-cli/3.38.0/libexec/lib/node_modules/@shopify/theme/node_modules/@shopify/cli-kit/dist/private/node/session/exchange.js:115:31)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async exchangeAccessForApplicationTokens (file:///opt/homebrew/Cellar/shopify-cli/3.38.0/libexec/lib/node_modules/@shopify/theme/node_modules/@shopify/cli-kit/dist/private/node/session/exchange.js:46:23)
    at async executeCompleteFlow (file:///opt/homebrew/Cellar/shopify-cli/3.38.0/libexec/lib/node_modules/@shopify/theme/node_modules/@shopify/cli-kit/dist/private/node/session.js:114:20)
    at async ensureAuthenticated (file:///opt/homebrew/Cellar/shopify-cli/3.38.0/libexec/lib/node_modules/@shopify/theme/node_modules/@shopify/cli-kit/dist/private/node/session.js:48:22)
    at async ensureAuthenticatedAdmin (file:///opt/homebrew/Cellar/shopify-cli/3.38.0/libexec/lib/node_modules/@shopify/theme/node_modules/@shopify/cli-kit/dist/public/node/session.js:62:20)
    at async Dev.execute (file:///opt/homebrew/Cellar/shopify-cli/3.38.0/libexec/lib/node_modules/@shopify/theme/dist/cli/commands/theme/dev.js:39:30) {
  tryMessage: null,
  type: 0,
  nextSteps: undefined
}
4 Likes

I am also experiencing this issue

Had the same problem here. I got it working by adding the store URL flag: shopify theme dev --store {your store url}. This is only needed one time after logging in successfully, and the URL flag is not required after.

I am also experiencing this issue

I have same issues!

I have the same issues, someone can help me.

Have you found a solution yet?