AsyncTelegram2 icon indicating copy to clipboard operation
AsyncTelegram2 copied to clipboard

Async web request conflicts with Async telefgram2.

Open miguelfernando55 opened this issue 2 years ago • 4 comments

I am trying to open a webpage using server.on() at the same time using bot asynctelegram2. But the web page does not open. The bot still runs.

miguelfernando55 avatar Aug 09 '23 00:08 miguelfernando55

Can you provide a sketch which can reproduce your issue? I've just tried to serve a simple web page and it works.

cotestatnt avatar Aug 11 '23 13:08 cotestatnt

Sorry, I cannot. It does not belong to me. Yes, with only a few lines of code it works. I also did only with a few lines before going further, but for a 40kB html css js it creates a err_invalid_chunked_encoding. I thought the cause was something related to the quality of the content or chrome but when I comment the lines. myBot.begin and getNewMessages it works fine. I also tries to bundle the html js css but the code is delivery partially to the browser.

miguelfernando55 avatar Aug 12 '23 08:08 miguelfernando55

If you are using ESPAsynWebServer library could be something like related to this issue compounded by the additional resources required for the Telegram WiFi client.

With the suggested pull requests, I have greatly improved the stability of some of my projects

cotestatnt avatar Aug 21 '23 13:08 cotestatnt

It appears that to create a server and client at the same time is not possible. I do not know why.

miguelfernando55 avatar Aug 21 '23 18:08 miguelfernando55