AutomaApp / automa

A browser extension for automating your browser by connecting blocks
https://www.automa.site
Other
11.43k stars 1.23k forks source link

"automaSetVariable" that is executed in new window can't overwrite existing variables. #1545

Closed UnluckyNinja closed 10 months ago

UnluckyNinja commented 10 months ago

Describe the bug A variable like $$foo will not be overwritten in v1.28.21, if the js block containing it is executed in new window.

To Reproduce I created a reproduction workflow: https://automa.site/workflow/yCm4ck9zI2tDZpu-2Luz5

0: delete variable "test" in storage if it exists. 1: Add block: new window (https://github.com for example) 2: Add block: javascript block (automaSetVariable('$$test', 1)) 3: Add block: javascript block (automaSetVariable('$$test', 42)) 4: Add block: close active tab/window (for convenience)

In current version, "test" will be 1 instead of 42.

Expected behavior The variable should be overwritten

Screenshots

Desktop (please complete the following information):

Additional context It works as expected at least before v1.28.18, as far as I can remember.