flathub / flathub/com.visualstudio.code

Fails to start – Unable to open X display / Failed to connect to Wayland display

Đang mở
#281 2 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Shell
Star
217
Fork
82
Merge trung bình
1 ngày 7 giờ
Pull request đã merge (30 ngày)
1

Mô tả

Flatpak app `com.visualstudio.code` fails to start on my system, both in X11 and Wayland mode, even with `--no-sandbox` and/or `ZYPAK_DISABLE_SANDBOX=1`. I also tried #271, but it behaves identically. However, [com.visualstudio.code-oss](https://github.com/flathub/com.visualstudio.code-oss) starts without any problem in both X11 and Wayland mode. Other Electron-based Flatpak apps also work without problem.

```
$ flatpak run com.visualstudio.code --verbose
[2 preload-host-spawn-strategy] Running: /app/bin/zypak-helper child - /app/extra/vscode/code --type=zygote
[2:0130/212424.506496:ERROR:browser_main_loop.cc(1402)] Unable to open X display.
The futex facility returned an unexpected error code.
```

```
$ flatpak override --socket=wayland com.visualstudio.code
$ flatpak run com.visualstudio.code --enable-features=UseOzonePlatform --ozone-platform=wayland --verbose
Warning: 'enable-features' is not in the list of known options, but still passed to Electron/Chromium.
Warning: 'ozone-platform' is not in the list of known options, but still passed to Electron/Chromium.
[2 preload-host-spawn-strategy] Running: /app/bin/zypak-helper child - /app/extra/vscode/code --type=zygote
[2:0130/213001.214324:ERROR:wayland_connection.cc(127)] Failed to connect to Wayland display
[2:0130/213001.214368:FATAL:ozone_platform_wayland.cc(173)] Failed to initialize Wayland platform
```

$ ZYPAK_DEBUG=1 flatpak run com.visualstudio.code --enable-features=UseOzonePlatform --ozone-platform=wayland --verbose
(click here to expand…)

[2 zypak-helper] Determining sandbox strategy...

[2 zypak-helper] Added task source 0x55a259a362e0
[2 zypak-helper] Lifting task 0x55a259a362e0 to trigger
[2 zypak-helper] Added task source 0x55a259a36570
[2 zypak-helper] Lifting task 0x55a259a36570 to trigger
[2 zypak-helper] D-Bus watch add 3 with flags 1
[2 zypak-helper] Adding I/O source 0x55a259a367d0 for 3
[2 zypak-helper] Added task source 0x55a259a36c20
[2 zypak-helper] Pumping bus thread
[2 zypak-helper] Begin dispatch
[2 zypak-helper] Received event from 0x55a259a36c20
[2 zypak-helper] Added timer source 0x7fec700010d0 with duration 25000ms
[2 zypak-helper] Pumping bus thread
[2 zypak-helper] Begin dispatch
[2 zypak-helper] Received event from 0x55a259a367d0
[2 zypak-helper] Incoming events on D-Bus watch 3: 1
[2 zypak-helper] Disable source 0x7fec700010d0
[2 zypak-helper] Got D-Bus wake request
[2 zypak-helper] Trigger source 0x55a259a36570
[2 zypak-helper] Pumping bus thread
[2 zypak-helper] Begin dispatch
[2 zypak-helper] Received event from 0x55a259a36570
[2 zypak-helper] Dispatching on bus thread
[2 zypak-helper] CallAsync returned
[2 zypak-helper] Got D-Bus dispatch status
[2 zypak-helper] Pumping bus thread
[2 zypak-helper] Added task source 0x55a259a37090
[2 zypak-helper] Begin dispatch
[2 zypak-helper] Received event from 0x55a259a37090
[2 zypak-helper] Added timer source 0x55a259a36c20 with duration 25000ms
[2 zypak-helper] Pumping bus thread
[2 zypak-helper] Begin dispatch
[2 zypak-helper] Received event from 0x55a259a367d0
[2 zypak-helper] Incoming events on D-Bus watch 3: 1
[2 zypak-helper] Disable source 0x55a259a36c20
[2 zypak-helper] Got D-Bus wake request
[2 zypak-helper] Trigger source 0x55a259a36570
[2 zypak-helper] Got D-Bus dispatch status
[2 zypak-helper] Trigger source 0x55a259a36570
[2 zypak-helper] Pumping bus thread
[2 zypak-helper] Begin dispatch
[2 zypak-helper] Received event from 0x55a259a36570
[2 zypak-helper] Dispatching on bus thread
[2 zypak-helper] CallAsync returned
[2 zypak-helper] Got D-Bus dispatch status
[2 zypak-helper] Pumping bus thread
[2 zypak-helper] Shutting down bus thread...
[2 zypak-helper] Trigger source 0x55a259a362e0
[2 zypak-helper] Begin dispatch
[2 zypak-helper] Received event from 0x55a259a362e0
[2 zypak-helper] Bus thread shutdown complete
[2 zypak-helper] D-Bus watch remove 3
[2 zypak-helper] Disable source 0x55a259a367d0
[2 zypak-helper] D-Bus watch remove 3
[2 zypak-helper] Got D-Bus wake request
[2 zypak-helper] Trigger source 0x55a259a36570
[2 zypak-helper] Got D-Bus dispatch status
[2 zypak-helper] Trigger source 0x55a259a36570
[2 zypak-helper] Spawn strategy is enabled
[2 zypak-helper] Preload is: /app/bin/../lib/libzypak-preload-host.so:/app/bin/../lib/libzypak-preload-host-spawn-strategy.so
[2 zypak-helper] /app/extra/vscode/code /app/extra/vscode/resources/app/out/cli.js --ms-enable-electron-run-as-node --extensions-dir=/home/xxx/.var/app/com.visualstudio.code/data/vscode/extensions --enable-features=UseOzonePlatform --ozone-platform=wayland --verbose
[2 preload-host-spawn-strategy] Added task source 0x33271d39ad80
[2 preload-host-spawn-strategy] Lifting task 0x33271d39ad80 to trigger
[2 preload-host-spawn-strategy] Added task source 0x33271d39ac60
[2 preload-host-spawn-strategy] Lifting task 0x33271d39ac60 to trigger
[2 preload-host-spawn-strategy] D-Bus watch add 3 with flags 1
[2 preload-host-spawn-strategy] Adding I/O source 0x33271d39ab40 for 3
[2 preload-host-spawn-strategy] Pumping bus thread
[2 preload-host-spawn-strategy] Adding I/O source 0x33271d39aa20 for 6
[2 preload-host-spawn-strategy] Added task source 0x33271d39a900
[2 preload-host-spawn-strategy] Begin dispatch
[2 preload-host-spawn-strategy] Received event from 0x33271d39a900
[2 preload-host-spawn-strategy] Added timer source 0x33271d39a7e0 with duration 25000ms
[2 preload-host-spawn-strategy] Disable source 0x33271d39a7e0
[2 preload-host-spawn-strategy] Got D-Bus wake request
[2 preload-host-spawn-strategy] Trigger source 0x33271d39ac60
[2 preload-host-spawn-strategy] Pumping bus thread
[2 preload-host-spawn-strategy] Begin dispatch
[2 preload-host-spawn-strategy] Received event from 0x33271d39ac60
[2 preload-host-spawn-strategy] Dispatching on bus thread
[2 preload-host-spawn-strategy] Got D-Bus dispatch status
[2 preload-host-spawn-strategy] Pumping bus thread
Warning: 'enable-features' is not in the list of known options, but still passed to Electron/Chromium.
Warning: 'ozone-platform' is not in the list of known options, but still passed to Electron/Chromium.
[2 preload-host-spawn-strategy] Prepare for fork
[2 preload-host-spawn-strategy] Shutting down bus thread...
[2 preload-host-spawn-strategy] Trigger source 0x33271d39ad80
[2 preload-host-spawn-strategy] Begin dispatch
[2 preload-host-spawn-strategy] Received event from 0x33271d39ad80
[2 preload-host-spawn-strategy] Bus thread shutdown complete
[2 preload-host-spawn-strategy] Resume bus in parent
[2 preload-host-spawn-strategy] Pumping bus thread
[22 zypak-helper] Added task source 0x561006682f90
[22 zypak-helper] Lifting task 0x561006682f90 to trigger
[22 zypak-helper] Added task source 0x5610066835c0
[22 zypak-helper] Lifting task 0x5610066835c0 to trigger
[22 zypak-helper] D-Bus watch add 3 with flags 1
[22 zypak-helper] Adding I/O source 0x561006683820 for 3
[22 zypak-helper] Spawn latest of /app/bin/zypak-helper host /app/extra/vscode/code --extensions-dir=/home/jirutjak/.var/app/com.visualstudio.code/data/vscode/extensions --enable-features=UseOzonePlatform --ozone-platform=wayland --in-process-gpu --verbose
[22 zypak-helper] Pumping bus thread
[22 zypak-helper] Added task source 0x561006684a40
[22 zypak-helper] Begin dispatch
[22 zypak-helper] Received event from 0x561006684a40
[22 zypak-helper] Added timer source 0x7f2ec80010d0 with duration 25000ms
[22 zypak-helper] Pumping bus thread
[22 zypak-helper] Begin dispatch
[22 zypak-helper] Received event from 0x561006683820
[22 zypak-helper] Incoming events on D-Bus watch 3: 1
[22 zypak-helper] Disable source 0x7f2ec80010d0
[22 zypak-helper] Got D-Bus wake request
[22 zypak-helper] Trigger source 0x5610066835c0
[22 zypak-helper] Pumping bus thread
[22 zypak-helper] Begin dispatch
[22 zypak-helper] Received event from 0x5610066835c0
[22 zypak-helper] Dispatching on bus thread
[22 zypak-helper] CallAsync returned
[22 zypak-helper] Got D-Bus dispatch status
[22 zypak-helper] Pumping bus thread
[2 preload-host-spawn-strategy] waitpid(22)
[2 preload-host-spawn-strategy] Can't find stub pid data 22
[2 preload-host-spawn-strategy] Could not find stub pid data for 22
[2 preload-host-spawn-strategy] Running: /app/bin/zypak-helper child - /app/extra/vscode/code --type=zygote
[2:0130/213034.692073:ERROR:wayland_connection.cc(127)] Failed to connect to Wayland display
[2:0130/213034.692107:FATAL:ozone_platform_wayland.cc(173)] Failed to initialize Wayland platform

```
$ env
DISPLAY=:0
XDG_RUNTIME_DIR=/run/user/1000
XDG_SESSION_TYPE=wayland
WAYLAND_DISPLAY=wayland-1
...
```

* * *
**Environment:**
- Alpine Linux v3.15 on x86_64
- Sway 1.6.1
- Flatpak 1.12.3
- com.visualstudio.code 1.60.2

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.