Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
This article provides a resolution for the error that might 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
Scenario 1
When you run a desktop flow that has a Launch new Microsoft Edge, Launch new Chrome, or Launch new 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)
Important
To resolve the error:
- First run the Troubleshoot UI/Web automation issues diagnostic using the Power Automate for desktop troubleshooter.
- When the diagnostic runs, a report is generated that identifies issues. These issues can be resolved by pressing the Fix button that appears after the diagnostics check completes.
- If the troubleshooter doesn't resolve the error, proceed to the potential causes and resolutions provided in this article.
Scenario 2
The error also occurs when you run a Launch Browser action, and the browser is launched using a different system user than the one used to run Power Automate for desktop. For the recommended workaround, see Cause 3 in this article.
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 following message:
The web extension might seem to be installed and enabled in the extension repository of the specific browser, but it fails to execute.
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 1
In the Launch new Edge, Launch new Chrome, or Launch new Firefox action, increase the values of Timeout on webpage load and Timeout parameters located in the Advanced section. For example, set these values to 120 seconds.
If this adjustment doesn't resolve the issue, follow the steps outlined in Resolution 2 or Resolution 3.
Resolution 2
Use the Launch Browser action to start the process of the corresponding browser. Then a combination of an additional Launch Browser action with mode set to Attach to running instance and a Go to web page action afterwards can be used to resolve the issue.
Insert a new Launch Browser action as:
- Launch new Microsoft 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
The remaining parameters can be set as desired.
Insert an error handling policy:
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 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 variable with the name of the variable produced in 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 Browser action.
Navigate: To URL
URL: The URL you would like to navigate to.
Resolution 3
Use the Launch Browser action to start the process of the corresponding browser. Then a combination of an additional Launch Browser action with mode set to Attach to running instance and a Wait action set to a duration afterwards can be used to resolve the issue.
Insert a new Launch Browser action as:
- Launch new Microsoft 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:
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 Wait action and set its duration to 90 seconds (adjust duration as needed).
Insert another Launch Browser action for the same browser used in step 1, and configure the parameters:
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 variable with the name of the variable produced in step 1.
Cause 3: The browser is launched using a different system user than the one used to run Power Automate for desktop (version 2.38 or higher)
This issue can occur in attended and unattended desktop flow modes.
To resolve the issue, ensure that the browser is launched using the same system user account that's being used to run Power Automate for desktop.
General checks
If the preceding actions don't resolve the issue, ensure the following:
- Make sure that the environmental variable
ComSpec
with valueC:\WINDOWS\system32\cmd.exe
exists on the machine. - (Chrome only) Check and set the
exit_type
parameter tonormal
at %localappdata%\Google\Chrome\User Data\Default\Preferences. - Clear the browser cache and cookies manually, and then restart the browser.