Skip to content

Extension cannot be loaded when settings.json is read-only #1278

Description

@Zocker1999NET

Describe the bug

This extension fails to activate due to the settings.json being read-only.

Expected Behavior

The extension just working fine even when settings.json is read-only. Maybe complain about that a given setting is invalid or so.

Current Behavior

In the "Extension Host" output:

2026-08-02 23:05:56.633 [error] Activating extension redhat.vscode-yaml failed due to an error:
2026-08-02 23:05:56.633 [error] CodeExpectedError: Error while writing to User Settings. Unable to write file 'vscode-userdata:/home/zocker/.config/Code/User/profiles/sysadmin/settings.json' (Unknown (FileSystemError): Error: EROFS: read-only file system, open '/home/zocker/.config/Code/User/profiles/sysadmin/settings.json')
    at _8e.save (vscode-file://vscode-app/nix/store/g9bmnqasp0w164216m4z53wpbssmg3s4-vscode-1.130.0/lib/vscode/resources/app/out/vs/workbench/workbench.desktop.main.js:5303:4390)
    at async _8e.updateConfiguration (vscode-file://vscode-app/nix/store/g9bmnqasp0w164216m4z53wpbssmg3s4-vscode-1.130.0/lib/vscode/resources/app/out/vs/workbench/workbench.desktop.main.js:5303:4174)
    at async _8e.doWriteConfiguration (vscode-file://vscode-app/nix/store/g9bmnqasp0w164216m4z53wpbssmg3s4-vscode-1.130.0/lib/vscode/resources/app/out/vs/workbench/workbench.desktop.main.js:5303:3623)
    at async Object.factory (vscode-file://vscode-app/nix/store/g9bmnqasp0w164216m4z53wpbssmg3s4-vscode-1.130.0/lib/vscode/resources/app/out/vs/workbench/workbench.desktop.main.js:5303:3298)

This obviously makes this extension but also every other extension which depends on it, e.g. RedHat Ansible, totally unusable.

Steps to Reproduce

  1. Configure VSCode via e.g. NixOS / Home Manager
  2. Install Extension
  3. See error in output

Environment

  • Windows
  • Mac
  • Linux
  • other (please specify)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions