peterhinch / micropython-mqtt

A 'resilient' asynchronous MQTT driver. Recovers from WiFi and broker outages.
MIT License
549 stars 116 forks source link

exception in `await client.connect()` #64

Closed RonaldHiemstra closed 2 years ago

RonaldHiemstra commented 2 years ago

Normally my application using mqtt_as runs fine. But today it raised the following exception:

E (34474) wifi:sta is connecting, return error
Task exception wasn't retrieved
future: <Task> coro= <generator object 'main' at 3ffe7140>
Traceback (most recent call last):
  File "uasyncio/core.py", line 1, in run_until_complete
  File "main.py", line 65, in main
  File "mqtt_as/mqtt_as.py", line 516, in connect
  File "mqtt_as/mqtt_as.py", line 489, in wifi_connect
OSError: Wifi Internal Error

https://github.com/peterhinch/micropython-mqtt/blob/e97b1e658aaf60e460c69bbe7502e5b7babe739a/mqtt_as/mqtt_as.py#L489

I run micropython v1.17 on a ESP32

peterhinch commented 2 years ago

There may be some kind of regression with ESP32, see https://github.com/peterhinch/micropython-mqtt/issues/63. These errors have only been reported quite recently, and judging from the number of stars mqtt_as has quite a few users. So I'd give an earlier firmware build try. If you do this, please report back so I can advise others.