Azure / Azure/iotedgehubdev

simulator start fails on windows if username has space in it

Open
#398 2 comments 0 reactions 0 assignees View on GitHub
bug InBacklog
Dominant language
Python
Stars
91
Forks
38
Avg merge
6m
Merged PRs (30d)
1

Description

VSCode Version: 1.71.1
OS Version: Win 11 Pro
Extension Version: 1.25.9

Steps to Reproduce:
1. when installing windows, choose pick a username that has a space in it. eg "John Smith"
2. install Visual Studio Code, Azure IoT Tools
3. start a nodejs iot edge solution (not sure if language choice here is significant)
4. create module, use "Build and Run IoT Edge Solution in Simulator" feature

error message:
"
ERROR: Error while executing command: docker-compose -f C:\Users\John Smith\AppData\Local.iotedgehubdev\data\data\docker-compose.yml down. Command '['docker-compose', '-f', 'C:\Users\John', 'Smith\AppData\Local\.iotedgehubdev\data\data\docker-compose.yml', 'down']' returned non-zero exit status 1.
"

further down an extra clue
"
"No such command: Smith\AppData\Local.iotedgehubdev\data\data\docker_compose.yml"
"

this suggests that the issue is the space during filename declaration to the command for docker-compose, the space maknig it treat the second half as a argument

looks to be issue here:
https://github.com/Azure/iotedgehubdev/blob/d3bffb36c71041b636a1093514d960ceda9168b4/iotedgehubdev/edgemanager.py#L70

the argument to -f needs to be in quotes

Contributor guide

No contributing guide indexed for this repository

Research direction

Start in iotedgehubdev/edgemanager.py around line 70, then reproduce the simulator workflow with a Windows username containing a space. Inspect how the docker-compose -f command is assembled and verify the command handles the full path as one argument. Confirm the simulator starts successfully and the existing error no longer occurs.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker-compose, python
Domain
devops, devtools
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.