App open
event broken: fires only once, passed arguments are jumbled up
#7991
Labels
open
event broken: fires only once, passed arguments are jumbled up
#7991
Issue Type
Current/Missing Behavior
Two issues in regards to the App
open
event, on both NW1 and NW2:The event does only trigger once.
This was apparently fixed multiple times, last time in BUG: Event 'open' stop works after once triggered #7969 and prior to that in Event 'open' on app is triggered once #7860.
0.67 was the last version where the event fired more than once.
The first argument of the event's callback (aka. the passed argument string) is completely messed up and its content jumbled.
It not only mixes the passed command line with those set in the manifest's
chromium-args
field, but it also adds NW.js and Chromium specific ones, like--nwapp=...
,--no-sandbox
, or--user-data-dir=...
, etc., and most importantly, it messes with the order of passed arguments, which is a big issue.For example, if I pass the following arguments when launching the same NW.js app twice:
/path/to/nw --foo bar --baz=qux -a b -cd 123
Then the resulting argument string of the
open
event is/path/to/nw --foo --baz=qux -a -cd --enable-crashpad CONTENTS_OF_CHROMIUM_ARGS_FIELD --user-data-dir=/path/to/user-data-dir --no-sandbox --no-zygote --flag-switches-begin --flag-switches-end --nwapp=/path/to/nwapp bar b 123
As you can see, this breaks the
paramname paramvalue
syntax, as it moves every word/token starting with-
to the beginning.Additional Info
Reproduction
package.json
index.html
The text was updated successfully, but these errors were encountered: