Returning to `shopify app dev` session creates a dozen+ browser tabs

Hi there,

Just an annoying issue more than anything, but I noticed if I leave my terminal open with shopify app dev running, and return some time later I’ll see a list of errors:

› Press d │ toggle development store preview: ✔ on
› Press g │ open GraphiQL (Admin API) in your browser
› Press p │ preview in your browser
› Press q │ quit

Shutting down dev ...

Opened link to start the auth process: https://accounts.shopify.com/activate-with-code?device_code%5Buser_code%5D=****-****
Opened link to start the auth process: https://accounts.shopify.com/activate-with-code?device_code%5Buser_code%5D=****-****
Opened link to start the auth process: https://accounts.shopify.com/activate-with-code?device_code%5Buser_code%5D=****-****
Opened link to start the auth process: https://accounts.shopify.com/activate-with-code?device_code%5Buser_code%5D=****-****
Opened link to start the auth process: https://accounts.shopify.com/activate-with-code?device_code%5Buser_code%5D=****-****
Opened link to start the auth process: https://accounts.shopify.com/activate-with-code?device_code%5Buser_code%5D=****-****
Opened link to start the auth process: https://accounts.shopify.com/activate-with-code?device_code%5Buser_code%5D=****-****
Opened link to start the auth process: https://accounts.shopify.com/activate-with-code?device_code%5Buser_code%5D=****-****
Opened link to start the auth process: https://accounts.shopify.com/activate-with-code?device_code%5Buser_code%5D=****-****
Opened link to start the auth process: https://accounts.shopify.com/activate-with-code?device_code%5Buser_code%5D=****-****
Opened link to start the auth process: https://accounts.shopify.com/activate-with-code?device_code%5Buser_code%5D=****-****
Opened link to start the auth process: https://accounts.shopify.com/activate-with-code?device_code%5Buser_code%5D=****-****
Opened link to start the auth process: https://accounts.shopify.com/activate-with-code?device_code%5Buser_code%5D=****-****
Opened link to start the auth process: https://accounts.shopify.com/activate-with-code?device_code%5Buser_code%5D=****-****
Opened link to start the auth process: https://accounts.shopify.com/activate-with-code?device_code%5Buser_code%5D=****-****
Opened link to start the auth process: https://accounts.shopify.com/activate-with-code?device_code%5Buser_code%5D=****-****
Opened link to start the auth process: https://accounts.shopify.com/activate-with-code?device_code%5Buser_code%5D=****-****
Opened link to start the auth process: https://accounts.shopify.com/activate-with-code?device_code%5Buser_code%5D=****-****
Opened link to start the auth process: https://accounts.shopify.com/activate-with-code?device_code%5Buser_code%5D=****-****
Opened link to start the auth process: https://accounts.shopify.com/activate-with-code?device_code%5Buser_code%5D=****-****

Then when I focus on the window, a dozen+ tabs are created in my web browser prompting to login to Shopify:

CleanShot 2025-07-21 at 11.56.43

CLI Version @shopify/cli/3.82.1

1 Like

YES this happens all the time for me

Hey @Dylan @bkspace thanks for bringing this up! It would help a lot to know how long this has been happening, and whether it’s associated with a particular minimum CLI version. And in general, any specific repro steps are always good.

Does this always happen when you leave your terminal for a particular amount of time? Are you doing anything else meanwhile, like logging out of Shopify in the browser?

We made some recent changes to the retry mechanism when auth fails, and I suspect you’ve uncovered a bug in the implementation, so any additional details you can provide will help us a lot in identifying the source.

@Ariel_Caplan - I recall this happening for quite a while. I don’t have a scientific way of reproducing, but generally:

1.) I leave shopify app dev running
2.) Computer sleeps for X hours
3.) Computer wakes up, It goes into a loop of opening auth links
4.) Smash ctrl-d, ctrl-c until it stops
5.) Cleanup

Yes that’s generally the flow I recognize as well.

The next time I have shopify app dev opened for an extended period of time, I’ll pay close attention to any more steps I took to repro.

1 Like

Could you share what type of extensions do you have in your project when running dev and what OS are you using?

Sure @Isaac-Shopify

I’m using Mac OS 14.5
iTerm 2
zsh shell

I have Shopify extensions including:

  • Checkout Extensions
  • Customer Account Extensions
  • Discount Function
  • Shopify Flow Actions
  • Shopify Flow Triggers
  • Online Store Theme Block
  • Admin UI Blocks
  • POS extension

Thank you @Dylan, this helped us identify the root cause of this issue.
We are working on a fix that will be available on the next CLI release.

3 Likes

Great! Thanks for the quick turnaround @Isaac-Shopify - glad to play a small part.