peterhinch / micropython-mqtt

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

Memory allocation failures with MP 1.21 #125

Closed bobveringa closed 8 months ago

bobveringa commented 8 months ago

Recently, I've upgraded my MicroPython version to v1.21 and for some reason I'm now unable to connect to the broker using SSL.

Now, I don't think the issue is with this library (after all, it worked on v1.20). The reason I'm posting here is to inquire if anyone is having similar problems. And hopefully, maybe something could be implemented on the MicroPython side to resolve this issue (although I'm not that hopeful).

This is the error I'm getting:

  File "lib/mqtt_as/mqtt_as.py", line 243, in _connect
OSError: (-17168, 'RSA - The private key operation failed : BIGNUM - Memory allocation failed')

Which for reference is this line:

self._sock = ussl.wrap_socket(self._sock, **self._ssl_params)
peterhinch commented 8 months ago

I suggest you post a query in Discussions where it's likely to attract more eyeballs. It might be worth identifying the platform.

bobveringa commented 8 months ago

Yes, I will do that, thanks for the suggestion