balena cli version 11.35.16 won't login on on window 10

Hey team,

When I was trying to log in on the cli via web authorization. I got the following error:

PS C:\Windows\system32> balena -v
11.35.16
PS C:\Windows\system32> balena login
 _            _
| |__   __ _ | |  ____  _ __    __ _
| '_ \ / _` || | / __ \| '_ \  / _` |
| |_) | (_) || ||  ___/| | | || (_) |
|_.__/ \__,_||_| \____/|_| |_| \__,_|


Logging in to balena-cloud.com
? How would you like to login? Web authorization (recommended)
Opening web browser for URL:
https://dashboard.balena-cloud.com/login/cli/http%253A%252F%252F127.0.0.1%253A8989%252Fauth
Error: listen EACCES: permission denied 0.0.0.0:8989
    at Server.setupListenHandle [as _listen2] (net.js:1263:19)
    at listenInCluster (net.js:1328:12)
    at Server.listen (net.js:1415:7)
    at Function.listen (C:\Program Files\balena-cli\client\node_modules\express\lib\application.js:618:24)
    at createServer (C:\Program Files\balena-cli\client\build\auth\server.js:17:24)
    at Object.exports.awaitForToken (C:\Program Files\balena-cli\client\build\auth\server.js:27:29)
    at Object.exports.login (C:\Program Files\balena-cli\client\build\auth\index.js:21:21)
PS C:\Windows\system32> balena login

As seen above this is version 11.35.16. I was able to log in via credentials but I wanted to report the bug. This is using the installer version: balena-cli-v11.35.16-windows-x64-installer.exe

Thanks,
-Thomas

Thanks for the report. We’ll have a look and come back to you

Hi Thomas. This might be caused by another program already using port 8989. Do you get the same error after restarting your computer? Would you mind running the command: netstat -aon | find /i "listening" and paste the results here, that will tell us if something is using the port already.

Hey @codewithcheese,

I couldn’t run your command because I think I messed up the find tool when I installed git for windows. But I ran the first program and searched the output in sublime there was something listening. Just opened my browser to localhost:8989 and found the offender.

It turns out that: https://sonarr.tv/ runs on that port.

I shut it down and the login process worked without issue.

Thanks for getting to the bottom of this.

-Thomas