Skip to content

[🚫 Bug] openResources won't work in Linux without sudo privileges. #2050

@kurmasz

Description

@kurmasz

Describe the bug

When I take my project that works on my Mac, and with all three GitHub Actions (linux, Mac, Windows), then try to run it on a Linux desktop, the openResources command fails silently. (No folder opens.)

After digging in, it appears that the call to open in codeUtil.js is failing because either:

  • chrome-sandbox has not had setuid root, or
  • open is not passing the --no-sandbox flag.

When I modified codeUtil.js to add the flag, the tests ran as expected.
I was unable to verify that setuid would fix the issue, because I don't have root privileges on the system.

Steps to reproduce

* Write a test that uses `openResource` to open a folder. (Assert that the folder appears in explorer).
* Run the test on Linux where `vscode-extension-tester` has simply been installed with `npm install`.  (No special action taken on `chrome-sandbox`.)

Logs

There are no logs, tests just fail.

Operating System

Ubuntu

Visual Studio Code

1.103.0

vscode-extension-tester

8.17.0

NodeJS

18.1.1

npm

9.2.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingnew-issueNew issue which was not discussed yet

    Type

    No type

    Projects

    Status

    New

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions