ayn2op / discordo

A lightweight, secure, and feature-rich Discord terminal client.
MIT License
2.02k stars 63 forks source link

App crashes immediately when attempting to login with username and password #339

Open musicmunky opened 7 months ago

musicmunky commented 7 months ago

As reported by @Cooliosity, when I run discordo and attempt to put in my UN/PW the app immediately crashes. The log file in ~/.cache/discordo is empty, and no errors are visible on the screen.

Originally posted by @Cooliosity in https://github.com/ayn2op/discordo/issues/332#issuecomment-1868654522

formula-spectre commented 6 months ago

bump, getting the same problem here on latest commit (12/02/24)

apprehensions commented 6 months ago

Can reproduce, can only login by -token parameter.

apprehensions commented 6 months ago

It seems that Discordo has bad logging, and the error is hidden. The error that occurs in this issue is this:

panic: code required

goroutine 8 [running]:
github.com/ayn2op/discordo/cmd.Run.func1()
        /home/meow/src/discordo/cmd/run.go:38 +0x176
created by github.com/ayn2op/discordo/cmd.Run in goroutine 1
        /home/meow/src/discordo/cmd/run.go:33 +0xb8

After putting my own code, i am now able to use discordo, this issue no longer is reproducible by me. The reason i was is because Discordo was hiding the real error as to why it could not login. Black-box software...

ayn2op commented 6 months ago

It seems that Discordo has bad logging, and the error is hidden. The error that occurs in this issue is this:

panic: code required

goroutine 8 [running]:
github.com/ayn2op/discordo/cmd.Run.func1()
        /home/meow/src/discordo/cmd/run.go:38 +0x176
created by github.com/ayn2op/discordo/cmd.Run in goroutine 1
        /home/meow/src/discordo/cmd/run.go:33 +0xb8

After putting my own code, i am now able to use discordo, this issue no longer is reproducible by me. The reason i was is because Discordo was hiding the real error as to why it could not login. Black-box software...

Hey there! I do agree that the error message could be improved. The "code required" error is returned when MFA is enabled on the account and "Code" input field is not provided (is empty). Source: https://github.com/ayn2op/discordo/blob/main/internal/ui/login_form.go#L68

ayn2op commented 6 months ago

As reported by @Cooliosity, when I run discordo and attempt to put in my UN/PW the app immediately crashes. The log file in ~/.cache/discordo is empty, and no errors are visible on the screen.

Originally posted by @Cooliosity in #332 (comment)

Discord does not support username login, input your email address instead.

formula-spectre commented 6 months ago

if anyone has still this problem, i managed to make this work: after a git pull and a rebuild of the executable I inserted my email and password, as for the code the MFA auth code; if anyone has problems and has MFA check whatever generates your OTP code is synced and produces good OTP codes

formula-spectre commented 6 months ago

tho I noticed that even tho I put an X in remember me i still have to re-login; maybe because I quit using Control-C?

Andrew15-5 commented 3 months ago

X was set by default, and after I logged in and exited many times it loads everything every time. So maybe it's some account issue. Or maybe it's now fixed.