Indium icon indicating copy to clipboard operation
Indium copied to clipboard

Connecting to Windows 10 Chrome from WSL2 emacs?

Open sandric opened this issue 4 years ago • 1 comments

For some reason I can not connect to chrome running indium-connect command - constantly getting 'Indium server error: connect ECONNREFUSED 127.0.0.1:9222'. My chrome is running under windows 10 and my emacs is running under WSL2. I edited mine chrome shortcut to consist such parameters: "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --user-data-dir=C:\ChromeDevSessions --disable-gpu --disable-web-security --remote-debugging-port=9222, and I can access 'inspectable pages' page in chrome from both http://localhost:9222/ and http://127.0.0.1:9222/, but for some reason not from emacs.

Here's mine indium config:

(use-package indium
  :ensure t
  :config (progn
            (setq indium-chrome-executable "/mnt/c/ProgramData/Microsoft/Windows/Start Menu/Programs/Google Chrome.lnk")))

Here's mine .indium.json:

{
  "configurations": [
    {
      "name": "Web project",
      "type": "chrome",
      "host": "localhost",
      "port": 9222
    }
  ]
}

For host I tried localhost, 127.0.0.1 and even windows ip located in mine /etc/resolv.conf - still nothing.

sandric avatar Dec 05 '19 07:12 sandric

Have you tried to curl localhost:9222 from WSL2?

NicolasPetton avatar Jan 16 '20 12:01 NicolasPetton