I used to debug Chrome with PuppeteerSharp. For that, I run Chrome with command:
"C:\Program Files\Google\Chrome\Application\chrome.exe" --remote-debugging-port=9222 --profile-directory="Default"
Then I wait Chrome t start and make GET request to http://127.0.0.1:9222/json/version
to get webSocketDebuggerUrl value, thich I pass to
_browser = await Puppeteer.ConnectAsync(new()
{
BrowserWSEndpoint = webSocketDebuggerUrl, // value got from Chrome /json/version
});
And that works fine for a year until today. Now if I request http://127.0.0.1:9222/json/version, it gives me ERR_CONNECTION_REFUSED
What I tried is to
- restart Chrome - no effect
- restart PC - no effect
- change port from
9222to9223- no effect - enable inbound rule for port
9222- no effect
The Chrome version I got is 136.0.7103.49 (Official Build) (64-bit) - latest at the moment
Then I push my other PC, which got at moment Chrome 134...., started Chrome with --remote-debugging-port=9222 and it works. Then I decided to update chrome to latest and it breaks...
So my question is did something changed for chrome remote debugging in latest releases? How now should I start Chrome to debug, how should I get webSocketDebuggerUrl value? Or most likely there is some new settings had to be set to allow get that value
Some similar struggles from before
- here on SO 3 years ago with no answer
- at reddit 2 years ago, checked whole
chrome://inspect/, but didn't found anywebSocketDebuggerUrl
Here is also different approach to gain that value, but it looks way too comlex
Have to mention it also not available from chrome://version/
I have found a workaround, but not a solution:
- find and fownload appropriate Chrome offline installer of version you are OK (134 in my case). Mine one is from igetintopc.com, looks like working one, not sure about side effects btw, mention them as it quite hard to find proper offline installer
- delete your Chrome via Windows Installed Apps tool, but be sure not to check delete browser history checkbox! At least unless you want to
- then install your desired Chrome via offline installer
- be sure not to open Chrome's ... / Help / About Google Chrome! Just opening it will trigger Chrome auto-update, which cannot be cancelled neither turned off in my case. If you did so, repeat re-installation process.