adafruit / adafruit/Adafruit_CircuitPython_Qualia
Simpletest example failing inconsistently
- Dominant language
- Python
- Stars
- 3
- Forks
- 5
- PR merge metrics
- No merged PRs in 30d
Description
The basic example from the connection manager library runs fine:
https://github.com/adafruit/Adafruit_CircuitPython_ConnectionManager/blob/main/examples/connectionmanager_helpers.py
over and over, reboot after reboot. Can not get it to fail.
```python
code.py output:
----------------------------------------
Fetching from http://wifitest.adafruit.com/testwifi/index.html
Text Response This is a test of Adafruit WiFi!
If you can read this, its working :)
----------------------------------------
Code done running.
```
The simpletest example from this library:
https://github.com/adafruit/Adafruit_CircuitPython_Qualia/blob/main/examples/qualia_simpletest.py
fails inconsistently.
With that simpletest example saved to `CIRCUITPY` as `code.py` and going through several soft resets, get the following:
Example failed output:
```python
code.py output:
Fetching text from http://wifitest.adafruit.com/testwifi/index.html
Connecting to AP peanuthamper
Retrieving data...Traceback (most recent call last):
File "adafruit_connection_manager.py", line 271, in get_socket
OSError: [Errno 113] ECONNABORTED
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "code.py", line 19, in
File "adafruit_portalbase/__init__.py", line 454, in fetch
File "adafruit_portalbase/network.py", line 645, in fetch_data
File "adafruit_portalbase/network.py", line 563, in fetch
File "adafruit_requests.py", line 591, in get
File "adafruit_requests.py", line 525, in request
File "adafruit_connection_manager.py", line 282, in get_socket
RuntimeError: Error connecting socket: [Errno 113] ECONNABORTED
Code done running.
```
Another example:
```python
code.py output:
Fetching text from http://wifitest.adafruit.com/testwifi/index.html
Connecting to AP peanuthamper
Retrieving data...Traceback (most recent call last):
File "code.py", line 19, in
File "adafruit_portalbase/__init__.py", line 454, in fetch
File "adafruit_portalbase/network.py", line 645, in fetch_data
File "adafruit_portalbase/network.py", line 563, in fetch
File "adafruit_requests.py", line 591, in get
File "adafruit_requests.py", line 525, in request
File "adafruit_connection_manager.py", line 236, in get_socket
gaierror: (-2, 'Name or service not known')
Code done running.
```
And then randomly, sometimes, it works:
```python
code.py output:
Fetching text from http://wifitest.adafruit.com/testwifi/index.html
Connecting to AP peanuthamper
Retrieving data...Reply is OK!
----------------------------------------
This is a test of Adafruit WiFi!
If you can read this, its working :)
----------------------------------------
Code done running.
```
**CP info:**
```python
Adafruit CircuitPython 9.0.2 on 2024-03-28; Adafruit-Qualia-S3-RGB666 with ESP32S3
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with examples/qualia_simpletest.py and compare it with examples/connectionmanager_helpers.py, then trace the reported failures through adafruit_portalbase/network.py, adafruit_requests.py, and adafruit_connection_manager.py. Reproduce the intermittent ECONNABORTED and DNS errors on the stated CircuitPython and Qualia versions; done means the simpletest example reliably fetches the test page or the failure cause is identified.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- embedded-iot, networking
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100