Edit

Troubleshoot issues in Power Automate browser extensions

Summary

This article helps you fix Power Automate browser extension issues that affect web automation in desktop flows, including the "Failed to assume control of browser (Internal error or communication failure)" error and the "You need the Power Automate extension" message. It covers the PAD.BrowserNativeMessageHost.exe process, native messaging policies in Microsoft Edge, Google Chrome, and Mozilla Firefox, blocked cmd.exe execution, multiple browser profiles, and conflicting MSI and MSIX installations.

Symptoms

You experience the following symptoms:

  • At runtime, the browser automation group takes an action that fails and returns the following error message:

    Failed to assume control of browser (Internal error or communication failure).

    Note

    In this message, browser represents the name of the web browser, such as Microsoft Edge or Google Chrome.

  • During the design phase, when you open the UI element picker or the recorder and hover the mouse over a webpage, the following message is displayed:

    You need the Power Automate extension.

    Screenshot of the Get Extension message that reminds you to install the Power Automate extension.

Prerequisites

  • Make sure that the Power Automate web extension is installed and enabled in your browser.

  • Make sure that the correct Power Automate web extension is installed and enabled in your browser. Install only one of the following extensions:

    • For Power Automate for desktop v2.27 or later versions, use the Microsoft Power Automate extension.
    • For Power Automate for desktop v2.26 or earlier versions, use the Microsoft Power Automate (Legacy) extension.

For more information, see Install Power Automate browser extensions.

Resolution

To troubleshoot and resolve the issue, use the steps in the following sections.

Check whether PAD.BrowserNativeMessageHost.exe is running for your browser

Follow these steps:

  1. Close all open browser windows.

  2. Open the browser that you use in your desktop flow.

  3. Open Windows Task Manager, select the Details tab, and then verify that PAD.BrowserNativeMessageHost.exe is running.

    Note

    One instance of this process runs for each browser type.

  4. If PAD.BrowserNativeMessageHost.exe isn't running, follow these steps:

    1. Check whether the Power Automate web extension is installed and enabled. If it's not installed, see the Prerequisites section.

    2. If the extension is installed, run the Troubleshoot UI/Web automation issues diagnostic in Power Automate for desktop troubleshooter.

    3. Follow the steps that are suggested in the troubleshooter.

Look for errors in the background script

Note

This step applies only to Microsoft Edge and Google Chrome.

Follow these steps:

  1. Go to the appropriate extension page:

    • Microsoft Edge: edge://extensions/
    • Google Chrome: chrome://extensions/
  2. Turn on Developer mode.

  3. Find the Microsoft Power Automate extension.

  4. Select background.html for the Microsoft Power Automate (Legacy) browser extension or service worker for the Microsoft Power Automate browser extension. This step opens the developer tools.

  5. Check for any errors on the Console tab.

    The error message, "Access to the native messaging host was disabled by the system administrator," indicates that the NativeMessagingBlocklist policy is enabled for the Power Automate for desktop native messaging host or all native messaging hosts.

Check for policies that block the message host

Follow these steps:

  1. Go to the appropriate extension page:

    • Microsoft Edge: edge://policy/
    • Google Chrome: chrome://policy/
  2. Check the NativeMessagingBlocklist policy. If you enable this policy for all native messaging hosts, add the Power Automate for desktop native messaging host to the NativeMessagingAllowlist policy:

    1. Open Start, enter Registry Editor, and then select Registry Editor in the results.

    2. Create the NativeMessagingAllowlist policy if it doesn't already exist, and then add the Power Automate for desktop native messaging host.

      For the Microsoft Power Automate (Legacy) browser extension, follow these steps for your preferred browser.

      To add a policy at the local machine level:

      Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Edge\NativeMessagingAllowlist
      Name = {number}
      Data = com.robin.messagehost
      

      To add a policy at the current user level:

      Computer\HKEY_CURRENT_USER\SOFTWARE\Policies\Microsoft\Edge\NativeMessagingAllowlist
      Name = {number}
      Data = com.robin.messagehost
      

      For the Microsoft Power Automate browser extension, follow these steps for your preferred browser.

      To add a policy at the local machine level:

      Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Edge\NativeMessagingAllowlist
      Name = {number}
      Data = com.microsoft.pad.messagehost
      

      To add a policy at the current user level:

      Computer\HKEY_CURRENT_USER\SOFTWARE\Policies\Microsoft\Edge\NativeMessagingAllowlist
      Name = {number}
      Data = com.microsoft.pad.messagehost
      
    3. Check the NativeMessagingUserLevelHosts policy. If NativeMessagingUserLevelHosts is disabled, enable it or make sure that com.robin.messagehost for the legacy browser extension and com.microsoft.pad.messagehost for the default browser extension are added to your NativeMessagingAllowlist policy in HKLM (Local Machine level).

      Note

      You must enable NativeMessagingUserLevelHosts when using the Microsoft Store (MSIX) version of Power Automate for desktop.

Check whether the message host points to the correct location

Follow these steps:

  1. Close and reopen Power Automate for desktop. (Also, close the Power Automate console from the Windows task bar before you reopen it.)

  2. Open Registry Editor.

  3. Navigate to the following registry subkeys:

    • For the Microsoft Power Automate (Legacy) browser extension: Computer\HKEY_CURRENT_USER\SOFTWARE\Microsoft\Edge\NativeMessagingHosts\com.robin.messagehost

    • For the Microsoft Power Automate browser extension: Computer\HKEY_CURRENT_USER\SOFTWARE\Microsoft\Edge\NativeMessagingHosts\com.microsoft.pad.messagehost


  1. Check the value of the registry key. The correct value is as follows:

    • MSI: C:\Program Files (x86)\Power Automate Desktop\dotnet\PAD.ChromiumManifest.json

    • MSIX Windows 11: C:\Program Files\WindowsApps\Microsoft.PowerAutomateDesktop_X.Y.Z.0_x64__8wekyb3d8bbwe\PAD.ChromiumManifest.json

      To retrieve X.Y.Z:

      1. Select Start, search on Power Automate, and then right-click its icon.

      2. Select App settings.

      3. Retrieve the value from Version. In the following example, the values are X = 10, Y = 0, and Z = 5396.

        Screenshot of the version value of Power Automate for desktop.

    • MSIX Windows 10: AppData\Local\Packages\Microsoft.PowerAutomateDesktop_8wekyb3d8bbwe\TempState\webextensions\PAD.ChromiumManifest.json

Check whether cmd.exe execution is disabled

Power Automate for desktop relies on the browser extension to communicate with the native messaging host. If Group Policy, Intune, or registry restrictions block cmd.exe execution, the browser can't launch the native messaging host, and the Power Automate browser extension might fail.

Restoring access to cmd.exe ensures that the browser can correctly launch the native messaging host that's required by the Power Automate browser extension. To re-enable cmd.exe, use one of the following methods.

Re-enable cmd.exe by using Group Policy

  1. Press Win+R, enter gpedit.msc, and then press Enter.
  2. Go to User Configuration > Administrative Templates > System.
  3. Open Prevent access to the command prompt.
  4. Set the policy to Disabled or Not configured.
  5. Select OK to save the changes.

Re-enable cmd.exe by using Registry Editor

  1. Open Start, search for and select Registry Editor.
  2. Go to HKEY_CURRENT_USER\Software\Policies\Microsoft\Windows\System.
  3. Find the DisableCMD value, and then do one of the following:
    • Set the value to 0.
    • Delete the value.

Check for the ComSpec variable

Check whether the ComSpec variable exists in Environment variable under System variables. If it doesn't exist, add it, and then try again:

  1. Select Start, search for Environment variables, and then select Edit the system environment variables in the search results.

  2. Select Environment variables.

    Note

    The system variables should include the ComSpec variable. The expected value for ComSpec is C:\WINDOWS\system32\cmd.exe.

Check whether more than one browser profile exists

To check if more than one profile exists, select the profile icon in the browser. A menu displaying the profiles should appear. The profile icon is usually located either on the top or right side of the browser window.

If more than one browser profile exists:

  1. Uninstall the Power Automate web extension from each existing browser profile.
  2. Close the browser and install the extension only in the browser profile that you use for the automation.

Check for errors in Windows Event Viewer

Follow these steps:

  1. Open Start, search for Event Viewer, and then select Event Viewer in the search results.
  2. In the left pane, expand Event Viewer (Local) > Windows Logs > Application.
  3. Locate the error entries that are related to Power Automate for desktop.

Disable other web extensions

Try disabling all other web extensions except the Power Automate extension to see if the problem continues.

Disable browser background settings

Some browser settings can interfere with the Power Automate extension. To resolve this problem, disable the following settings in your browser:

  1. Open Microsoft Edge or Google Chrome.
  2. Go to Settings > System and performance.
  3. Turn off the following settings:
    1. Continue running background extensions and apps when Microsoft Edge is closed (or Continue running background apps when Google Chrome is closed).
    2. Startup boost (Microsoft Edge only).

Check whether both MSI and MSIX installations exist

If both the MSI and Microsoft Store (MSIX) installations of Power Automate for desktop are present on the same machine, the web extension might fail to connect to the browser. For more information, see Web automation action fails when the machine runtime and Microsoft Store (MSIX) versions are different.

Third-party information disclaimer

The third-party products that this article discusses are manufactured by companies that are independent of Microsoft. Microsoft makes no warranty, implied or otherwise, about the performance or reliability of these products.