Discussion of article "How to create bots for Telegram in MQL5" - page 26

 

I tested it on a customer's PC. He's in Singapore. WebRequest returns 1001.

At the same time through cURL requests pass without problems. Here are his comments: https://www.mql5.com/en/forum/341742

In general, I suggest not to panic and just wait until the developers are free and fix it.

WebRequest failed with error 5203 but CURL/PostMan are still ok
WebRequest failed with error 5203 but CURL/PostMan are still ok
  • 2020.05.25
  • www.mql5.com
I've got this issue on WebRequest: I did enabled EA and allowed the URL in MT5 setting: However, I still can send request successfully from CURL an...
 
Andrey Voytenko:

I tested it on a customer's PC. He's in Singapore. WebRequest returns 1001.

At the same time through cURL requests pass without problems. Here are his comments: https://www.mql5.com/en/forum/341742

In general, I suggest not to panic and just wait until the developers are free and fix it.

Can you provide the exact request? Let all numbers and letters in the bot's API-key be replaced by XXX, but let everything else be exactly as in the request.

 
Rashid Umarov:

Can you provide the exact request? Let all numbers and letters in the bot's API-key be replaced by XXX, but let everything else be exactly as in the request.

Okay, Rashid. As soon as the customer gets in touch, I will provide you with all the details.

 
Sergey Kolemanov:
Judging by your profile, you are in Russia. Telegram is blocked in Russia... A working app on your phone is not an indicator - they have their own ways around it.

I'm in Kiev right now.

 
Andrey Voytenko:

I tested it on a customer's PC. He's in Singapore. WebRequest returns 1001.

At the same time through cURL requests pass without problems. Here are his comments: https://www.mql5.com/en/forum/341742

In general, I suggest not to panic and just wait until the developers are free and fix it.

Andrew, as far as I understand it is a build problem in both MT4 and MT5...
Because if it was in your library, you would have already fixed it....

 
Gennady Mazur:

Andrew, as far as I understand it is a build problem in both MT4 and MT5...
Because if it was in your library, you would have already corrected it....

Yes, periodically I get messages from the MQL community that WebRequest returns 1001. This has escalated recently, but it is not reproducible for everyone.

For example on the PC of a customer from Singapore this problem was a couple of days ago. I will try to go to his place and take screenshots for Rashid.

 
Andrey Voytenko:

Yes, I periodically get reports from the MQL community that WebRequest is returning 1001. This has escalated recently, but not everyone reproduces it.

For example, on the PC of a customer from Singapore this problem was a couple of days ago. I will try to go to his place and take screenshots for Rashid.

Youdon't need a screenshot - you need code that you can paste withcopypaste and check under otldaca

 
Rashid Umarov:

Youdon't need a screenshot - you need code that you can paste withcopypaste and check under otldaca

Got it, will do.
 
Andrey Voytenko:

Yes, I periodically get reports from the MQL community that WebRequest is returning 1001. This has escalated recently, but not everyone reproduces it.

For example, on the PC of a customer from Singapore this problem was a couple of days ago. I will try to go to his place and take screenshots for Rashid.

and one more thing, Andrei...
when compiling my test Expert Advisor in MT5,
is swearing at the Telegram module...
Can you see why?

deprecated behavior, hidden method calling will be disabled in a future MQL compiler version    Telegram.mqh    326     7
deprecated behavior, hidden method calling will be disabled in a future MQL compiler version    Telegram.mqh    453     13
deprecated behavior, hidden method calling will be disabled in a future MQL compiler version    Telegram.mqh    454     7
deprecated behavior, hidden method calling will be disabled in a future MQL compiler version    Telegram.mqh    455     7
code generated          1       1
0 errors, 4 warnings, 2113 msec elapsed         1       5

These lines in your module

   string StringDecode(string text)
     {
      //--- replace \n
      StringReplace(text,"\n",ShortToString(0x0A));

the lowest line and these

   void UserNameFilter(const string username_list)
     {
      m_users_filter.Clear();

      //--- parsing
      string text=StringTrim(username_list);
      if(text=="")
         return;

      //---
      while(StringReplace(text,"  "," ")>0);
      StringReplace(text,";"," ");
      StringReplace(text,","," ");

the last three...

 
@Gennady Mazur treated like this :: StringReplace(...);