cotestatnt / AsyncTelegram2

Powerful, flexible and secure Arduino Telegram BOT library. Hardware independent, it can be used with any MCU capable of handling an SSL connection.
MIT License
83 stars 25 forks source link

Async web request conflicts with Async telefgram2. #117

Open miguelfernando55 opened 11 months ago

miguelfernando55 commented 11 months ago

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.

cotestatnt commented 11 months ago

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

miguelfernando55 commented 11 months ago

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.

cotestatnt commented 10 months ago

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

miguelfernando55 commented 10 months ago

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