tg icon indicating copy to clipboard operation
tg copied to clipboard

No output in tg unless I'm root

Open atxr opened this issue 2 years ago • 12 comments

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...

atxr avatar Mar 20 '22 13:03 atxr

Same issue after I built tdlib from latest source code

z8512 avatar Mar 23 '22 17:03 z8512

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'

munhoshi avatar Mar 27 '22 04:03 munhoshi

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 avatar Mar 29 '22 18:03 ghost

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

ghost avatar Mar 30 '22 13:03 ghost

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

atxr avatar Mar 31 '22 15:03 atxr

Thank you very much mate! @atxr

ghost avatar Mar 31 '22 17:03 ghost

Same, blank screen on MacOS :-(

ahanniga avatar Apr 03 '22 00:04 ahanniga

Merged fix, will release new version soon

paul-nameless avatar Apr 20 '22 13:04 paul-nameless

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!

sozoalvin avatar Apr 21 '22 08:04 sozoalvin

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

polemon avatar Apr 24 '22 23:04 polemon

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

sozoalvin avatar Apr 25 '22 02:04 sozoalvin

@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...

polemon avatar Apr 27 '22 09:04 polemon