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

Appimage wont start at all (1.51)(Wayland) #377

Open
squalou opened this issue Jul 15, 2024 · 6 comments
Open

Appimage wont start at all (1.51)(Wayland) #377

squalou opened this issue Jul 15, 2024 · 6 comments

Comments

@squalou
Copy link

squalou commented Jul 15, 2024

Bug Description:

Downloaded latest Appimage, chmod +x, try to run it.

First I got a segmentation fault, tried again and since then I get

Error: node-loader:
Error: /tmp/.mount_TheiaInkhtIA/resources/app/lib/backend/native/pty.node: cannot open shared object file: No such file or directory
    at 24632 (/tmp/.mount_TheiaInkhtIA/resources/app/lib/backend/268.js:2:599)

sometimes the seg fault is back

Steps to Reproduce:

  1. Download latet AppImage (at the moment : 1.51)
  2. chmod +x TheiaIDE.AppImage
  3. ./TheiaIDE.AppImage
Error: node-loader:
Error: /tmp/.mount_TheiaInkhtIA/resources/app/lib/backend/native/pty.node: cannot open shared object file: No such file or directory
    at 24632 (/tmp/.mount_TheiaInkhtIA/resources/app/lib/backend/268.js:2:599)
    at i (/tmp/.mount_TheiaInkhtIA/resources/app/lib/backend/main.js:1:14494)
    at 85969 (/tmp/.mount_TheiaInkhtIA/resources/app/lib/backend/268.js:2:1392011)
    at i (/tmp/.mount_TheiaInkhtIA/resources/app/lib/backend/main.js:1:14494)
    at 87047 (/tmp/.mount_TheiaInkhtIA/resources/app/lib/backend/268.js:2:1387699)
    at i (/tmp/.mount_TheiaInkhtIA/resources/app/lib/backend/main.js:1:14494)
    at 3979 (/tmp/.mount_TheiaInkhtIA/resources/app/lib/backend/268.js:2:410632)
    at i (/tmp/.mount_TheiaInkhtIA/resources/app/lib/backend/main.js:1:14494)
    at 47552 (/tmp/.mount_TheiaInkhtIA/resources/app/lib/backend/268.js:2:402568)
    at i (/tmp/.mount_TheiaInkhtIA/resources/app/lib/backend/main.js:1:14494)


Additional Information

  • Operating System: PopOS 22.04
  • Theia Version: 1.51
  • Using Wayland

Workaround

see below to use x11 instead of wayland

@msujew msujew transferred this issue from eclipse-theia/theia Jul 15, 2024
@squalou
Copy link
Author

squalou commented Jul 15, 2024

OK probably my bad : I'm using wayland.

./TheiaIDE.AppImage --ozone-platform=x11

and it works

@JonasHelming
Copy link
Contributor

@squalou Is this issue then closed for you or do you want to adapt the description?

@maehne
Copy link

maehne commented Aug 13, 2024

I am observing the same issue in a KDE Plasma 6 Wayland session on an up-to-date Endeavour OS. Launching the TheiaIDE.AppImage (version 1.52) gives:

$ ~/Downloads/TheiaIDE.AppImage             
Configuring to accept webviews on '^.+\.webview\..+$' hostname.
2024-08-13T12:14:46.233Z root INFO Backend u.initialize: 14.8 ms [Finished 0.413 s after backend start]
2024-08-13T12:14:46.237Z root INFO Backend Object.initialize: 13.8 ms [Finished 0.413 s after backend start]
2024-08-13T12:14:46.237Z root INFO Backend a.initialize: 1.2 ms [Finished 0.413 s after backend start]
2024-08-13T12:14:46.237Z root INFO Backend a.initialize: 1.0 ms [Finished 0.413 s after backend start]
2024-08-13T12:14:46.237Z root INFO Backend a.initialize: 0.8 ms [Finished 0.413 s after backend start]
2024-08-13T12:14:46.237Z root INFO Backend f.initialize: 0.9 ms [Finished 0.413 s after backend start]
2024-08-13T12:14:46.237Z root INFO Backend l.initialize: 0.8 ms [Finished 0.413 s after backend start]
2024-08-13T12:14:46.239Z root INFO Backend l.initialize: 15.0 ms [Finished 0.414 s after backend start]
2024-08-13T12:14:46.242Z root INFO configured all backend app contributions
2024-08-13T12:14:46.242Z root INFO Backend l.onStart: 1.0 ms [Finished 0.423 s after backend start]
2024-08-13T12:14:46.242Z root INFO Configuration directory URI: 'file://~/.theia'
2024-08-13T12:14:46.243Z root INFO Theia app listening on http://127.0.0.1:38355.
2024-08-13T12:14:46.244Z root INFO Backend g.onStart: 1.7 ms [Finished 0.424 s after backend start]
2024-08-13T12:14:46.244Z root INFO Backend a.onStart: 0.2 ms [Finished 0.425 s after backend start]
2024-08-13T12:14:46.254Z root INFO Backend p.onStart: 0.2 ms [Finished 0.425 s after backend start]
2024-08-13T12:14:46.254Z root INFO Backend n.onStart: 9.8 ms [Finished 0.435 s after backend start]
2024-08-13T12:14:46.254Z root INFO Finished starting backend application: 0.0 ms [Finished 0.435 s after backend start]
2024-08-13T12:14:46.255Z root WARN The local plugin referenced by local-dir:~/.theia-ide/plugins does not exist.
2024-08-13T12:14:46.256Z root WARN The local plugin referenced by local-dir:~/.theia-ide/deployedPlugins does not exist.
2024-08-13T12:14:46.293Z root INFO Resolve plugins list: 49.7 ms [Finished 0.473 s after backend start]
2024-08-13T12:14:46.368Z root INFO Deploy plugins list: 125.2 ms [Finished 0.549 s after backend start]
[1]    30395 segmentation fault (core dumped)  ~/Downloads/TheiaIDE.AppImage

The workaround ./TheiaIDE.AppImage --ozone-platform=x11 by @squalou makes Theia IDE launch successfully and use its proper icon. After that, --ozone-platform=x11 is not any more necessary. However, the IDE gets assigned a generic Wayland icon:

grafik

See here, here, and here for options on how to fix it.

@squalou
Copy link
Author

squalou commented Aug 13, 2024

@squalou Is this issue then closed for you or do you want to adapt the description?

Well I don't know if this is to be considered an issue, or just a missing documentation somewhere,
I'll just adapt the description for now to help maybe other people find it, but as far as I'm concerned you also could close the issue due to the workaround.

@maehne
Copy link

maehne commented Aug 13, 2024

From my point of view, this is clearly a Wayland-related issue, which should be kept open until the workaround --ozone-platform=x11 is not necessary.

@squalou squalou changed the title Appimage wont start at all (1.51) Appimage wont start at all (1.51)(Wayland) Aug 14, 2024
@tvannoy
Copy link

tvannoy commented Jan 10, 2025

I just download the latest theia-ide appimage and ran into the same issue reported by OP. theia segfaults when being run for the first time without --ozone-platform=x11

I've included a workaround summary that lets Theia run wayland-native at the bottom. Below are some thoughts and debugging details.

Debugging details

Running with --ozone-platform=x11 lets theia run just fine. However, it uses x11-wayland, which doesn't support fractional scaling, so theia looks terrible on my laptop under x11-wayland.

I was able to run theia with --ozone-platform=wayland and it correctly uses wayland and fractional scaling works, so theia does indeed work natively on wayland. However, I tried running the appimage for the first time (immediately after downloading) using --ozone-platform=wayland and it segfaulted, so it appears that theia needs to be run under x11-wayland first, then it will work wayland-native after that.

Electron apps generally don't use wayland by default yet, so we have to run electron apps with --ozone-platform=wayland or --ozone-platform-hint=wayland (--ozone-platform-hint=auto also works sometimes). There's also an ELECTRON_OZONE_PLATFORM_HINT environment variable that can be set.

I have ELECTRON_OZONE_PLATFORM_HINT set to auto. The appimage uses wayland without any arguments for me, i.e., ./TheiaIDE.AppImage uses wayland. So indeed, --ozone-platform=x11 is needed on first launch, but after that all the ways to force electron to use wayland appear to be working.

If someone else wants to verify that using --ozone-platform=x11 is needed upon first launch, that would be great.

I don't think needing --ozone-platform=x11 on first launch is an electron issue, but it might be. It could be a Theia issue or an electron issue. I did not need to use --ozone-platform=x11 the first time I launched VS Codium, which makes me think this is a Theia issue. However, I haven't verified that Codium and Theia are using the same electron version.


Workaround summary

To get Theia to use wayland:

  1. Run the appimage with --ozone-platform=x11 the first time you run it: ./TheiaIDE.AppImage --ozone-platform=x11
  2. Run Theia with --ozone-platform=wayland, --ozone-platform-hint=wayland, --ozone-platform-hint=auto, or setting the ELECTRON_OZONE_PLATFORM_HINT environment variable to auto or wayland.

In my experience, Theia uses the correct icon instead of a generic wayland icon. This might just be something that is fixed/different in version 1.57.100 vs 1.51. I have not verified this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants