Skip to content

[Snap] Application crashes when deleting files (moveFileToTrash) #2699

@DiarmuidKelly

Description

@DiarmuidKelly

Describe the bug
VSCodium crashes/freezes when attempting to delete files using the "Move to Trash" functionality. When pressing Delete on a file in the explorer or using the context menu delete option, a confirmation dialog appears, and upon confirming, the application becomes unresponsive or crashes. GTK assertion errors appear in the logs immediately after the dialog is shown.

Please confirm that this problem is VSCodium-specific

  • [o] I only have VSCodium installed.

Note: This appears to be specific to the Snap-sandboxed version of VSCodium, likely due to restricted access to the system trash service (gio trash / freedesktop trash spec) within the snap confinement.

Please confirm that the issue/resolution isn't already documented

To Reproduce
Steps to reproduce the behavior:

  1. Open VSCodium (snap version)
  2. Open any project/folder
  3. Right-click on any file in the Explorer sidebar
  4. Select "Delete" or press the Delete key
  5. Confirm deletion in the dialog that appears
  6. Application crashes or becomes unresponsive

Expected behavior
The file should be moved to the system trash without any errors or crashes.

Screenshots
N/A - crash occurs immediately after confirming delete dialog.

Desktop (please complete the following information):

  • OS: Ubuntu (Linux 6.17.0-14-generic)
  • Architecture: x64
  • Version: 509 (snap revision)
  • App Manager: Snap
  • Sandboxed: Snap

Additional context
Error logs captured when triggering the delete action:

[77911:0212/143806.937279:INFO:CONSOLE:38] "%cTRACE color: #888 KeybindingService#dispatch Delete [ Will dispatch command moveFileToTrash ]"
[77911:0212/143806.937352:INFO:CONSOLE:38] "%cTRACE color: #888 CommandService#executeCommand moveFileToTrash"
[77911:0212/143806.937826:INFO:CONSOLE:38] "%cTRACE color: #888 DialogService#confirm Are you sure you want to delete 'TODO.md'?"
[77911:0212/143806.938989:ERROR:content/browser/browser_main_loop.cc:288] Gtk: _gtk_style_provider_private_get_settings: assertion 'GTK_IS_STYLE_PROVIDER_PRIVATE (provider)' failed
[77911:0212/143806.938995:ERROR:content/browser/browser_main_loop.cc:288] Gtk: _gtk_style_provider_private_get_settings: assertion 'GTK_IS_STYLE_PROVIDER_PRIVATE (provider)' failed
[77911:0212/143806.938998:ERROR:content/browser/browser_main_loop.cc:288] Gtk: _gtk_style_provider_private_get_settings: assertion 'GTK_IS_STYLE_PROVIDER_PRIVATE (provider)' failed

Workaround
Installing VSCodium via the .deb package instead of Snap resolves the issue. The trash functionality works correctly with the non-sandboxed .deb version.

Suspected cause
The snap sandbox may not have proper permissions/interfaces connected to access the system trash service. This could potentially be resolved by adding the appropriate snap interface (e.g., desktop, unity7, or a custom interface for trash access).

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions