BalenaRequestError: Request error: Unauthorized when trying to login "balena login"

summary
#1

I have followed the instructions to the letter. However, even after reinstalling, destroying and recreating volumes, deleting and recreating the config directory, whenever I try to login to openbalena I get BalenaRequestError: Request error: Unauthorized. Just to rule out weird password issues I literally created a password “password” . I read through BalenaRequestError: Request error: Unauthorized, but nothing in their helped me. I am happy to start from the beginning if it solves my issue.

turned on
export DEBUG=1
but this does not give me any more information.

#3

Hi, Can you post the output from balena login please?

#4

Ug, I finally got it. Always after I post for help. I am still not sure exactly what happened, but what I had to do to fix it was delete the openbalena_haproxy and openbalena_cert-provider images. For some reason, just deleting the volumes was not enough. I am not sure what error was introduced when they were first created because I did not do anything else different. But hopefully if someone else comes across this post it may be of some help.

docker image rm openbalena_haproxy 
docker image rm openbalena_cert-provider

Thank you @lucianbuzzo for your response, not sure if it will help at all now, but here is/was the output

| |__   __ _ | |  ____  _ __    __ _
| '_ \ / _` || | / __ \| '_ \  / _` |
| |_) | (_) || ||  ___/| | | || (_) |
|_.__/ \__,_||_| \____/|_| |_| \__,_|


Logging in to balena-cloud.com
? How would you like to login? Credentials
? Email: rpelletier@iot.domain.edu
? Password: [hidden]
BalenaRequestError: Request error: Unauthorized

Additional information may be available by setting a DEBUG=1 environment
variable: "set DEBUG=1" on a Windows command prompt, or "export DEBUG=1"
on Linux or macOS.

If you need help, don't hesitate in contacting our support forums at
https://forums.balena.io

For bug reports or feature requests, have a look at the GitHub issues or
create a new one at: https://github.com/balena-io/balena-cli/issues/

I considered just erasing the above, but I figured I would let everyone go ahead and see my stupidity. The answer was right there. For some reason it was trying to login to balena-cloud.com. Again, I changed nothing, but after deleting those images it changed its mind and decided to login in to my correct server. Odd, but for the most part the mystery is solved.

#5

I’m glad it got resolved!