Skip to content

Chrome policy RemoteDebuggingAllowed:false calls devTools ECONNREFUSED error #3433

Description

@Stephanzion

It took me 24 hours to find out that my windows build has pre-installed chrome policies that affect the behaviour of all installed chromium browsers, including portable versions.

One of them makes it impossible to start the chromium browser because it blocks external connections to devTools websoket.

Address value in windows registry:

Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Google\Chrome\RemoteDebuggingAllowed
Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Chromium\RemoteDebuggingAllowed

(value 0 causes the error)

You can see the value of the policy in chrome://policy:
RemoteDebuggingAllowed = false

If this value is false, as in my case, the browser will crash with an error:

Starting Chromium instance...

Error: connect ECONNREFUSED 127.0.0.1:64165
    at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1636:16) {
  errno: -4078,
  code: ‘ECONNREFUSED’,
  syscall: ‘connect’,
  address: ‘127.0.0.1’,
  port: 64165
}

Port 64165 is random. Please add a clearer message to the logs that causes an error when trying to connect to devTools websoket. In the error message you can add a tip to check the configuration of this policy.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions