telegramdesktop / tdesktop

Telegram Desktop messaging app
https://desktop.telegram.org/
Other
26.26k stars 5.22k forks source link

Can't paste text on Ubuntu 23.04 #26826

Closed lapisdecor closed 1 year ago

lapisdecor commented 1 year ago

Steps to reproduce

  1. Open Telegram
  2. Open Firefox
  3. Go to a website
  4. Copy the URL with the mouse
  5. Paste with the mouse on Telegram

Expected behaviour

The text should be pasted in the conversation field

Actual behaviour

It pastes a blank line

Operating system

Ubuntu 23.04

Version of Telegram Desktop

4.9.9

Installation source

Static binary from official website

Crash ID

No response

Logs

No response

ilya-fedin commented 1 year ago

Please provide a screencast of the issue, can't reproduce on NixOS with Plasma

lapisdecor commented 1 year ago

Please provide a screencast of the issue, can't reproduce on NixOS with Plasma

Kooha-2023-09-20-22-07-59.webm

ilya-fedin commented 1 year ago

Interesting, I'm doing the same but it works fine... Perhaps Qt's clipboard implementation is still incompatible with GNOME and someone should report to them. Would you like to do that?

lapisdecor commented 1 year ago

Looks like it's a Wayland problem. I switched to Xorg and it works fine.

ilya-fedin commented 1 year ago

Well, tdesktop doesn't differ between Wayland and Xorg, it just creates QTextEdit that handles all the input field and Qt does all the underlying work.

Aokromes commented 1 year ago

works for me also on default ubuntu 23.04 without install.

Aokromes commented 1 year ago

and installing i don't have problem too.

lapisdecor commented 1 year ago

Could you try to paste more than one time?

A quarta, 20/09/2023, 23:57, Aokromes @.***> escreveu:

and installing i don't have problem too.

— Reply to this email directly, view it on GitHub https://github.com/telegramdesktop/tdesktop/issues/26826#issuecomment-1728528409, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABG53C6ZLKEAWOT5WQUDMQTX3NYETANCNFSM6AAAAAA5AO24WE . You are receiving this because you authored the thread.Message ID: @.***>

Aokromes commented 1 year ago

tried like 5 different urls without problem.

ilya-fedin commented 1 year ago

Works just fine for me, too

lapisdecor commented 1 year ago

This is strange. It happens here at leat on two computers with ubuntu 23.04 on wayland.

A quinta, 21/09/2023, 00:11, ilya-fedin @.***> escreveu:

Works just fine for me, too

— Reply to this email directly, view it on GitHub https://github.com/telegramdesktop/tdesktop/issues/26826#issuecomment-1728540028, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABG53C5KVW3ML6USXGNE4YTX3NZ3LANCNFSM6AAAAAA5AO24WE . You are receiving this because you authored the thread.Message ID: @.***>

ilya-fedin commented 1 year ago

Maybe there are steps to reproduce you're missing? Try to reproduce on a clean VM installation to replicate the @Aokromes's environment and learn what else he should do to reproduce.

lapisdecor commented 1 year ago

I tried on a clean VM and can't reproduce. I also tried creating a new user on this machine and the bug happens for the new user with a fresh Telegram install.

ilya-fedin commented 1 year ago

Apparently there's something special to your installations?

lapisdecor commented 1 year ago

On another computer with Ubuntu 22.04 with another Telegram user, on Wayland, I first couldn't reproduce, but after a short while, it happend too.

ilya-fedin commented 1 year ago

Well, we need a way to report this to Qt... I don't imagine how to fix such kind of bug on tdesktop level.

lapisdecor commented 1 year ago

By the way, it only happened after I switched the user I sent the message to. Could this be something in my network? (I'm getting paranoid here)

ilya-fedin commented 1 year ago

I would rather guess it's something to focus change in GNOME and graphics drivers. Reports from GNOME users related to focus change are frequent so it feels like this part of GNOME is constantly broken. Maybe they even achieved to make such bugs dependent on OpenGL drivers or something. They test gtk applications and they usually have no problems, but for Qt applications GNOME has new weird bugs in each new release.

lapisdecor commented 1 year ago

After I paste, the paste option disappears on Telegram, but I can paste in LibreOffice.

ilya-fedin commented 1 year ago

So?

ilya-fedin commented 1 year ago

I don't understand how that's relevant. I'm not surprised gtk applications work fine.

lapisdecor commented 1 year ago

Well shouldn't the text on memory be available after a paste? So you could paste a second time...

ilya-fedin commented 1 year ago

How would you access it if Qt thinks it's not present?

lapisdecor commented 1 year ago

Oh, I see...

ilya-fedin commented 1 year ago

I tend to think it's likely due to #26407. The bug is worked around to filter the event closing the popup but Qt still thinks application loses focus and likely other side effects happen like clearing the clipboard.

Psychosynthesis commented 1 year ago

Got the same problem on Ubuntu, but not only with Firefox.

Bug with paste from buffer does not occur every time, it is a "floating" bug. It’s just that sometimes pasting using one of the methods does not work, alternating helps, for example, through the right mouse button menu, pasting does not occur, but if you select the desired text and copy it via “ctrl+c”, pasting works.

In my opinion, the problem is most likely in the implementation of the buffer on Ubuntu, however, in Windows 7 I received a similar problem several times. It is difficult to trace the cause.

ilya-fedin commented 1 year ago

There's a build using Qt 6.6 (that has a proper fix for #26407) on snap edge channel, you can try it to check whether it helps with this.

lapisdecor commented 1 year ago

Thanks, I'll check it out.

A quarta, 27/09/2023, 01:49, ilya-fedin @.***> escreveu:

There's a build using Qt 6.6 (that has a proper fix for #26407 https://github.com/telegramdesktop/tdesktop/issues/26407) on snap edge channel, you can try it to check whether it helps with this.

— Reply to this email directly, view it on GitHub https://github.com/telegramdesktop/tdesktop/issues/26826#issuecomment-1736493301, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABG53C3EWTO7GFZNK6I3EP3X4NZY3ANCNFSM6AAAAAA5AO24WE . You are receiving this because you authored the thread.Message ID: @.***>

lapisdecor commented 1 year ago

With the edge snap I get a segmentation fault after configuring the user: telegram-desktop [ALSOFT] (EE) Failed to connect PipeWire event context (errno: 112) propsReply "An AppArmor policy prevents this sender from sending this message to this recipient; type=\"method_call\", sender=\":1.157\" (uid=1000 pid=10455 comm=\"/snap/telegram-desktop/5101/usr/bin/telegram-deskt\" label=\"snap.telegram-desktop.telegram-desktop (enforce)\") interface=\"org.freedesktop.DBus.Properties\" member=\"GetAll\" error name=\"(unset)\" requested_reply=\"0\" destination=\"org.freedesktop.NetworkManager\" (uid=0 pid=1336 comm=\"/usr/sbin/NetworkManager --no-daemon\" label=\"unconfined\")" QPainter::begin: Paint device returned engine == 0, type: 2 QWidget::render: Cannot render with an inactive painter qt.svg: Error while inflating gzip file: SVG format check failed Falta de segmentação (núcleo despejado)

lapisdecor commented 1 year ago

Version 4.10.1 which is in the stable channel seems to work, so far... the bug didn't reproduce yet.

ilya-fedin commented 1 year ago

Yeah, it seems Qt 6.6 has some bug in qtsvg. Snap should have a workaround soon by excluding the QImage qtsvg plugin.

ilya-fedin commented 1 year ago

Snap edge should work now

ilya-fedin commented 1 year ago

Does this happen with 4.10.2?

lapisdecor commented 1 year ago

Not yet. Maybe it's solved.

ilya-fedin @.***> escreveu no dia sábado, 30/09/2023 à(s) 14:46:

Does this happen with 4.10.2?

— Reply to this email directly, view it on GitHub https://github.com/telegramdesktop/tdesktop/issues/26826#issuecomment-1741770445, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABG53C4A23CKEYTWQMDXX53X5APDVANCNFSM6AAAAAA5AO24WE . You are receiving this because you authored the thread.Message ID: @.***>

-- AVISO DE CONFIDENCIALIDADE: Esta mensagem, assim como os ficheiros eventualmente anexos, é confidencial e reservada apenas ao conhecimento da(s) pessoa(s) nela indicada(s) como destinatária(s). Se não é o seu destinatário, solicitamos que não faça qualquer uso do respectivo conteúdo e proceda à sua destruição, notificando o remetente.

ilya-fedin commented 1 year ago

Could the issue be closed?

lapisdecor commented 1 year ago

Yes. All seems fine now.