← Back to issue list

Failed to pull source: unable to determine source type of '/usr/share/snapcraft/extensions/ros2'.

View original Github issue

Metadata

Project
snapcraft
Number
#5721
Type
issue
State
open
Author
jkbeg
Labels
Created
Updated
Closed

Current evaluation

Snapcraft 8 Docker image fails to resolve ros2 extension: get_extensions_data_dir() returns /usr/share/snapcraft/extensions but extensions are installed under site-packages/extensions. Untriaged, no maintainer activity in 374 days; same bug tracked in snapcraft-rocks#109.

Suggested action: needs triage

Reason: No labels, no comments, no maintainer response in 374 days, so this is untriaged. The bug is real and reproducible: get_extensions_data_dir() in extension.py:133 returns Path(sys.prefix)/share/snapcraft/extensions, which is correct for the snap (snap/snapcraft.yaml maps **/site-packages/extensions to share/snapcraft/extensions) but wrong in the Docker image where extensions land in site-packages/extensions. The identical issue is tracked in snapcraft-rocks#109 (open, acknowledged with a community workaround), confirming the root cause is in the Docker image build, not snapcraft core.

Impact: 55 Quick Win: 33.0 Staleness: 75 Complexity: 40 Confidence: 70 Support Request: 10

Issue body

### Bug Description Snapcraft fails to find its own extensions: ``` 2025-08-22T07:04:11.745Z [snapcraft] Initializing parts lifecycle 2025-08-22T07:04:13.827Z [snapcraft] **Failed to pull source: unable to determine source type of '/usr/share/snapcraft/extensions/ros2'.** 2025-08-22T07:04:13.828Z [snapcraft] Full execution log: '/root/.local/state/snapcraft/log/snapcraft-20250822-070411.734995.log' 2025-08-22T07:04:13.956Z [pebble] Service "snapcraft" stopped unexpectedly with code 1 ``` extensions path is hardcoded here: `usr/share/snapcraft/extensions` https://github.com/canonical/snapcraft/blob/df4ec6775a28d4a345c93d9f83a1193c0abc1c9d/snapcraft/extensions/extension.py#L135 but in latest docker container for snapcraft 8, ghcr.io/canonical/snapcraft:8_core22 (24050a02f9fe) extensions are located here: `/usr/lib/python3.10/site-packages/extensions/ros2` ### To Reproduce ```bash git clone https://github.com/snapcraft-docs/ros2-talker-listener-core22.git cd ros2-talker-listener-core22 docker run -v $(pwd):/project ghcr.io/canonical/snapcraft:8_core22 ``` ### Environment Ubuntu 22.04 LTS, Docker 28.3.1 ### snapcraft.yaml ```yaml name: ros2-talker-listener version: '0.1' summary: ROS 2 Talker/Listener Example description: | This example launches a ROS 2 talker and listener. confinement: devmode base: core22 parts: ros-demos: plugin: colcon source: https://github.com/ros2/demos.git source-branch: humble source-subdir: demo_nodes_cpp stage-packages: [ros-humble-ros2launch] apps: ros2-talker-listener: command: opt/ros/humble/bin/ros2 launch demo_nodes_cpp talker_listener.launch.py extensions: [ros2-humble] ``` ### Relevant log output ```shell docker run -v $(pwd):/project ghcr.io/canonical/snapcraft:8_core22 2025-08-22T07:04:05.252Z [pebble] Started daemon. 2025-08-22T07:04:05.284Z [pebble] POST /v1/services 16.330855ms 202 (http+unix) 2025-08-22T07:04:05.300Z [pebble] Service "snapcraft" starting: /bin/run-snapcraft.sh [ pack ] 2025-08-22T07:04:05.305Z [snapcraft] 2025-08-22T07:04:05.305Z [snapcraft] WARNING: apt does not have a stable CLI interface. Use with caution in scripts. 2025-08-22T07:04:05.305Z [snapcraft] 2025-08-22T07:04:05.777Z [snapcraft] Get:1 http://archive.ubuntu.com/ubuntu jammy InRelease [270 kB] 2025-08-22T07:04:05.922Z [snapcraft] Get:2 http://security.ubuntu.com/ubuntu jammy-security InRelease [129 kB] 2025-08-22T07:04:05.938Z [snapcraft] Get:3 http://archive.ubuntu.com/ubuntu jammy-updates InRelease [128 kB] 2025-08-22T07:04:05.981Z [snapcraft] Get:4 http://archive.ubuntu.com/ubuntu jammy-backports InRelease [127 kB] 2025-08-22T07:04:06.031Z [snapcraft] Get:5 http://archive.ubuntu.com/ubuntu jammy/restricted amd64 Packages [164 kB] 2025-08-22T07:04:06.080Z [snapcraft] Get:6 http://archive.ubuntu.com/ubuntu jammy/main amd64 Packages [1792 kB] 2025-08-22T07:04:06.249Z [snapcraft] Get:7 http://archive.ubuntu.com/ubuntu jammy/multiverse amd64 Packages [266 kB] 2025-08-22T07:04:06.272Z [snapcraft] Get:8 http://archive.ubuntu.com/ubuntu jammy/universe amd64 Packages [17.5 MB] 2025-08-22T07:04:06.298Z [snapcraft] Get:9 http://security.ubuntu.com/ubuntu jammy-security/multiverse amd64 Packages [48.5 kB] 2025-08-22T07:04:06.317Z [pebble] GET /v1/changes/1/wait 1.032101461s 200 (http+unix) 2025-08-22T07:04:06.318Z [pebble] Started default services with change 1. 2025-08-22T07:04:06.408Z [snapcraft] Get:10 http://security.ubuntu.com/ubuntu jammy-security/universe amd64 Packages [1271 kB] 2025-08-22T07:04:06.948Z [snapcraft] Get:11 http://security.ubuntu.com/ubuntu jammy-security/restricted amd64 Packages [5235 kB] 2025-08-22T07:04:07.779Z [snapcraft] Get:12 http://security.ubuntu.com/ubuntu jammy-security/main amd64 Packages [3253 kB] 2025-08-22T07:04:08.583Z [snapcraft] Get:13 http://archive.ubuntu.com/ubuntu jammy-updates/restricted amd64 Packages [5430 kB] 2025-08-22T07:04:09.285Z [snapcraft] Get:14 http://archive.ubuntu.com/ubuntu jammy-updates/universe amd64 Packages [1575 kB] 2025-08-22T07:04:09.452Z [snapcraft] Get:15 http://archive.ubuntu.com/ubuntu jammy-updates/multiverse amd64 Packages [75.9 kB] 2025-08-22T07:04:09.465Z [snapcraft] Get:16 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 Packages [3569 kB] 2025-08-22T07:04:09.856Z [snapcraft] Get:17 http://archive.ubuntu.com/ubuntu jammy-backports/main amd64 Packages [83.2 kB] 2025-08-22T07:04:09.860Z [snapcraft] Get:18 http://archive.ubuntu.com/ubuntu jammy-backports/universe amd64 Packages [35.2 kB] 2025-08-22T07:04:09.986Z [snapcraft] Fetched 40.9 MB in 5s (8818 kB/s) 2025-08-22T07:04:09.986Z [snapcraft] Reading package lists... 2025-08-22T07:04:10.683Z [snapcraft] Building dependency tree... 2025-08-22T07:04:10.813Z [snapcraft] Reading state information... 2025-08-22T07:04:10.827Z [snapcraft] 8 packages can be upgraded. Run 'apt list --upgradable' to see them. 2025-08-22T07:04:11.745Z [snapcraft] Initializing parts lifecycle 2025-08-22T07:04:13.827Z [snapcraft] Failed to pull source: unable to determine source type of '/usr/share/snapcraft/extensions/ros2'. 2025-08-22T07:04:13.828Z [snapcraft] Full execution log: '/root/.local/state/snapcraft/log/snapcraft-20250822-070411.734995.log' 2025-08-22T07:04:13.956Z [pebble] Service "snapcraft" stopped unexpectedly with code 1 2025-08-22T07:04:13.956Z [pebble] Service "snapcraft" on-failure action is "shutdown", triggering failure shutdown 2025-08-22T07:04:13.956Z [pebble] Server exiting! Reason: <nil> ``` ### Additional context _No response_

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.8-27b
Impact: 55
Quick Win: 33.0
Staleness: 75
Complexity: 40
Confidence: 70
Support Request: 10
needs triage Snapcraft 8 Docker image fails to resolve ros2 extension: get_extensions_data_dir() returns /usr/share/snapcraft/extensions but extensions are installed under site-packages/extensions. Untriaged, no maintainer activity in 374 days; same bug tracked in snapcraft-rocks#109.
qwen/qwen3.6-35b-a3b
Staleness: 95
Complexity: 40
Confidence: 85
Support Request: 10
close stale Snapcraft fails to locate extensions due to hardcoded path mismatch in Docker container. No maintainer response, issue is 334 days old and completely inactive.
qwen3.6-35b-a3b-mtp-q6
Staleness: 92
Complexity: 40
Confidence: 85
Support Request: 10
needs triage Snapcraft fails to locate ROS2 extension due to hardcoded path mismatch in Docker container. Issue is 320 days old with no maintainer response or labels.
qwen3.6-35b-a3b-mtp-q6
Staleness: 88
Complexity: 40
Confidence: 75
Support Request: 10
close stale Snapcraft fails to locate ROS2 extensions due to a hardcoded path mismatch between the source code and the Docker container layout. The open issue has no comments or labels and requires triage and assignment.

Update history

No update history recorded yet.

Related work

  • Duplicate Of: canonical/snapcraft-rocks#109 (confidence 85%)

    Identical title and error message; that issue is open, triaged, and has a community workaround but no official fix.

Related issues

Issue Project State Summary Similarity
#109 Failed to pull source: unable to determine source type of '/usr/share/snapcraft/extensions/ros2' snapcraft-rocks open Snapcraft 8 Docker image (ghcr.io/canonical/snapcraft:8_core22) fails to resolve ros2 extension: get_extensions_data_dir() returns /usr/share/snapcraft/extensions but extensions live in site-packages. Triaged, acknowledged by maintainer, workaround shared, still open.
94%
#1968303 remote-build: support for snap relative sources snapcraft (launchpad) open Remote build fails when a part uses a snapcraft extension path ($SNAPCRAFT_EXTENSIONS_DIR/ros2) as its source, because the remote builder cannot determine the source type. Open since ~2021 with no labels, comments, or maintainer response.
70%