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

EINPROGRESS when trying to connect to wifi the first time each day #9302

Open
dtorres-sf opened this issue Jun 4, 2024 · 4 comments
Open
Labels
bug espressif applies to multiple Espressif chips network
Milestone

Comments

@dtorres-sf
Copy link

CircuitPython version

Adafruit CircuitPython 9.1.0-beta.3 on 2024-05-22; Adafruit Feather ESP32S3 4MB Flash 2MB PSRAM with ESP32S3

Code/REPL

# This is the failing line. I am use portalbase library to manage the feather esp32s3 and using the network class to do the connections and get the time from adafruit io
utc_time = self.portalbase.network.get_strftime("%Y-%m-%dT%H:%M:%SZ", location="UTC")

Behavior

  File "adafruit_connection_manager.py", line 271, in get_socket
OSError: [Errno 119] EINPROGRESS

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "code.py", line 282, in <module>
  File "code.py", line 245, in main
  File "code.py", line 130, in start_timer
  File "clockify.py", line 115, in start_clock
  File "adafruit_portalbase/network.py", line 237, in get_strftime
  File "adafruit_requests.py", line 597, in get
  File "adafruit_requests.py", line 535, in request
  File "adafruit_connection_manager.py", line 282, in get_socket
RuntimeError: Error connecting socket: [Errno 119] EINPROGRESS

Description

The first time I try to connect to wifi each day I get this error. After that it works the rest of the day (even if power cycling in between).

Additional information

No response

@dtorres-sf dtorres-sf added the bug label Jun 4, 2024
@tannewt tannewt added network espressif applies to multiple Espressif chips labels Jun 4, 2024
@tannewt tannewt added this to the Long term milestone Jun 4, 2024
@tannewt
Copy link
Member

tannewt commented Jun 4, 2024

How are you starting the device and connection each day? Is it a fresh power up?

@dtorres-sf
Copy link
Author

Good question. So I actually leave the device plugged into my docking station over USB. It is battery powered as well. So each morning I come in, hook up my laptop to the docking station which provides data and power to the device, but it is possible it was already powered on from the day before and running on battery but it would be in deep sleep mode.

@dtorres-sf
Copy link
Author

Last night I did not leave the USB connected to the docking station and this morning I did a full power cycle (disconnecting the battery) and started back up. It appeared to still hit the issue. I cannot be 100% certain since I wasn't connected to USB/serial to see the stack trace, but it hit the assert at the exact same time it usually does (and the app running has been unchanged for months and is pretty stable other than this issue).

@tannewt
Copy link
Member

tannewt commented Jun 6, 2024

Thanks for the info. That is weird! The simplest fix would be to catch the exception and retry.

To debug, we'd need the IDF logs that can be output over the UART.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug espressif applies to multiple Espressif chips network
Projects
None yet
Development

No branches or pull requests

2 participants