telegramdesktop / tdesktop

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

Wallet "Error: Could not initialize Webview" #26854

Closed AgostinoA closed 1 year ago

AgostinoA commented 1 year ago

Steps to reproduce

  1. Open app of Linux
  2. Enter in Wallet view

Expected behaviour

  1. Open app of Linux
  2. Enter in Wallet view
  3. Open page of Wallet

Actual behaviour

  1. Open app of Linux
  2. Enter in Wallet view
  3. Error page of Wallet => "Error: Could not initialize Webview"
  4. Crash app

Scrot-4734

Operating system

Custom OS Linux. LXQT, X11

Version of Telegram Desktop

V 4.10

Installation source

Static binary from official website

Logs

(Telegram:31741): GLib-CRITICAL **: 11:50:08.022: Source ID 27 was not found when attempting to remove it

Advice

I recommend you bring a version of the webview, GTK with GLIBC included. Bring all dependencies included, each OS has its own, to avoid errors.

ilya-fedin commented 1 year ago

I recommend you bring a version of the webview, GTK with GLIBC included.

What do you mean by "bring a version"?

Logs

That's not the logs. The issue template tells how to get the logs right. Pleas provide the logs as instructed by the issue template.

AgostinoA commented 1 year ago

I recommend you bring a version of the webview, GTK with GLIBC included.

What do you mean by "bring a version"?

Logs

That's not the logs. The issue template tells how to get the logs right. Pleas provide the logs as instructed by the issue template.

I intend to put all the necessary libraries in the package without using the system ones to avoid incompatibility, including glibc as most appimages do, for example

ilya-fedin commented 1 year ago

I intend to put all the necessary libraries in the package without using the system ones to avoid incompatibility

That won't work. Linking glibc statically is not possible, it means you have to use musl instead and then you can't use system libraries. OpenGL drivers are system libraries so you can't use OpenGL with such approach and that's a no-go. Linking gtk statically means you would have problems with system themes and various functionality that gtk has in plugin format. Linking webkit statically is likely not possible cause it has a separate executable due its multiprocessing architecture. What is not less important, web engines are huge and tdesktop would become huge what is a non-goal.

including glibc as most appimages do, for example

Telegram's binary is not an appimage but a static binary and as far as I know, appimages don't support bundling glibc (yeah, you can force that but that's discouraged and unsupported, I haven't encountered a single appimage using that).

ilya-fedin commented 1 year ago

I still don't see a log.txt.

ilya-fedin commented 1 year ago

Note that this error message means that webkit is found but some problem is happened during initialization. If there was a problem with finding the library, you would get a completely another message.

AgostinoA commented 1 year ago

I intend to put all the necessary libraries in the package without using the system ones to avoid incompatibility

That won't work. Linking glibc statically is not possible, it means you have to use musl instead and then you can't use system libraries. OpenGL drivers are system libraries so you can't use OpenGL with such approach and that's a no-go. Linking gtk statically means you would have problems with system themes and various functionality that gtk has in plugin format. Linking webkit statically is likely not possible cause it has a separate executable due its multiprocessing architecture. What is not less important, web engines are huge and tdesktop would become huge what is a non-goal.

including glibc as most appimages do, for example

Telegram's binary is not an appimage but a static binary and as far as I know, appimages don't support bundling glibc (yeah, you can force that but that's discouraged and unsupported, I haven't encountered a single appimage using that).

It is not true that OpenGL doesn't work anymore, all Appimages including some emulators and many apps do. They quietly bring glibc and quietly use OpenGL. Trust me it can be done, done on many apps. Whether a problem run it by you is another point of view.

ilya-fedin commented 1 year ago

As I said: appimages don't bundle glibc. If they really bundled it, they wouldn't have working OpenGL.

ilya-fedin commented 1 year ago

If you won't provide log.txt, this issue will get closed due to the lack of required information.

AgostinoA commented 1 year ago

As I said: appimages don't bundle glibc. If they really bundled it, they wouldn't have working OpenGL.

It's not like that, I assure you. Now I'll pass you the log.txt

ilya-fedin commented 1 year ago

It's not like that, I assure you.

I had some experience with appimage tooling and I unpacked some appimages so I assure you, too.

AgostinoA commented 1 year ago

I solved it myself thanks, too bad it's not like this. I created appimage and brought the necessary items, thanks anyway. There is always a solution to everything remember... I have fixed 1000 appimages and they happen to work, so I have complete certainty. I tell you that Vulkan also works with the validation system, if one wants. Perhaps the path is not yet clear or known to anyone.