My PIO projects stopped to work after update to MacOS 26.0.1

After updating MacOS to the version Tahoe 26.0.1, PlatformIO stopped working for me when connected via WiFi.

Problem:

When I delete the .platformio directory and try to reinstall PlatformIO, I get the following error message:

Warning: No internet connection detected, Python dependency check will be skipped.

Error: Failed to obtain certifi path from the virtual environment: Command '['/Users/robert/.platformio/penv/bin/python', '-c', 'import certifi; print(certifi.where())']' returned non-zero exit status 1.

idf_tools.py installation failed (rc=1). Tail:

Traceback (most recent call last):

File "/Users/<user>/.platformio/packages/tool-esp_install/tools/idf_tools.py", line 31, in <module>

import certifi

ModuleNotFoundError: No module named 'certifi'

idf_tools.py installation failed (rc=1). Tail:

Traceback (most recent call last):

File "/Users/<user>/.platformio/packages/tool-esp_install/tools/idf_tools.py", line 31, in <module>

import certifi

ModuleNotFoundError: No module named 'certifi'

Verbose mode can be enabled via `-v, --verbose` option

Warning: No internet connection detected, Python dependency check will be skipped.

Error in package configuration: FileNotFoundError: [Errno 2] No such file or directory: '/Users/<user>/.platformio/penv/bin/uv'

TypeError: cannot unpack non-iterable NoneType object:

File "/opt/homebrew/Cellar/platformio/6.1.18_3/libexec/lib/python3.14/site-packages/platformio/builder/main.py", line 173:

env.SConscript("$BUILD_SCRIPT")

File "/Users/<user>/.platformio/packages/tool-scons/scons-local-4.8.1/SCons/Script/SConscript.py", line 620:

return _SConscript(self.fs, *files, **subst_kw)

File "/Users/<user>/.platformio/packages/tool-scons/scons-local-4.8.1/SCons/Script/SConscript.py", line 280:

exec(compile(scriptdata, scriptname, 'exec'), call_stack[-1].globals)

File "/Users/<user>/.platformio/platforms/espressif32/builder/main.py", line 49:

PYTHON_EXE, esptool_binary_path = platform.setup_python_env(env)

This error does not occur and everything works normally when I am connected via an Ethernet cable or via my iPhone acting as a hotspot. That’s a workaround. It seems that when operating via WiFi, the PIO version of Python is unable to detect that it is connected to the Internet and cancels the installation of dependent modules. From various discussion forums, I have found that there are general issues with WiFi networking on MacOS 26.0.1, and PIO is not the only software affected. In my opinion, PIO Python uses an undocumented or deprecated API function to detect an Internet connection.

OK but why does it work over wired connection and mobile hotspot? Strange.

Really strange since i use latest MacOS 26.0.1 too. Just with WiFi. No problems at all.

So once PlatformIO is installed, I can use WiFi without any problems. The problem arises when I delete the .platformio directory and try to reinstall everything again. It is quite possible that the problems are caused by some of the libraries I use. I am unable to determine from the log which library is causing the problem, as I do not have the necessary skills. For the sake of completeness, here are my dependencies:

lib_deps =
    m5stack/M5Unified @ ^0.2.8
    m5stack/M5GFX @ ^0.2.11
    m5stack/M5StamPLC @ ^1.1.0
    ModbusClient=https://github.com/eModbus/eModbus.git
    mlesniew/PicoMQTT@^1.3.0
    bblanchon/ArduinoJson @ ^7.4.2