Skip to content

Error during build #5500

Closed
Closed

Description

@raygcherry-svg

Executing task: C:\Users\raycherry.platformio\penv\Scripts\platformio.exe run

C:\Users\raycherry.platformio\penv\Lib\site-packages\requests_init_.py:92: RequestsDependencyWarning: Unable to find acceptable character detection dependency (chardet or charset_normalizer).
warnings.warn(
Processing esp32-s3-devkitc1-n8r8 (platform: https://github.com/pioarduino/platform-espressif32/releases/download/stable/platform-espressif32.zip; board: esp32-s3-devkitc1-n8r8; framework: arduino)
---------------------------------------------------------------------------------------------------------------------------------Tool Manager: Installing https://github.com/espressif/arduino-esp32/releases/download/3.3.11/esp32-core-3.3.11-libs.tar.xz
Unpacking [#-----------------------------------] 3% 00:01:12
Unpacking...
FileNotFoundError: Traceback (most recent call last):
File "C:\Users\raycherry.platformio\penv\Lib\site-packages\platformio\package\manager_install.py", line 37, in unpack
return fu.unpack(dst, with_progress=with_progress)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\raycherry.platformio\penv\Lib\site-packages\platformio\package\unpack.py", line 201, in unpack
self._archiver.extract_item(item, dest_dir)
File "C:\Users\raycherry.platformio\penv\Lib\site-packages\platformio\package\unpack.py", line 102, in extract_item
return super().extract_item(item, dest_dir)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\raycherry.platformio\penv\Lib\site-packages\platformio\package\unpack.py", line 49, in extract_item
self._afo.extract(item, dest_dir)
File "C:\Users\raycherry.platformio\python3\Lib\tarfile.py", line 2297, in extract
self._extract_one(tarinfo, path, set_attrs, numeric_owner)
File "C:\Users\raycherry.platformio\python3\Lib\tarfile.py", line 2331, in _extract_one
self._handle_fatal_error(e)
File "C:\Users\raycherry.platformio\python3\Lib\tarfile.py", line 2327, in _extract_one
self._extract_member(tarinfo, os.path.join(path, tarinfo.name),
File "C:\Users\raycherry.platformio\python3\Lib\tarfile.py", line 2410, in _extract_member
self.makefile(tarinfo, targetpath)
File "C:\Users\raycherry.platformio\python3\Lib\tarfile.py", line 2455, in makefile
with bltn_open(targetpath, "wb") as target:
^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: 'C:\Users\raycherry\.platformio\.cache\tmp\pkg-installing-qej8ekuz\esp32-arduino-libs\esp32c6\include\espressif__esp_matter\connectedhomeip\connectedhomeip\src\app\clusters\camera-av-settings-user-level-management-server\camera-av-settings-user-level-management-server.h'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Users\raycherry.platformio\penv\Lib\site-packages\platformio_main_.py", line 103, in main
cli() # pylint: disable=no-value-for-parameter
^^^^^
File "C:\Users\raycherry.platformio\penv\Lib\site-packages\click\core.py", line 1514, in call
return self.main(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\raycherry.platformio\penv\Lib\site-packages\click\core.py", line 1435, in main
rv = self.invoke(ctx)
^^^^^^^^^^^^^^^^
File "C:\Users\raycherry.platformio\penv\Lib\site-packages\platformio\cli.py", line 85, in invoke
return super().invoke(ctx)
^^^^^^^^^^^^^^^^^^^
File "C:\Users\raycherry.platformio\penv\Lib\site-packages\click\core.py", line 1902, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\raycherry.platformio\penv\Lib\site-packages\click\core.py", line 1298, in invoke
return ctx.invoke(self.callback, **ctx.params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\raycherry.platformio\penv\Lib\site-packages\click\core.py", line 853, in invoke
return callback(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\raycherry.platformio\penv\Lib\site-packages\click\decorators.py", line 34, in new_func
return f(get_current_context(), *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\raycherry.platformio\penv\Lib\site-packages\platformio\run\cli.py", line 147, in cli
process_env(
File "C:\Users\raycherry.platformio\penv\Lib\site-packages\platformio\run\cli.py", line 210, in process_env
).process()
^^^^^^^^^
File "C:\Users\raycherry.platformio\penv\Lib\site-packages\platformio\run\processor.py", line 81, in process
install_project_env_dependencies(
File "C:\Users\raycherry.platformio\penv\Lib\site-packages\platformio\package\commands\install.py", line 132, in install_project_env_dependencies
_install_project_env_platform(project_env, options),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\raycherry.platformio\penv\Lib\site-packages\platformio\package\commands\install.py", line 149, in _install_project_env_platform
PlatformPackageManager().install(
File "C:\Users\raycherry.platformio\penv\Lib\site-packages\platformio\package\manager\platform.py", line 62, in install
p.install_required_packages(force=force)
File "C:\Users\raycherry.platformio\penv\Lib\site-packages\platformio\platform_packages.py", line 76, in install_required_packages
self.install_package(name, force=force)
File "C:\Users\raycherry.platformio\penv\Lib\site-packages\platformio\platform_packages.py", line 70, in install_package
return self.pm.install(spec or self.get_package_spec(name), force=force)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\raycherry.platformio\penv\Lib\site-packages\platformio\package\manager_install.py", line 47, in install
pkg = self._install(spec, skip_dependencies=skip_dependencies, force=force)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\raycherry.platformio\penv\Lib\site-packages\platformio\package\manager_install.py", line 97, in _install
pkg = self.install_from_uri(spec.uri, spec)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\raycherry.platformio\penv\Lib\site-packages\platformio\package\manager_install.py", line 191, in install_from_uri
self.unpack(dl_path, tmp_dir)
File "C:\Users\raycherry.platformio\penv\Lib\site-packages\platformio\package\manager_install.py", line 42, in unpack
return fu.unpack(dst, with_progress=False)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\raycherry.platformio\penv\Lib\site-packages\platformio\package\unpack.py", line 179, in unpack
self._archiver.extract_item(item, dest_dir)
File "C:\Users\raycherry.platformio\penv\Lib\site-packages\platformio\package\unpack.py", line 102, in extract_item
return super().extract_item(item, dest_dir)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\raycherry.platformio\penv\Lib\site-packages\platformio\package\unpack.py", line 49, in extract_item
self._afo.extract(item, dest_dir)
File "C:\Users\raycherry.platformio\python3\Lib\tarfile.py", line 2297, in extract
self._extract_one(tarinfo, path, set_attrs, numeric_owner)
File "C:\Users\raycherry.platformio\python3\Lib\tarfile.py", line 2331, in _extract_one
self._handle_fatal_error(e)
File "C:\Users\raycherry.platformio\python3\Lib\tarfile.py", line 2327, in _extract_one
self._extract_member(tarinfo, os.path.join(path, tarinfo.name),
File "C:\Users\raycherry.platformio\python3\Lib\tarfile.py", line 2410, in _extract_member
self.makefile(tarinfo, targetpath)
File "C:\Users\raycherry.platformio\python3\Lib\tarfile.py", line 2455, in makefile
with bltn_open(targetpath, "wb") as target:
^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: 'C:\Users\raycherry\.platformio\.cache\tmp\pkg-installing-qej8ekuz\esp32-arduino-libs\esp32c6\include\espressif__esp_matter\connectedhomeip\connectedhomeip\src\app\clusters\camera-av-settings-user-level-management-server\camera-av-settings-user-level-management-server.h'

============================================================

An unexpected error occurred. Further steps:

============================================================

Activity

  1. JayPatel095 commented on Aug 19, 2026

    @JayPatel095

    This is b/c of Windows' 260 char path limit. The path in the traceback is 269 chars:

    C:\Users\raycherry\.platformio\.cache\tmp\pkg-installing-qej8ekuz\esp32-arduino-libs\esp32c6\include\espressif__esp_matter\connectedhomeip\connectedhomeip\src\app\clusters\camera-av-settings-user-level-management-server\camera-av-settings-user-level-management-server.h
    

    The parent dir is 220 chars so os.makedirs() works, then the file itself is 269 and open(targetpath, "wb") fails. Windows returns ERROR_PATH_NOT_FOUND and Python turns that into FileNotFoundError [Errno 2]. The espressif__esp_matter/connectedhomeip headers in the newer arduino-esp32 libs are long enough to go over that limit.

    You can work around this by:

    • Use a shorter core directory. core_dir = C:\pio under [platformio] in platformio.ini, or the PLATFORMIO_CORE_DIR env var. That same path is 245 chars
    • Or turn on long paths in Windows: HKLM\SYSTEM\CurrentControlSet\Control\FileSystem\LongPathsEnabled = 1 (DWORD)

    #5492 is the same fail, #5342 is the same on a zip.

    For a fix in core: BaseArchiver.extract_item() in platformio/package/unpack.py gives dest_dir to TarFile.extract() / ZipFile.extract(). Prefixing a dest_dir with \\?\ on Windows gets around the limit without needing the registry key. Forward slashes aren't an issue there, since tarfile._extract_member does targetpath.replace("/", os.sep) and zipfile joins path components itself. ZIPArchiver.after_extract() needs the same change since it joins dest_dir with the raw archive name.

    I can send a PR for this if a contributor thinks the above makes sense.

  2. JayPatel095 commented on Aug 21, 2026

    @JayPatel095

    @ivankravets Bumping the above

  3. added this to the 6.2.0 milestone on Aug 24, 2026
  4. ivankravets commented on Aug 25, 2026

    @ivankravets
    Member

    Please re-test with pio upgrade --dev.

  5. added a commit that references this issue on Aug 25, 2026
    c5a0f29
  6. added a commit that references this issue on Sep 15, 2026
    c80dad5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions