cli icon indicating copy to clipboard operation
cli copied to clipboard

`pscale` hangs for 2 minutes when running in WSL2

Open dbanck opened this issue 1 year ago • 12 comments

Hi!

I noticed a strange behavior when running pscale in WSL2.

  • Release 0.131.0
  • Installed via pscale_0.131.0_linux_amd64.deb
  • WSL2 Ubuntu 20.04.6 LTS

Any command will hang for 2 minutes before any output:

$ time pscale --debug org list
Updater error: skipping update, reason: Latest version was already checked
Error: not authenticated yet. Please run 'pscale auth login'
Error: --access-token is required for access token authentication

________________________________________________________
Executed in  120.11 secs      fish           external
   usr time    4.44 millis   51.00 micros    4.39 millis
   sys time    4.83 millis  114.00 micros    4.72 millis

Running pscale auth login will take 2 minutes until a browser window with the (correct) code is opened and then another ~2 minutes until a success message is shown.

$ time pscale --debug auth login
Confirmation Code: xxx

If something goes wrong, copy and paste this URL into your browser: https://auth.planetscale.com/oauth/device?user_code=xxx

Successfully logged in.

________________________________________________________
Executed in  275.68 secs      fish           external
   usr time  250.22 millis    0.00 micros  250.22 millis
   sys time  111.74 millis  770.00 micros  110.97 millis

I cannot connect to any database or do any development work in WSL2.

Happy to debug this further with some guidance.

dbanck avatar Mar 20 '23 10:03 dbanck