Page 1 of 1

WinHttp Error Chrome.ahk

Posted: 09 May 2022, 09:07
by turqoise444
Error 0x80072EFD
Source: WinHttp.WinHttpRequest
Description: A connection with the server could not be established
HelpFile: null
HelpContext: 0

Specifically: send

Line#
186: http.send()

Hello everyone,

I am using autohotkey chrome library to establish a connection. This works fine I would say about 90% of the time. Occasionally I get this error thrown. The code fails to connect. I figure I could get in the chrome library and try/catch my way through this, but I'd like to resolve the mystery as to what reasons might exist which cause this to fail. Does anyone have experience with this error message and did you discover the source?

Thanks!

Re: WinHttp Error Chrome.ahk

Posted: 18 Aug 2022, 06:04
by malcev
You need to close all chrome process that use current profile like this:

Code: Select all

for process in ComObjGet("winmgmts:").ExecQuery("Select * from Win32_Process  where Name = 'chrome.exe'")
{
   if InStr(process.Commandline, "path to your profile")
      Process, Close, % process.ProcessId
}