Skip to content

User id mismatch when using vscode and devcontainer on Windows 11 with WSL2 #8769

@akaviaLab

Description

@akaviaLab

Have you checked the docs?

Description of the bug

I've been trying to develop nf-core modules using vscode.
The devcontainer is defined, and vscode builds it. However, when I activate it and try to run nextflow, I get a permission issue with /opt/conda/bin/nextflow (see below for error).

$ ls -l /opt/conda/bin/nextflow 
-rwx--x--x 1 33333 33333 17237 Jul  9 07:14 /opt/conda/bin/nextflow

Looking at the users, I'm defined as gitpod, which is 1000, as opposed to the Dockerfile, which is setting it as 33333. Looking at /etc/passwd, there is no user defined as 33333.

$cat /etc/passwd | grep gitpod
gitpod:x:1000:1000::/home/gitpod:/bin/bash

There's a line in the devcontainer build log (attached in Relevant files) that says
865f229db7d845ff23f4072a61f523d9b1556a237adebd7afc5de8257436416a-features --build-arg REMOTE_USER=gitpod --build-arg NEW_UID=1000 --build-arg NEW_GID=1000 --build-arg IMAGE_USER=gitpod /tmp/devcontainercli-uridavid/empty-folder

That seems to be causing the problem, but I don't know how to fix it. If this is a setting, please let me know. It seems like it could be related to microsoft/vscode#48659 maybe.

Command used and terminal output

gitpod /workspaces/modules (gprofiler_sources) $ nf-test test modules/nf-core/gprofiler2/gost/tests/main.nf.test
Picked up JAVA_TOOL_OPTIONS: 

🚀 nf-test 0.9.2
https://www.nf-test.com
(c) 2021 - 2024 Lukas Forer and Sebastian Schoenherr

Load .nf-test/plugins/nft-bam/0.5.0/nft-bam-0.5.0.jar
Load .nf-test/plugins/nft-compress/0.1.0/nft-compress-0.1.0.jar
Load .nf-test/plugins/nft-vcf/1.0.7/nft-vcf-1.0.7.jar
Load .nf-test/plugins/nft-csv/0.1.0/nft-csv-0.1.0.jar
Load .nf-test/plugins/nft-utils/0.0.3/nft-utils-0.0.3.jar
Load .nf-test/plugins/nft-fastq/0.0.1/nft-fastq-0.0.1.jar
Load .nf-test/plugins/nft-anndata/0.1.0/nft-anndata-0.1.0.jar

Test Process GPROFILER2_GOST

  Test [6ed66c09] 'test' Assertion failed: 

assert process.success
       |       |
       |       false
       GPROFILER2_GOST

java.lang.RuntimeException: Process has no output channels. process.out can not be used.
FAILED (0.264s)

  Assertion failed: 
  
  2 of 2 assertions failed
  
  Nextflow stdout:
  
  Nextflow stderr:
  
  bash: /opt/conda/bin/nextflow: Permission denied
  

  Test [850663a7] 'stub' Assertion failed: 

assert process.success
       |       |
       |       false
       GPROFILER2_GOST

java.lang.RuntimeException: Process has no output channels. process.out can not be used.
FAILED (0.052s)

  Assertion failed: 
  
  2 of 2 assertions failed
  
  Nextflow stdout:
  
  Nextflow stderr:
  
  bash: /opt/conda/bin/nextflow: Permission denied
  



FAILURE: Executed 2 tests in 0.361s (2 failed)

gitpod /workspaces/modules (gprofiler_sources) $ [11689 ms] Start: Run: docker -v
[11751 ms] Start: Resolving Remote
[11763 ms] Start: Run: git rev-parse --show-cdup
[12145 ms] Start: Run: docker ps -q -a --filter label=devcontainer.local_folder=\\wsl.localhost\Ubuntu\home\uridavid\Code\nf-core\modules --filter label=devcontainer.config_file=/home/uridavid/Code/nf-core/modules/.devcontainer/devcontainer.json
[12241 ms] Start: Run: docker inspect --type image nfcore/gitpod:dev
[12718 ms] Start: Run: docker-credential-desktop.exe get
[14614 ms] Resolving Feature dependencies for 'ghcr.io/devcontainers/features/github-cli:1.0.11'...
[14618 ms] * Processing feature: ghcr.io/devcontainers/features/github-cli:1.0.11
[14831 ms] Start: Run: docker-credential-desktop.exe get
nd signal null.t forwarding 53195 > 41757 > 41757 terminated by extension (closed) with code 0 a

Relevant files

vscode-devcontainer.log

System information

Version: 25.04.6 build 5954
Created: 01-07-2025 11:27 UTC (12:27 BST)
System: Linux 6.6.87.2-microsoft-standard-WSL2
Runtime: Groovy 4.0.26 on OpenJDK 64-Bit Server VM 21.0.7+6-Ubuntu-0ubuntu124.04
Encoding: UTF-8 (UTF-8)

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

Status

In Progress

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions