paul-nameless / tg

terminal telegram client
The Unlicense
929 stars 76 forks source link

No output in tg unless I'm root #264

Open atxr opened 2 years ago

atxr commented 2 years ago

Hi, I've recently started using tg and it appears that I can't use it unless I launch sudo tg, which is boring because I didn't want to soil my /root directory. When I just launch tg, the client is running, but I just have a black screen in my terminal. I tried to press random keys on my keyboard and it appears that I have control over the client, I mean I can select a conversation, send messages but I have no output from it.

image

I tried on several Window Manager (plasma and qtile) but none of them solved my issue.

I don't know what information could be useful for you, I'm using arcolinux, and I installed tg via the aur/telegram-tg-git package. Any ideas? Maybe I miss one permission I don't know what could go wrong...

z8512 commented 2 years ago

Same issue after I built tdlib from latest source code

munhoshi commented 2 years ago

I installed tg from the AUR. After compiling, I'm having the same problem in Arch Linux, but not Manjaro.

Here's what ~/.local/share/tg/error.log shows. This appears to repeat every time the client tries to draw something because I have a few thousand lines like these.

ERROR [2022-03-26 14:15:45,937] controllers.py:807 - draw | Error happened in draw loop
Traceback (most recent call last):
  File "/usr/lib/python3.10/site-packages/tg/controllers.py", line 805, in draw
    fun()
  File "/usr/lib/python3.10/site-packages/tg/controllers.py", line 798, in _resize
    self._render()
  File "/usr/lib/python3.10/site-packages/tg/controllers.py", line 825, in _render
    self._render_chats()
  File "/usr/lib/python3.10/site-packages/tg/controllers.py", line 842, in _render_chats
    self.view.chats.draw(selected_chat, chats, self.model.chats.title)
  File "/usr/lib/python3.10/site-packages/tg/views.py", line 216, in draw
    last_msg_sender, last_msg = self._get_last_msg_data(chat)
  File "/usr/lib/python3.10/site-packages/tg/views.py", line 249, in _get_last_msg_data
    user, last_msg = get_last_msg(chat, self.model.users)
  File "/usr/lib/python3.10/site-packages/tg/views.py", line 613, in get_last_msg
    last_msg["sender_id"].get("user_id"),
KeyError: 'sender_id'
ghost commented 2 years ago

Same issue here on MacOS. The messages are being sent but unfortunately I can't see anything that I'm doing. Both tg and tdlib are freshly brewed and updated to latest versions :(

ghost commented 2 years ago

Sorry for the slight change of topic but I have to ask about the link to the wallpaper @atxr 😅

atxr commented 2 years ago

Sorry for the slight change of topic but I have to ask about the link to the wallpaper @atxr sweat_smile

From KDE Plasma @kchebes ;) You can find it here https://mocah.org/340136-fantasy-japanese-demon-yokai-art-digital-art.html

ghost commented 2 years ago

Thank you very much mate! @atxr

ahanniga commented 2 years ago

Same, blank screen on MacOS :-(

paul-nameless commented 2 years ago

Merged fix, will release new version soon

sozoalvin commented 2 years ago

i installed from master after git clone - set conf.py and put my lib path for tdlib in the same confy.py and it works perfectly! do you happen to have a whatsapp equivalent? :)

before i figured it out, my mac just showed black screen all the way. now i dont even need sudo to run!

polemon commented 2 years ago

Just installed from sources and it doesn't work. Terminal emulator is all blank.

sozoalvin commented 2 years ago

@polemon set tdlib in with the correct paths in the config py

polemon commented 2 years ago

@polemon set tdlib in with the correct paths in the config py

Thanks! That helped! Perhaps the doc/readme should mention it's libtdjson.so (or rather one of the versioned files) should be put into TDLIB_PATH, I kinda had to trial end error that...