When using now dev, I sometimes get the multiple tabs warning and application hangs even though only one tab is open.
This happens most frequently when I have the debugging console open and do a browser refresh.
Expect the application to refresh.
This warning has been removed in the latest canary of Next.js since we now share one SSE connection instead of using multiple which increased the risk of hitting browser set connection limits. I'm going to close this, feel free to reply with additional details if you are still having trouble with this in the latest version of Next.js
Looks like the warning is gone, but it still hangs. 8.1.1-canary.28
Can you reproduce the hanging without now dev i.e. using yarn next? If not this is probably related to now dev. What version of now are you using. You can check with now --version.
Good thought, and yes, it's unrelated to now.
https://github.com/benallfree/nextjs-canary-minimal-hang
I can try resetting Chrome or rebooting, but I kind of feel like I have the tiger by the tail here, is it worth troubleshooting further to see if we can identify what would be causing this?
Maybe a clue... even after I stop the localhost server and completely exit the terminal, even after restarting Chrome, I can still hit localhost:3000 and load the site. In Incognito mode or in a different Chrome profile, I get a refused to connect error as expected.
As if some process has not fully exited?
ps -ef | node shows nothing. Really weird.
Yeah, I'm not able to reproduce it refreshing the page more than five times I've tried doing it pretty fast too. This might be related to your Chrome set up since you mentioned it gives you the refused to connect in incognito but not in normal mode so it could be hitting the cache.
If it was related to Next.js it should be reproducible in incognito or a different Chrome profile also.
I think there is a ServiceWorker not exiting or something.

Next.js doesn't register a service worker so this is probably a stale one that was never cleared. You can clear it under the Application tab in the Chrome dev tools. I'm gonna close this now since that appears to be what was causing the issue.
Sure enough, that was it. Thank you very much for your patient replies. I hope this ticket helps someone else too.
Would this have been registered through now? Or what is the recommended way of detecting this problem?

No problem. now doesn't register a service-worker either so there might have been another application that used localhost:3000 that registered one at some point that didn't get cleaned up. I usually develop in incognito mode to prevent stuff like that.
Most helpful comment
No problem.
nowdoesn't register a service-worker either so there might have been another application that usedlocalhost:3000that registered one at some point that didn't get cleaned up. I usually develop in incognito mode to prevent stuff like that.