Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

urequests TLS requests fail on ESP32 with ESP-IDF 4.3 and 4.4 #538

Closed
chaseadam opened this issue Sep 20, 2022 · 2 comments
Closed

urequests TLS requests fail on ESP32 with ESP-IDF 4.3 and 4.4 #538

chaseadam opened this issue Sep 20, 2022 · 2 comments

Comments

@chaseadam
Copy link

TLS calls work in the 1.19.1 official release binary and with master commit 13c4470fd04981fce3fd29771e1d973febbe7d60 built against ESP-IDF 4.2.

MicroPython v1.19.1-437-g13c4470fd on 2022-09-20; ESP32 module with ESP32
Type "help()" for more information.
>>> gc.mem_free()
29712
>>> gc.collect()
>>> gc.mem_free()
69664
>>> r = requests.get('https://google.com')
>>>

Using ESP-IDF 4.3 and 4.4 with 1.19.1 sources or HEAD of master result in what appear to be memory issues.

Output:

>>> import urequests as requests
>>> gc.mem_free()
23360
>>> gc.collect()
>>> gc.mem_free()
66336
>>> r = requests.get('https://google.com')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "urequests.py", line 180, in get
  File "urequests.py", line 93, in request
OSError: 16

I have also seen the following errors:

This is most common

Error: [Errno 113] ECONNABORTED, Reason: null

I saw this intermittently while testing

OSError: (-17040, 'MBEDTLS_ERR_RSA_PUBLIC_FAILED+MBEDTLS_ERR_MPI_ALLOC_FAILED')
@jimmo
Copy link
Member

jimmo commented Sep 21, 2022

@chaseadam this is micropython/micropython#8940

(And unfortunately, it's the reason why we still do ESP32 builds with IDF 4.2)

@chaseadam
Copy link
Author

closing out as this is duplicate of micropython/micropython#8940

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants