Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Transparent web-view (3D secure step in payment form) in Telegram Desktop v4.14.4 in Debain Trixie with XFCE #27351

Closed
phpony opened this issue Jan 12, 2024 · 8 comments
Labels

Comments

@phpony
Copy link

phpony commented Jan 12, 2024

Steps to reproduce

  1. Apply for Telegram Premium.
  2. Select "new card..."
  3. Enter card details.
  4. Click "pay".
  5. See the 3D secure step window that has header and footer but is empty (transparent) in main content area.

Expected behaviour

There should be a proper visible web-view contents.

Actual behaviour

There is the web-view area in this window, it loaded 3D secure form and issued SMS message with code, but all this happened without any visuals - it looks like everything inside web-view had opacity forced to 0 so there's absolutely noting - only window's background. After a bit of confusion I've started to move the cursor over the empty space and found out that it properly highlights all links and input field over this empty area. Because I'm quite familiar with my bank's 3D secure form I've recognized it and managed to find text input field and blindly enter 3D secure digits into it. My bank automatically submits the form after entering enough digits so the form submitted and I've successfully completed the payment.

I have Firefox, Chromium and Google Chrome, Steam, all GLX, opengl, vulkan and wayland stuff. I use multiple electron apps and there's no other app in my system with same problem - all web-views across all apps and games and browsers are working fine with and without GPU acceleration. Only Telegram's web-view is transparent for unknown reason. Telegram itself also has hardware acceleration enabled and in all other ways works without issues.

Operating system

Debian Trixie, XFCE 4.18, Nvidia driver 525.147.05-4

Version of Telegram Desktop

4.14.4

Installation source

Static binary from official website

Crash ID

No response

Logs

There's nothing specific in log files.
@phpony phpony added the bug label Jan 12, 2024
@ilya-fedin
Copy link
Contributor

ilya-fedin commented Jan 12, 2024

Some window managers prevent repaint for whatever reason, it's unknown why. Perhaps Qt, GTK, WM and compositor can't reach an agreement between their own.

I have Firefox, Chromium and Google Chrome, Steam, all GLX, opengl, vulkan and wayland stuff. I use multiple electron apps and there's no other app in my system with same problem - all web-views across all apps and games and browsers are working fine with and without GPU acceleration.

I don't think any of those programs embed a window of another toolkit in their window through the windowing system...

@ilya-fedin
Copy link
Contributor

ilya-fedin commented Jan 12, 2024

I don't think anyone can help you here, you can report this to xfwm or switch to KDE whose WM is known to work properly with the feature.

@phpony
Copy link
Author

phpony commented Jan 12, 2024

Maybe it's possible to add second "pay" button with xdg-open call to complete the payment in browser? Or add some config option to "open all links in external browser"? It will not only be more compatible with different WM's and environments but it also feels safer to work with payment forms in your brother than in standalone app.

@ilya-fedin
Copy link
Contributor

You can't do this in browser, there's integration between bot's JS code and the client's C++ code

@phpony
Copy link
Author

phpony commented Jan 12, 2024

This way webview works:

WEBKIT_DISABLE_DMABUF_RENDERER=1 telegram-desktop

Screenshot

@phpony
Copy link
Author

phpony commented Jan 12, 2024

Debug hints:

src/nv_gbm.c:100: GBM-DRV error (nv_gbm_bo_create): DRM_IOCTL_NVIDIA_GEM_ALLOC_NVKMS_MEMORY failed (ret=-1)
Failed to create GBM buffer of size 392x538: Invalid argument
src/nv_gbm.c:100: GBM-DRV error (nv_gbm_bo_create): DRM_IOCTL_NVIDIA_GEM_ALLOC_NVKMS_MEMORY failed (ret=-1)
Failed to create GBM buffer of size 392x538: Invalid argument
src/nv_gbm.c:100: GBM-DRV error (nv_gbm_bo_create): DRM_IOCTL_NVIDIA_GEM_ALLOC_NVKMS_MEMORY failed (ret=-1)
Failed to create GBM buffer of size 392x538: Invalid argument
Failed to create EGL images for DMABufs with file descriptors -1, -1 and -1

It's webkitgtk2-4.1 not working with proprietary NVIDIA drivers bug: https://bugs.webkit.org/show_bug.cgi?id=261874

There's a lot of projects now hitting the same bug:

@phpony
Copy link
Author

phpony commented Jan 12, 2024

Another workaround that also does the thing:

__NV_PRIME_RENDER_OFFLOAD=1 telegram-desktop

@phpony
Copy link
Author

phpony commented Jan 15, 2024

Fixed in current Debian Trixie with libwebkit2gtk update to v2.42.4-1.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants