[Test case needed] Global macro timeout is not reset if a child macro errors out


#1

I’ve encountered a problem related to maximum macro timout. Since breaking my long macro into several other macros and using the run command, this problem has occured:

[error] macro ‘Macro Name’ timeout 1800s (change the value in the settings if needed)

However, when I look at the variables I see this:
!RUNTIME “500.38s”

Not sure about this, but it seems to occur if an error occurs in a called macro (using the run command). After the error, I set focus on the parent macro and play it again, however, it is as if the on-going run time limit is not reset.


List of open bugs
#2

Hi

I have the same problem, I splitted macro in some parts and it returns many errors often also of timeout, but the macros individually work well, I think that it is a problem of the command RUN that when there are variables it doesn’t work correctly.

Here my post

https://forum.a9t9.com/t/run-command-and-variables-errors/2464/2


#4

A better example from the console. The first timeout occurrs at 19:51 in my child macro. I then restart the macro and the second timeout occurs at 19:54, again in the child macro. That is approx 3 minutes apart even though the timeout is set for 30 minutes.

background_csv_editor_desktop_screenshot_editor_popup_vision_editor.js:138
2019-05-13T19:51:48.432Z - index: 119, Error: macro ‘COS People address’ timeout 1800s (change the value in the settings if needed)
prev. @ background_csv_editor_desktop_screenshot_editor_popup_vision_editor.js:138
(anonymous) @ popup.js:8922
emit @ vendor.js:126702
__errLog @ popup.js:1058
stopWithError @ popup.js:749
(anonymous) @ popup.js:8416
runCallback @ popup.js:26980
(anonymous) @ popup.js:26938
popup.js:26983 Error: Error: macro ‘COS People address’ timeout 1800s (change the value in the settings if needed)
at Player.__errLog (popup.js:1067)
at Player.stopWithError (popup.js:749)
at Countdown.callback (popup.js:8416)
at Countdown.runCallback (popup.js:26980)
at popup.js:26938
runCallback @ popup.js:26983
(anonymous) @ popup.js:26938
popup.js:26938 [Violation] ‘setTimeout’ handler took 87ms
popup.js:1015 Uncaught (in promise) Error: Stop reason: ERROR
at popup.js:1015
(anonymous) @ popup.js:1015
setTimeout (async)
(anonymous) @ popup.js:1008
__createPromiseForStop @ popup.js:1007
__end @ popup.js:1043
__errLog @ popup.js:1065
stopWithError @ popup.js:749
(anonymous) @ popup.js:8416
runCallback @ popup.js:26980
(anonymous) @ popup.js:26938
popup.js:826 Uncaught (in promise) Error: token expired
at popup.js:826
(anonymous) @ popup.js:826

[I RESTART THE MACRO HERE]

background_csv_editor_desktop_screenshot_editor_popup_vision_editor.js:138 2019-05-13T19:54:46.833Z - command index: 119, Error: macro ‘COS People address’ timeout 1800s (change the value in the settings if needed)
prev. @ background_csv_editor_desktop_screenshot_editor_popup_vision_editor.js:138
(anonymous) @ popup.js:8922
emit @ vendor.js:126702
__errLog @ popup.js:1058
stopWithError @ popup.js:749
(anonymous) @ popup.js:8416
runCallback @ popup.js:26980
(anonymous) @ popup.js:26938
popup.js:26983 Error: Error: macro ‘COS People address’ timeout 1800s (change the value in the settings if needed)
at Player.__errLog (popup.js:1067)
at Player.stopWithError (popup.js:749)
at Countdown.callback (popup.js:8416)
at Countdown.runCallback (popup.js:26980)
at popup.js:26938
runCallback @ popup.js:26983
(anonymous) @ popup.js:26938
popup.js:26938 [Violation] ‘setTimeout’ handler took 58ms
popup.js:1015 Uncaught (in promise) Error: Stop reason: ERROR
at popup.js:1015
(anonymous) @ popup.js:1015
setTimeout (async)
(anonymous) @ popup.js:1008
__createPromiseForStop @ popup.js:1007
__end @ popup.js:1043
__errLog @ popup.js:1065
stopWithError @ popup.js:749
(anonymous) @ popup.js:8416
runCallback @ popup.js:26980
(anonymous) @ popup.js:26938
popup.js:826 Uncaught (in promise) Error: token expired
at popup.js:826


#5

This is not a timeout issue, but a bug somewhere in the RUN command management (it seems). => Do you have a macro for us that we can use to recreate this issue?

Or maybe a screencast of your macros running?


#6

Two macros are needed to demonstrate the issue. Please read the comments in the macro to see how to run them.

{
  "Name": "RUN Command Bug Parent (Play Me!)",
  "CreationDate": "2019-5-15",
  "Commands": [
    {
      "Command": "comment",
      "Target": "Open the browser console for the extension...",
      "Value": ""
    },
    {
      "Command": "store",
      "Target": "30",
      "Value": "!TIMEOUT_MACRO"
    },
    {
      "Command": "store",
      "Target": "0",
      "Value": "COUNTER"
    },
    {
      "Command": "open",
      "Target": "http://www.google.com",
      "Value": ""
    },
    {
      "Command": "while",
      "Target": "${COUNTER}<10",
      "Value": ""
    },
    {
      "Command": "run",
      "Target": "RUN Command Bug Child",
      "Value": ""
    },
    {
      "Command": "storeEval",
      "Target": "${COUNTER} + 1",
      "Value": "COUNTER"
    },
    {
      "Command": "endWhile",
      "Target": "",
      "Value": ""
    }
  ]
}

{
  "Name": "RUN Command Bug Child",
  "CreationDate": "2019-5-15",
  "Commands": [
    {
      "Command": "selectWindow",
      "Target": "tab=open",
      "Value": "https://about.google/intl/en/?fg=1&utm_source=google-US&utm_medium=referral&utm_campaign=hp-header"
    },
    {
      "Command": "storeEval",
      "Target": "${COUNTER}+1",
      "Value": "COUNTER"
    },
    {
      "Command": "pause",
      "Target": "5000",
      "Value": ""
    },
    {
      "Command": "comment",
      "Target": "First time through, click the stop button while paused in the child.",
      "Value": ""
    },
    {
      "Command": "comment",
      "Target": "After stopping, return to the parent macro and run again before the 30s timeout expires.",
      "Value": ""
    },
    {
      "Command": "comment",
      "Target": "Let the macro loop without stopping and watch the console to see the first timeout stop the macro.",
      "Value": ""
    },
    {
      "Command": "selectWindow",
      "Target": "tab=close",
      "Value": ""
    }
  ]
}

#7

@admin

The code use run command and I have same problems too

{
“Command”: “while”,
“Target”: “{COUNTER}&lt;10", "Value": "" }, { "Command": "run", "Target": "RUN Command Bug Child", "Value": "" }, { "Command": "storeEval", "Target": "{COUNTER} + 1”,
“Value”: “COUNTER”
},

Look This

Run command and shared variables and storeeval do not works well, it is the same problem that gave me the command run with variables and storeeval.


#8

Two macros to recreate are provided. I think if this problem is fixed, some of the apparently random freezes will be solved, because this presents itself as random when it occurs.


#9

@tday Thanks for the test case, but can you please use the CODE tag to format the macro source code ? Otherwise I can not copy and paste them easily.

c1

Or you can export the macros and then attach the the JSON files to your post.

export1


#10

Where are my forum manners!? Edited in post above…