Migrating Automa to Manifest V3
Published at 12 December 2024 • #update
Because Chrome will depreciate Manifest v2, starting from v1.22.0, Automa will use Manifest v3. So to make it work in Manifest v3, there are some changes to Automa in terms of how it works.
Automa Dashboard
From now on, the dashboard will move as a popup. This popup is required to run a workflow, so don't close this popup while running a workflow because it won't run if you close it.
But why move the dashboard into a popup? In Manifest v3, Chrome will move the background page to the service worker. And the max lifetime of the service worker is five minutes, and it will stop when it is exceeded that. And to avoid that, Automa will move the engine for running the workflow from the background page into the popup because there are some users whose workflow runs more than 5 minutes.
JavaScript Block
Because in manifest v3, it's not possible to execute an arbitrary string or third-party code. A block that has a javascript code option like the Javascript Code block, Create Element block, and the condition code in the Conditions block might not work on some websites. It depends on the Content Security Policy of the website. To check if the mentioned blocks won't work, you can copy the below code and paste it into the console tab of the dev tools, and you can open it by pressing ctrl+shift+i
.
const script = document.createElement('script');script.textContent = 'alert("Hello world")';document.body.appendChild(script);
If you see Refused to execute inline script because it violates the following Content Security Policy directive...
error, the mentioned block won't work on that website.
And in v1.22.0, there is a javascript execution context feature where you can choose the environment of the javascript execution. If your javascript has nothing to do with DOM manipulation or interaction with the website, I recommended selecting "Background" as the execution context.