Action Invoker: Worker thread issue
Posted: April 29th, 2025, 8:39 pm
Dear CSPro Developer Team,
I was trying to sync silently as requested here: viewtopic.php?p=19012#p19012. However, calling the synchronous method still displays the sync UI.
As a workaround, I tried to call the Sync function in a worker thread. But, the action-invoker.js can't be run in a worker thread. It displays these errors:
action-invoker.js:2 Uncaught ReferenceError: window is not defined
at Object.createMessage (action-invoker.js:2:67)
at Object.run (action-invoker.js:3:159)
at Object.eval (action-invoker.js:79:50)
at SyncSilent (worker.js:15:28)
at worker.js:7:24
It seems the action-invoker.js was designed to interact with DOM and this specific error is displayed because worker doesn’t have a window object.
Please take a look at this demo: and let me know if there is some workarounds.
Thanks in advance
I was trying to sync silently as requested here: viewtopic.php?p=19012#p19012. However, calling the synchronous method still displays the sync UI.
As a workaround, I tried to call the Sync function in a worker thread. But, the action-invoker.js can't be run in a worker thread. It displays these errors:
action-invoker.js:2 Uncaught ReferenceError: window is not defined
at Object.createMessage (action-invoker.js:2:67)
at Object.run (action-invoker.js:3:159)
at Object.eval (action-invoker.js:79:50)
at SyncSilent (worker.js:15:28)
at worker.js:7:24
It seems the action-invoker.js was designed to interact with DOM and this specific error is displayed because worker doesn’t have a window object.
Please take a look at this demo: and let me know if there is some workarounds.
Thanks in advance