FS#75667 - [code][electron{18,19,20}] unable to read electron18,19,20}-flags.conf
Attached to Project:
Community Packages
Opened by bacteriostat (bacteriostat) - Monday, 22 August 2022, 08:16 GMT
Last edited by Massimiliano Torromeo (mtorromeo) - Tuesday, 14 March 2023, 21:27 GMT
Opened by bacteriostat (bacteriostat) - Monday, 22 August 2022, 08:16 GMT
Last edited by Massimiliano Torromeo (mtorromeo) - Tuesday, 14 March 2023, 21:27 GMT
|
Details
Description:
Package electron18 should read flags from electron18-flags.conf but it fails to do so in version 18.3.9 and shows the below error: > /usr/lib/electron18/electron: bad option: --ozone-platform-hint=auto This happens with any flag and results in application not launching at all. Removing all flags from the file fixes it. This works fine on 18.3.6 Additional info: * package version(s): 18.3.9 * https://github.com/electron/electron/issues/35398 Steps to reproduce: 1) Upgrade electron18 to version 18.3.9 2) Set some flags in ~/.config/electron18-flags.conf file. Example: --ozone-platform-hint=auto 3) Launch a program that makes use of electron18, for example: "code" from the repos. |
This task depends upon
Closed by Massimiliano Torromeo (mtorromeo)
Tuesday, 14 March 2023, 21:27 GMT
Reason for closing: Fixed
Additional comments about closing: code-1.76.1-2
Tuesday, 14 March 2023, 21:27 GMT
Reason for closing: Fixed
Additional comments about closing: code-1.76.1-2
In any case this has very likely been introduced by the change for
FS#74034. I bet that if you reverse https://github.com/archlinux/svntogit-community/commit/f1bc01d61ed2f713efdc6d33104600e0f79ada10#diff-a9d028136db20390534ea297df670ab599022de8dcb57c1b71fd4913d7a1f7d7 in /usr/bin/electron18, it should work again.I’m not sure what the best path here. Maybe the code launcher behaviour should be investigated and improved.
Dupe
FS#75783I don't even know why that variable was set in the script, and I am leaning towards just removing it but does anyone know more about why it might be needed?
I used --ozone-platform-hint=auto in electron19-flags.conf file. It didn't work. But directly passing it via shell works.
`code --ozone-platform-hint=auto` executes `exec /usr/lib/electron19/electron /usr/lib/code/out/cli.js /usr/lib/code/code.js --ozone-platform-hint=auto`
`code` with `--ozone-platform-hint=auto` in the config file executes `exec /usr/lib/electron19/electron --ozone-platform-hint=auto /usr/lib/code/out/cli.js /usr/lib/code/code.js`
The order of the arguments configured in the flags file is controlled by the electron script and there is nothing I can change in code to fix that. You can use `~/.config/code-flags.conf` though and it should put the flags at the end of the command.
Putting the flag at the end causes this `Warning: 'ozone-platform-hint' is not in the list of known options, but still passed to Electron/Chromium.` so it seems to me like it would actually be correct to put it in electron19-flags.conf rather than in code-flags.conf
You can test this is the case by changing `/usr/bin/electron19` so that the first line is `#!/usr/bin/bash -x`
Why is that code does not pick up the flag but bitwarden picks the flag?
FS#76483(or at least closely related)CLI commands, as per the above linked issue, they are currently broken.
Could the ELECTRON_RUN_AS_NODE=1 variable be added back for the time being?
It is necessary as per upstream (see linked issue) and it breaks my Ansible deployment playbooks when it is missing.