ayn2op / discordo

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

Executing Discordo as of commit cf8cc8f does not work #272

Closed Coder2195Text closed 1 year ago

Coder2195Text commented 1 year ago

image

It just exits no error is found for some reason.

System stats: image

ayn2op commented 1 year ago

Can you dump the content of the log file here? Also, try running the binary with strace.

Coder2195Text commented 1 year ago

logs.txt

apprehensions commented 1 year ago

i've faced this as well, looking at strace, the problem is in D-Bus:

connect(7, {sa_family=AF_UNIX, sun_path="/tmp/dbus-bwdXD0CkbT"}, 23) = 0
epoll_ctl(4, EPOLL_CTL_ADD, 7, {events=EPOLLIN|EPOLLOUT|EPOLLRDHUP|EPOLLET, data={u32=385773784, u64=140578960339160}}) = 0
getsockname(7, {sa_family=AF_UNIX}, [112 => 2]) = 0
getpeername(7, {sa_family=AF_UNIX, sun_path="/tmp/dbus-bwdXD0CkbT"}, [112 => 23]) = 0
futex(0xc0000a8148, FUTEX_WAKE_PRIVATE, 1) = 1
geteuid()                               = 1000
getpid()                                = 16478
getuid()                                = 1000
getgid()                                = 1000
sendmsg(7, {msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base="\0", iov_len=1}], msg_iovlen=1, msg_control=[{cmsg_len=28, cmsg_level=SOL_SOCKET, cmsg_type=SCM_CREDENTIALS, cmsg_data={pid=16478, uid=1000, gid=1000}}], msg_controllen=32, msg_flags=0}, 0) = 1
write(7, "AUTH\r\n", 6)                 = 6
read(7, "REJECTED EXTERNAL\r\n", 4096)  = 19
write(7, "AUTH EXTERNAL\r\n", 15)       = 15
read(7, "DATA\r\n", 4096)               = 6
write(7, "DATA\r\n", 6)                 = 6
read(7, "OK 3eb6ae26e5d6e1cd6155a70e63c41"..., 4096) = 37
write(7, "NEGOTIATE_UNIX_FD\r\n", 19)   = 19
read(7, "AGREE_UNIX_FD\r\n", 4096)      = 15
write(7, "BEGIN\r\n", 7)                = 7
futex(0xc0000a8148, FUTEX_WAKE_PRIVATE, 1) = 1
futex(0xc000078d48, FUTEX_WAKE_PRIVATE, 1) = 1
write(7, "l\1\0\1\0\0\0\0\1\0\0\0m\0\0\0\1\1o\0\25\0\0\0/org/fre"..., 128) = 128
epoll_pwait(4, [{events=EPOLLOUT, data={u32=385773784, u64=140578960339160}}], 128, 0, NULL, 2) = 1
epoll_pwait(4, [{events=EPOLLIN|EPOLLOUT, data={u32=385773784, u64=140578960339160}}], 128, -1, NULL, 3864974) = 1
recvmsg(7, {msg_name={sa_family=AF_UNIX, sun_path="/tmp/dbus-bwdXD0CkbT"}, msg_namelen=112 => 23, msg_iov=[{iov_base="l\2\1\1\n\0\0\0\1\0\0\0=\0\0\0", iov_len=16}], msg_iovlen=1, msg_controllen=0, msg_flags=MSG_CMSG_CLOEXEC}, MSG_CMSG_CLOEXEC) = 16
recvmsg(7, {msg_name={sa_family=AF_UNIX, sun_path="/tmp/dbus-bwdXD0CkbT"}, msg_namelen=112 => 23, msg_iov=[{iov_base="\6\1s\0\5\0\0\0:1.42\0\0\0\5\1u\0\1\0\0\0\10\1g\0\1s\0\0"..., iov_len=64}], msg_iovlen=1, msg_controllen=0, msg_flags=MSG_CMSG_CLOEXEC}, MSG_CMSG_CLOEXEC) = 64
recvmsg(7, {msg_name={sa_family=AF_UNIX, sun_path="/tmp/dbus-bwdXD0CkbT"}, msg_namelen=112 => 23, msg_iov=[{iov_base="\5\0\0\0:1.42\0", iov_len=10}], msg_iovlen=1, msg_controllen=0, msg_flags=MSG_CMSG_CLOEXEC}, MSG_CMSG_CLOEXEC) = 10
futex(0xc0000a8148, FUTEX_WAKE_PRIVATE, 1) = 1
recvmsg(7, {msg_name={sa_family=AF_UNIX, sun_path="/tmp/dbus-bwdXD0CkbT"}, msg_namelen=112 => 23, msg_iov=[{iov_base="l\4\1\1\n\0\0\0\2\0\0\0\215\0\0\0", iov_len=16}], msg_iovlen=1, msg_controllen=0, msg_flags=MSG_CMSG_CLOEXEC}, MSG_CMSG_CLOEXEC) = 16
recvmsg(7, {msg_name={sa_family=AF_UNIX, sun_path="/tmp/dbus-bwdXD0CkbT"}, msg_namelen=112 => 23, msg_iov=[{iov_base="\1\1o\0\25\0\0\0/org/freedesktop/DBus\0\0\0"..., iov_len=144}], msg_iovlen=1, msg_controllen=0, msg_flags=MSG_CMSG_CLOEXEC}, MSG_CMSG_CLOEXEC) = 144
recvmsg(7, {msg_name={sa_family=AF_UNIX, sun_path="/tmp/dbus-bwdXD0CkbT"}, msg_namelen=112 => 23, msg_iov=[{iov_base="\5\0\0\0:1.42\0", iov_len=10}], msg_iovlen=1, msg_controllen=0, msg_flags=MSG_CMSG_CLOEXEC}, MSG_CMSG_CLOEXEC) = 10
recvmsg(7, {msg_namelen=112}, MSG_CMSG_CLOEXEC) = -1 EAGAIN (Resource temporarily unavailable)
futex(0xd8ae28, FUTEX_WAIT_PRIVATE, 0, NULL) = 0
futex(0xd8ae28, FUTEX_WAIT_PRIVATE, 0, NULL) = 0
epoll_pwait(4, [], 128, 0, NULL, 0)     = 0
epoll_pwait(4,  <unfinished ...>)       = ?
+++ exited with 0 +++
Coder2195Text commented 1 year ago

It seems to have successful exit code

PetrifiedOak commented 1 year ago

I am not getting this on a dbus-less system, it works perfectly fine.

Coder2195Text commented 1 year ago

@wael444 can u elaborate on the dbus problem

apprehensions commented 1 year ago

A D-Bus session exports a variable for client programs to interact with D-Bus, DBUS_SESSION_BUS_ADDRESS, which for me partly contains unix:path=/tmp/dbus-bwdXD0CkbT, the path to the D-Bus socket. it seems that discordo or the D-bus library used by discordo is failing to use or open the socket. recvmsg is a call to send a message to a socket. discordo or the library did not have a error check for failure to hook or interact with the d-bus socket. though; D-bus applications work perfectly fine. this might be a problem within the library.

Mind you this is all said with brief knowledge of what is happening.

ayn2op commented 1 year ago

@Coder2195Text, use the latest version (most recent commit) and let me know if the issue persists.

apprehensions commented 1 year ago

there is still failure at 016ce8d for me.

ayn2op commented 1 year ago

there is still failure at 016ce8d for me.

Can you follow these instructions and try again? Make sure to install gnome-keyring and seahorse (frontend for gnome-keyring).

apprehensions commented 1 year ago

No. I'm not going to install this bloated shit on my system.

This already used to work without it and i don't need my password saved.

Coder2195Text commented 1 year ago

I did use a commit from 3 weeks ago, the login works, everything fails after that

Ru-Tao commented 1 year ago

Having the same issue with launching discordo normally, but it seems to work fine when logging in using the login token rather then email and password.

ayn2op commented 1 year ago

Having the same issue with launching discordo normally, but it seems to work fine when logging in using the login token rather then email and password.

Hello there, could you try to run the application using the latest commit?

Ru-Tao commented 1 year ago

Hello there, could you try to run the application using the latest commit?

Works perfectly fine now when launching normally, thanks for the fix!

Coder2195Text commented 1 year ago

It doesnt work, it has exit code 1 now. logs.txt

ayn2op commented 1 year ago

@Coder2195Text, could you dump the contents of the log file (located at ~/.cache/discordo/logs.txt) here?

apprehensions commented 1 year ago

I will confirm that discordo is working for me. if needed, here are my logs:

2023/01/29 18:38:04 github.com/ayn2op/discordo/main.go:56: The name org.freedesktop.secrets was not provided by any .service files
2023/01/29 18:38:26 github.com/ayn2op/discordo/messages_text.go:195: item not found in store
2023/01/29 18:38:26 github.com/ayn2op/discordo/messages_text.go:195: item not found in store
2023/01/29 18:38:28 github.com/ayn2op/discordo/messages_text.go:195: item not found in store
2023/01/29 18:38:28 github.com/ayn2op/discordo/messages_text.go:195: item not found in store
2023/01/29 18:38:28 github.com/ayn2op/discordo/messages_text.go:175: item not found in store
2023/01/29 18:38:28 github.com/ayn2op/discordo/messages_text.go:195: item not found in store
2023/01/29 18:38:29 github.com/ayn2op/discordo/messages_text.go:195: item not found in store
2023/01/29 18:38:30 github.com/ayn2op/discordo/messages_text.go:195: item not found in store
2023/01/29 18:38:35 github.com/ayn2op/discordo/state.go:51: method = GET; url = https://discord.com/api/v9/channels/1060265945383305347/messages
Coder2195Text commented 1 year ago

@Coder2195Text, could you dump the contents of the log file (located at ~/.cache/discordo/logs.txt) here?

logs.txt

ayn2op commented 1 year ago

Kindly join the official Discord server in order for me to investigate the issue in greater depth.