File Manager - Failed to start native messaging host

File Manager - Failed to start native messaging host

Description:

User is unable to launch File Manager. When he clicks on the download button, nothing happens. As an example let’s say he is using Google Chrome browser.

 

Root Cause:

File Manager javascript code debugging shows the error → Failed to start native messaging host

 

Solution:

First check if File Manager works with browser admin mode

  1. Type command prompt in the search bar on the Taskbar.

  2. Right click on the command prompt icon and select Run as administrator.

  3. launch the chrome.exe via command prompt. Type the command start chrome and hit Enter.

  4. Now try to launch File Manager / Download any file.

 

Second check if ComSpec is set as environment variable

Upon investigating the chrome.exe process via Process Monitor, it can be found that there is no COMSPEC environment variable available. Chrome stumbles to start an external process, since COMSPEC, an environment variable pointing normally to cmd, is unset. It is window system environment variable comes with windows installation however in some cases this is missing from the environment.

The behavior is different for launching Chrome from cmd itself, since it sets the variable for itself.

Go to Control Panel > System and Security > System > Advanced system settings > Advanced > Environment Variables...

ComSpec is usually set in System variables to

C:\WINDOWS\system32\cmd.exe
image-20240214-082336.png

For this setting to apply, you need to log out and log back in, or better yet restart the system. You should be able to launch File Manager now.

TECHNIA CONFIDENTIAL