"Failed to assume control of Microsoft Edge/Chrome/Firefox" error
This article provides a resolution for the error that may occur when you run a desktop flow that contains a "Launch browser" action in Microsoft Power Automate. If the error occurs right after a browser update and has the same symptoms, see Browser automation actions stop working after a browser update.
Applies to: Power Automate
Original KB number: 5001691
Symptoms
When you run a desktop flow that has a "Launch Edge", "Launch Chrome", or "Launch Firefox" action in Microsoft Power Automate, the execution fails with one of the following error messages:
Failed to assume control of Microsoft Edge (Internal error or communication failure).
Failed to assume control of Chrome (Internal error or communication failure).
Failed to assume control of Firefox (Internal error or communication failure)
Cause 1: Web extension isn't installed properly or enabled
The Microsoft Edge, Google Chrome, or Firefox web extension isn't installed properly or enabled.
Verifying issue for cause 1
Execution of a desktop flow with one of the respective actions fails with the error message.
Web Recorder initiation for the specific browser shows the below message:
Note that the web extension might seem to be installed and enabled in the extension repository of the specific browser but the execution to be unsuccessful.
Resolution
Install the respective web extension from the Power Automate for desktop designer.
Even if the extension seems installed and enabled, you need to remove it and reinstall it.
Restart the browser.
Cause 2: Launch browser action takes longer than the default timeout
Launch of the browser takes longer than the default timeout (30 seconds) of the action. The automation tries to assume control of the browser before opening and as a result the "Launch browser" action fails.
Verifying issue for cause 2
Execution of a desktop flow with one of the respective actions fails with the error message. This behavior might not be consistent (some executions could be successful).
Resolution
Insert a new "Launch new browser" action as:
- Launch new Edge
- Launch new Chrome
- Launch new Firefox
- Launch new Internet Explorer
Set up the parameters of the action:
Launch mode: Launch new Instance
Initial URL: A default URL
Rest parameters can be set as desired.
Insert an error handling policy by:
Select the On error option in the action window:
Select Continue flow run > Go to next action in the dropdown list, and then select Save.
Insert a new "Launch new browser" action of the same browser as step 1 and set up the parameters of the action:
Launch mode: Attach to running instance
Attach to browser tab: By URL
Tab URL: The URL inserted in step 1.
Variables produced: Replace the new Browser to variable to the name of the variable produced by step 1.
Select the On error option and take the following steps:
Enable the Retry action if an error occurs option.
Set the number of times to 20 by selecting the number of times.
Set the interval in seconds to 5 by selecting the number of seconds.
Select Save.
Insert a "Go to Web page" action and set up the parameters of the action:
Web browser instance: The variable produced by the "Launch new browser" action.
Navigate: To URL
URL: The URL you would like to navigate to.
Finally, find some general checks that you may apply in case the above actions don't fix the issue:
- Make sure that the environmental variable
ComSpec
with valueC:\WINDOWS\system32\cmd.exe
exists on the machine. - Only for Chrome: Check and set the
exit_type
parameter tonormal
at %localappdata%\Google\Chrome\User Data\Default\Preferences. - Clear the cache and cookies from the browser manually and restart the browser.