libretiny-eu / libretiny

PlatformIO development platform for IoT modules
http://docs.libretiny.eu/
MIT License
383 stars 55 forks source link

Failed to start task #151

Closed herobrine30396 closed 11 months ago

herobrine30396 commented 11 months ago

I keep getting this error in the serial monitor, and the AsyncTcpWebserver doesn't work:

E [      5.316] failed to start task
E [      5.316] failed to start task
E [      5.316] failed to start task
herobrine30396 commented 11 months ago

It's a problem with the memory allocation of AsyncTcpWebserver. I created a fork that decreases the memory allocated to the library, and now it works!

herobrine30396 commented 11 months ago

I have another problem now. There's some issue that stops LwIPUDP::beginMulticast so that I get this in the serial monitor: E [ 5.322] could not join igmp: 125. Any help?

kuba2k2 commented 11 months ago

Yes, the task failing to start is nearly always because of lack of memory. I don't know which library are you using, but LT's fork adds another #define that decreases the stack size of the task. About the IGMP issue, check the errno codes for code 125. From a quick look in Google it might be "too many links" or "cancelled".

Cossid commented 11 months ago

I have another problem now. There's some issue that stops LwIPUDP::beginMulticast so that I get this in the serial monitor: E [ 5.322] could not join igmp: 125. Any help?

I recently ran into the same issue, and the problem appears lwip wasn't fully initialized yet. I added a delay before attempting beginMulticast (in this case, waiting until esphome's setup function had completed instead of just waiting for network::is_connected()), and it worked fine afterwards.

herobrine30396 commented 11 months ago

Oh, okay. Will try that, but right now, I'm not able to upload anything to my board to test it. I've created a separate issue regarding that