workers-sdk
workers-sdk copied to clipboard
🐛 BUG: Interrupted wrangler pages publish resets wrangler auth state and project selection
What version of Wrangler are you using?
2.0.29
What operating system are you using?
Linux
Describe the Bug
I ran this command and pressed CTRL+C while it was getting cache (because I had forgotten to build, so I thought to stop it):
$ wrangler pages publish .build
Retrieving cached values for account_id and project_name from node_modules/.cache/wrangler
^C%
After I built the project with npm I executed the same command again but Wrangler now asked me to login and then to select a project.
$ wrangler pages publish .build
Retrieving cached values for account_id and project_name from node_modules/.cache/wrangler
Attempting to login via OAuth...
Expected behavior for me would be that stopped cache retrieval wouldn't require OAuth and project selection.
Hi @scaleoutsean , thanks for filing this issue. I am unfortunately unable to reproduce this. Are you able to consistency cause this logout behavior?
@GregBrimble I just tried 4 times, and was able to repro once (the first time). I guess the 2nd, 3rd and 4th attempt may failed because timestamp on cache was very fresh? Or maybe it must happen in one specific time window.

I loked at wrangler and there doesn't seem to be a debug switch, so I don't know if there's anything else I can provide to help.
Anyway, it's not a huge problem, if you can't repro maybe we can leave it for a while and eventually close if no other users encounter it.
Hey,
This does not seem to be a real problem since the repro is hard and it just requires a re-auth.