← Back to issue list

snapcraft remote-build fails in Windows when using a \\wsl$ path

View original Launchpad issue

Metadata

Project
snapcraft (launchpad)
Number
#1940830
Type
issue
State
open
Author
~lucyllewy
Labels
windows wsl
Created
Updated
Closed

Current evaluation

snapcraft remote-build on Windows crashes with a ValueError when the project lives on a \\wsl$ mount, because link_or_copy_tree calls ntpath.relpath across different mounts. Old snapcraft 7.x code path; no maintainer activity in ~5 years.

Suggested action: close stale

Reason: The traceback references snapcraft/internal/remote_build/_worktree.py and snapcraft/file_utils.py, which no longer exist in the current tree (remote-build now lives in snapcraft/commands/remote.py and snapcraft/services/ via craft-application, per commits like 'refactor: use craft-application's remote-build (#5239)'). With 0 comments, no labels beyond windows/wsl, and no activity in ~5 years, the original code path is gone; the reporter should re-test on a current snapcraft release before any fix is pursued.

Impact: 30 Quick Win: 16.5 Staleness: 95 Complexity: 45 Confidence: 70 Support Request: 5

Issue body

Steps to reproduce: 1. Install snapcraft to Windows 2. Create a WSL2 instance with Ubuntu 20.04 called "Ubuntu" 3. Load the WSL2 instance and checkout a project to build 4. Navigate in PowerShell to \\wsl$\Ubuntu\path\to\project 5. Execute snapcraft remote-build in PowerShell Output: snapcraft remote-build is experimental and is subject to change - use with caution. Using build ID snapcraft-home-assistant-snap-481c44ebc53271709774b19f72aff09c The authorization page:  (https://launchpad.net/+authorize-token?oauth_token=PbWrL5vD0XMnFBtXTSrk&allow_permission=DESKTOP_INTEGRATION) should be opening in your browser. Use your browser to authorize this program to access Launchpad on your behalf. Waiting to hear from Launchpad about your decision... All data sent to remote builders will be publicly available. Are you sure you want to continue? [Y/n]: y Packaging sources for updater... Sorry, an error occurred in Snapcraft: path is on mount 'C:', start on mount '\\\\wsl$\\Ubuntu' Traceback (most recent call last):   File "snapcraft\cli\__main__.py", line 43, in <module>   File "click\core.py", line 1137, in __call__   File "click\core.py", line 1062, in main   File "click\core.py", line 1668, in invoke   File "click\core.py", line 1404, in invoke   File "click\core.py", line 763, in invoke   File "snapcraft\cli\remote.py", line 181, in remote_build   File "snapcraft\cli\remote.py", line 219, in _start_build   File "snapcraft\internal\remote_build\_worktree.py", line 325, in prepare_repository   File "snapcraft\internal\remote_build\_worktree.py", line 244, in _process_part_sources   File "snapcraft\internal\remote_build\_worktree.py", line 192, in _pull_source   File "snapcraft\internal\sources\_local.py", line 41, in pull   File "snapcraft\file_utils.py", line 216, in link_or_copy_tree   File "ntpath.py", line 562, in relpath ValueError: path is on mount 'C:', start on mount '\\\\wsl$\\Ubuntu' We would appreciate it if you created a bug report at https://launchpad.net/snapcraft/+filebug with the above text included. You can find the traceback in file 'C:\\Users\\DLLEWE~1\\AppData\\Local\\Temp\\tmpi3dhep08\\trace.txt'. Traceback: Traceback (most recent call last):   File "snapcraft\cli\__main__.py", line 43, in <module>   File "click\core.py", line 1137, in __call__   File "click\core.py", line 1062, in main   File "click\core.py", line 1668, in invoke   File "click\core.py", line 1404, in invoke   File "click\core.py", line 763, in invoke   File "snapcraft\cli\remote.py", line 181, in remote_build   File "snapcraft\cli\remote.py", line 219, in _start_build   File "snapcraft\internal\remote_build\_worktree.py", line 325, in prepare_repository   File "snapcraft\internal\remote_build\_worktree.py", line 244, in _process_part_sources   File "snapcraft\internal\remote_build\_worktree.py", line 192, in _pull_source   File "snapcraft\internal\sources\_local.py", line 41, in pull   File "snapcraft\file_utils.py", line 216, in link_or_copy_tree   File "ntpath.py", line 562, in relpath ValueError: path is on mount 'C:', start on mount '\\\\wsl$\\Ubuntu'

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.8-27b
Impact: 30
Quick Win: 16.5
Staleness: 95
Complexity: 45
Confidence: 70
Support Request: 5
close stale snapcraft remote-build on Windows crashes with a ValueError when the project lives on a \\wsl$ mount, because link_or_copy_tree calls ntpath.relpath across different mounts. Old snapcraft 7.x code path; no maintainer activity in ~5 years.
qwen/qwen3.6-35b-a3b
Staleness: 98
Complexity: 45
Confidence: 85
Support Request: 15
close stale Bug report detailing a ValueError when running snapcraft remote-build on Windows using a WSL2 path. Python path resolution fails across different Windows mounts. No maintainer interaction in nearly five years.
qwen/qwen3.6-35b-a3b
Staleness: 95
Complexity: 40
Confidence: 90
Support Request: 10
close stale Bug report: snapcraft remote-build fails with path error on Windows WSL. Issue is 5 years old with no activity.
qwen3.6-35b-a3b-mtp-q6
Staleness: 98
Complexity: 65
Confidence: 82
Support Request: 5
close stale Snapcraft remote-build crashes with a ValueError when running from a WSL path on Windows due to ntpath relpath limitations. The report is nearly five years old with no maintainer response.
qwen3.6-35b-a3b-mtp-q6
Staleness: 98
Complexity: 45
Confidence: 70
Support Request: 5
close stale Bug report for snapcraft remote-build failing on Windows when using WSL paths due to Python's ntpath.relpath mount conflict. Open for ~5 years with no maintainer response or activity.

Update history

No update history recorded yet.

Related issues

No related issues found above the similarity threshold.