MT5 Build 6241: WebRequest() fails with error 1001 / 5203

 
Hello,

I am experiencing a serious WebRequest() problem after updating MetaTrader 5 to Build 6241.

Before the update, my Expert Advisor was working correctly and could connect to my HTTPS license server. Immediately after the MT5 update, WebRequest() stopped working.

I tested WebRequest() independently, outside of my Expert Advisor, using a simple MQL5 test script.

Environment:

* MetaTrader 5 Build: 6241
* Windows
* Terminal: MetaTrader 5
* Installation: C:\Program Files\MetaTrader 5

Test 1 — Google:
URL: https://www.google.com

Result:
WebRequest() = 1001
GetLastError() = 5203
Response headers = empty
Response body = empty

I added https://www.google.com to:
Tools → Options → Expert Advisors → Allow WebRequest for listed URL

The result did not change.

Test 2 — My HTTPS server:
URL: https://license.phoenixxau.com

Result:
WebRequest() = 1001
GetLastError() = 5203
Response headers = empty
Response body = empty

Test 3 — License request:
https://license.phoenixxau.com/license?account=113608651&version=18.3&broker=MetaQuotes%20Ltd.&hardware_id=113608651_MetaQuotes-Demo

The result is also 1001 / 5203 with an empty response.

The HTTPS license server is hosted on Cloudflare and is accessible normally from a web browser. However, the MT5 WebRequest does not appear to reach the server at all. There are no corresponding requests in the Cloudflare Worker logs.

This means the problem does not appear to be related to my Expert Advisor or the license server, because even a basic request to Google fails in exactly the same way.

I also noticed a recent MQL5 forum report about WebRequest() failures in Build 6230 with the same error combination:
WebRequest() = 1001
GetLastError() = 5203

Could you please investigate whether there is a WebRequest() regression or compatibility issue in Build 6241?

I can provide the test script, Journal logs, terminal information, or any other diagnostic information you need.

Thank you.
 
Pooya:
Test 2 — My HTTPS server:
Hi

I tested below code as script and it works.

//+------------------------------------------------------------------+
//|                                              LicenseTest.mq5     |
//+------------------------------------------------------------------+
#property script_show_inputs

void OnStart()
{
   string url = "https://license.phoenixxau.com/license"
                "?account=113608651"
                "&version=18.3"
                "&broker=MetaQuotes%20Ltd."
                "&hardware_id=113608651_MetaQuotes-Demo";

   char   result[];
   char   post_data[];
   string response_headers;

   ResetLastError();

   int timeout = 10000;

   int status = WebRequest(
      "GET",
      url,
      "",
      "",
      timeout,
      post_data,
      0,
      result,
      response_headers
   );

   if(status == -1)
   {
      Print("WebRequest failed.");
      Print("Error: ", GetLastError());
      return;
   }

   string response = CharArrayToString(result);

   Print("HTTP Status: ", status);
   Print("Response Headers:");
   Print(response_headers);
   Print("Response:");
   Print(response);

   //Alert("HTTP Status: ", status, "\n", response);
}
Output is as below:
DR      0       13:23:18.930    testWebRequest (EURUSD,M5)      HTTP Status: 200
QF      0       13:23:18.930    testWebRequest (EURUSD,M5)      Response Headers:
NO      0       13:23:18.930    testWebRequest (EURUSD,M5)      Date: Tue, 06 Oct 2026 09:23:19 GMT
EL      0       13:23:18.930    testWebRequest (EURUSD,M5)      Content-Type: application/json;charset=UTF-8
KG      0       13:23:18.930    testWebRequest (EURUSD,M5)      Transfer-Encoding: chunked
EL      0       13:23:18.930    testWebRequest (EURUSD,M5)      Connection: keep-alive
EH      0       13:23:18.930    testWebRequest (EURUSD,M5)      Access-Control-Allow-Origin: *
DL      0       13:23:18.930    testWebRequest (EURUSD,M5)      Access-Control-Allow-Headers: Content-Type, Authorization
DO      0       13:23:18.930    testWebRequest (EURUSD,M5)      Access-Control-Allow-Methods: GET, POST, DELETE, OPTIONS
IS      0       13:23:18.930    testWebRequest (EURUSD,M5)      Report-To: {"group":"cf-nel","max_age":604800,"endpoints":[{"url":"https://a.nel.cloudflare.com/report/v4?s=cHH%2BoXnuw7PqxkNq9O0QmYu%2B8RBIM4Xq6JKzZgykXTyGcIIUlWL4dK7o%2BhZl%2BArEKRK1wgJ1vK2mnOUmyQWTtuK%2Fxn4PePFKEeXPx7RdWyQlcIj%2B2WPUWm8P9ekzMYOPcdG%2FkTL4Vz8M"}]}
HD      0       13:23:18.930    testWebRequest (EURUSD,M5)      Nel: {"report_to":"cf-nel","success_fraction":0.0,"max_age":604800}
QM      0       13:23:18.930    testWebRequest (EURUSD,M5)      Content-Encoding: gzip
NK      0       13:23:18.930    testWebRequest (EURUSD,M5)      Server: cloudflare
IP      0       13:23:18.930    testWebRequest (EURUSD,M5)      CF-RAY: a4639b50ef6fdbf0-FRA
IS      0       13:23:18.930    testWebRequest (EURUSD,M5)      alt-svc: h3=":443"; ma=86400
RE      0       13:23:18.930    testWebRequest (EURUSD,M5)      
GN      0       13:23:18.930    testWebRequest (EURUSD,M5)      Response:
IO      0       13:23:18.930    testWebRequest (EURUSD,M5)      {
FH      0       13:23:18.930    testWebRequest (EURUSD,M5)        "status": "ACTIVE",
PO      0       13:23:18.930    testWebRequest (EURUSD,M5)        "account": "113608651",
JI      0       13:23:18.930    testWebRequest (EURUSD,M5)        "expiry": "2026-10-11 12:59:56",
HE      0       13:23:18.930    testWebRequest (EURUSD,M5)        "started_at": "2026-10-04 12:59:56",
DQ      0       13:23:18.930    testWebRequest (EURUSD,M5)        "version": "18.3",
HK      0       13:23:18.930    testWebRequest (EURUSD,M5)        "license_plan": "DEMO",
QR      0       13:23:18.930    testWebRequest (EURUSD,M5)        "license_type": "DEMO",
GF      0       13:23:18.930    testWebRequest (EURUSD,M5)        "broker": "MetaQuotes Ltd.",
LP      0       13:23:18.930    testWebRequest (EURUSD,M5)        "hardware_id": "113608651_MetaQuotes-Demo",
KP      0       13:23:18.930    testWebRequest (EURUSD,M5)        "activation_status": "ACTIVE"
KE      0       13:23:18.930    testWebRequest (EURUSD,M5)      }
 

Error 5203 is ERR_WEBREQUEST_REQUEST_FAILED, so the terminal received no usable HTTP reply. Since google.com fails the same way, your EA isn't the cause. Check Tools, Options, Server, Proxy on the terminal, and any VPN or antivirus that intercepts HTTPS, then retest.