vscodium: can't use wayland flags anymore

On Arch/sway, Electron 14.0.1-1 Happening with both vscodium 1.60.1-2 and vscodium-bin-1.60.1-3

recently, everytime I launch codium --enable-features=UseOzonePlatform --ozone-platform=wayland app is crashing with

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

full log with codium --verbose --log=TRACE --enable-features=UseOzonePlatform --ozone-platform=wayland

https://gist.github.com/kushraj/b8793aee0881c078e5974cd81b253038

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 21 (3 by maintainers)

Most upvoted comments

This issue has returned as of version:

Version: 1.63.2 Commit: 899d46d82c4c95423fb7e10e68eba52050e30ba3 Date: 2021-12-17T00:20:01.675Z Electron: 13.5.2 Chromium: 91.0.4472.164 Node.js: 14.16.0 V8: 9.1.269.39-electron.0 OS: Linux x64 5.16.3-arch1-1

No flags work, actually. They all report some variation of Warning: 'enable-features' is not in the list of known options, but still passed to Electron/Chromium.

EDIT: This Arch package bug report for Electron could be related.

The wayland flags still need to be used to enable wayland, but the error still comes up:

code --ozone-platform=wayland --enable-features=WaylandWindowDecorations
Warning: 'ozone-platform' is not in the list of known options, but still passed to Electron/Chromium.
Warning: 'enable-features' is not in the list of known options, but still passed to Electron/Chromium.
Version: 1.67.2
Commit: c3511e6c69bb39013c4a4b7b9566ec1ca73fc4d5
Date: 2022-05-17T18:23:40.286Z
Electron: 17.4.1
Chromium: 98.0.4758.141
Node.js: 16.13.0
V8: 9.8.177.13-electron.0
OS: Linux x64 5.18.2

JFYI, v1.66.0 is using electron v17.2.0. The next release might use v17.3.0.

@bugrasan vscode migrated to 17.3.0 which does not cover the wayland fix, it was introduced in 17.3.1

You can workaround this issue with this until electron version gets bumped: vscodium --enable-features=UseOzonePlatform --ozone-platform=wayland --log debug --log debug

Let’s keep it opened since the issue haven’t been really fixed. So other users can find it more easily.

The issue was fixed in electron 13.6.9 but VSCode (as of 1.65) uses 13.5.2 for packaging. This can be resolved by bumping the electron target defined in .yarnrc and package.json. I have managed to run the wayland flags with custom prepare step of arch’s vscodium 1.65.0-1 PKGBUILD, it’s not perfect but it should work while waiting for migration to higher electron target.

prepare() {
    cd 'vscodium'
    rm -rf 'vscode'
    mv '../vscode' 'vscode'

    cd 'vscode'
    
    cat > .yarnrc << EOF
disturl "https://electronjs.org/headers"
target "13.6.9"
runtime "electron"
build_from_source "true"
EOF

    npx -y add-dependencies electron@13.6.9
    npx -y add-dependencies --dev electron@13.6.9

    # it will fail if your node version is NOT >=14.17.4 and <17
    # script later uses nvm, this is just workaround
    yarn install --mode update-lockfile
}

EDIT: This Arch package bug report for Electron could be related.

It seems it is not related to the Arch bug report (fix arrived yesterday). I still have the bug after updating electron13.