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

Webview Crash when trying to add credit card for /gift subscription #28559

Closed
gbcox opened this issue Oct 21, 2024 · 12 comments
Closed

Webview Crash when trying to add credit card for /gift subscription #28559

gbcox opened this issue Oct 21, 2024 · 12 comments

Comments

@gbcox
Copy link

gbcox commented Oct 21, 2024

Steps to reproduce

  1. Enter /gift in @premiumbot
  2. Select recipient
  3. Choose length of subscription
  4. In checkout popup select: Payment Method
  5. New Card popup appears with message: Error Webview Has Crashed

Expected behaviour

You should be prompted to enter payment method, i.e. credit card number

Actual behaviour

Receive message: Error: WebView has crashed.

Operating system

Fedora 40, Plasma 6

Version of Telegram Desktop

Version 5.6.3

Installation source

Static binary from official website

Crash ID

No response

Logs

No response

@gbcox gbcox added the bug label Oct 21, 2024
@Aokromes
Copy link
Collaborator

plz enable beta, restart telegram and send crash id on next start and post id here.

@gbcox
Copy link
Author

gbcox commented Oct 22, 2024

plz enable beta, restart telegram and send crash id on next start and post id here.

Thanks for the quick reply. Telegram isn't crashing itself, it appears only webview - and as far as I can tell, no crash id is being generated. I tried activating enable webview inspection, but when I right-click on the popup window nothing happens. Beta was enabled.

@ilya-fedin
Copy link
Contributor

ilya-fedin commented Oct 22, 2024

What version of webkitgtk do you have? webkitgtk 2.46+ doesn't work with web bots on Wayland, see #25126

@gbcox
Copy link
Author

gbcox commented Oct 22, 2024

What version of webkitgtk do you have? webkitgtk 2.46+ doesn't work with web bots on Wayland, see #25126

Ah, ok. I have: webkitgtk6.0-2.46.1-1.fc40.x86_64

Thanks for the quick reply!

The workaround is to just use the iphone app or web app. So it isn't the end of the world, but hopefully it can eventually be resolved. It's a bit annoying. I use the desktop app all the time.

@ilya-fedin
Copy link
Contributor

ilya-fedin commented Oct 22, 2024

You can use flatpak or snap version that have webkitgtk bundled or switch to x11 that operates with web bots with way less bugs in general thanks to native window embedding present in x11.

@ilya-fedin
Copy link
Contributor

ilya-fedin commented Oct 22, 2024

So it isn't the end of the world, but hopefully it can eventually be resolved. It's a bit annoying.

I'm very doubt it will be. I'm thinking about stopping efforts of supporting web bots on Wayland. They get broken by new upstream changes even before fixes for previous breakages get released. E.g., previous time they got broken by libwayland 1.23 which was released 4 months ago and Qt 6.8 that fixed the issue was released only at October 8. But webkitgtk 2.46 that added the new issue breaking them again was released at September 18. I.e. another breakage got introduced earlier than the fix for previous one was released. That's just insane.

@gbcox
Copy link
Author

gbcox commented Oct 22, 2024

@ilya-fedin Have faith. They'll get it straightened out.

@ilya-fedin
Copy link
Contributor

ilya-fedin commented Oct 22, 2024

No, they won't, because tdesktop embeds webkitgtk into Qt UI with QtWaylandCompositor library that is meant to make compositors for Qt commerical users such as automotive companies manufacturing head units. They run those compositors bare metal. While tdesktop uses this library to create a nested compositor for window embedding. As this use case is not typical for the library, it crashes (entire application) on a second EGL integration construction (happening when you open web bot a second time as it creates QWaylandCompositor object a second time). I reported it long time ago as https://bugreports.qt.io/browse/QTBUG-115063 but then Qt employee honestly said my use case is not well-supported (and they don't really care about that I guess as tdesktop isn't a commercial user). As a workaround for that, I disabled access to EGL for webkitgtk process. But then https://bugs.webkit.org/show_bug.cgi?id=280239 (mentioned in #25126) has come in webkitgtk 2.46 and the maintainer says "EGL has been mandatory for a while (and was always mandatory with Wayland)." in bug report which I read as it's not going to be fixed (with a reasonable deadline at least). It's not suprising given that when you don't have a graphics driver, you still have llvmpipe and EGL still works. It's solely tdesktop use-case that works around the Qt bug so I have no doubt both those issues aren't going to be fixed in a decade (or maybe forever). No one else will encounter them. And tdesktop users complain only here, not going into upstream bugtrackers, so they don't see how much the issue is widespread for end users. That issue calling people to vote for bugs doesn't seem to work, too.

@gbcox
Copy link
Author

gbcox commented Nov 1, 2024

Hey, good news! With the latest updates the issue has been fixed.

@ilya-fedin
Copy link
Contributor

ilya-fedin commented Nov 1, 2024

That is only because Qt is now patched to prevent QTBUG-115063... I.e. all third-party builds using vanilla Qt will still crash. And longer term I believe Wayland compatibility will have to be removed anyway. WebView works the best via Xwayland.

@gbcox
Copy link
Author

gbcox commented Nov 1, 2024

I'm hopefull they'll work to get it all straightened out. They're good people.

@ilya-fedin
Copy link
Contributor

ilya-fedin commented Nov 1, 2024

IDK who you're talking about. My experience contacting Qt people so far is that they don't care about use cases other than their paid clients and maybe KDE. tdesktop is neither of these. I haven't contacted WebKit/GTK people but those look like caring only about GNOME/epiphany use cases.

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

No branches or pull requests

3 participants