xdg-document-portal 1.0.2-1ubuntu1 crashes when trying to save to a non-existant file

Bug #1810755 reported by James Henstridge
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
xdg-desktop-portal (Ubuntu)
New
Undecided
Unassigned

Bug Description

When using the desktop portal API to save a file, the xdg-document-portal service crashes if we try to save to a new file name.

Steps to reproduce:

1. On an Ubuntu 18.10 system, install the test-snapd-portal-client snap:

    snap install --edge test-snapd-portal-client

2. run the save-file test:

    test-snapd-portal-client save-file "foo"

3. in the file chooser, select a file name that does not exist.

Actual results:

The command exits with the following error (eliding the traceback):

    ConnectionAbortedError: [Errno 103] Software caused connection abort: '/run/user/1000/doc/eca716d3/xyz.txt'

Furthermore, "systemctl --user status xdg-document-portal.service" reports the following error:

    Jan 07 17:38:06 scruffy xdg-document-portal[30685]: error: Invalid id snap.test-snapd-portal-client: Names must contain at least 2 periods
    Jan 07 17:38:06 scruffy xdg-document-portal[30685]: error: **
    Jan 07 17:38:06 scruffy xdg-document-portal[30685]: xdg-desktop-portal:ERROR:document-portal/document-portal-fuse.c:206:xdp_inode_destroy: assertion failed: (inode->dir_fd == -1)

Expected results:

The file should be created with the contents "foo".

The problem is not present with xdg-desktop-portal 1.0.3. I suspect the fix is one of these extra patches alexl suggested we take: https://bugs.launchpad.net/ubuntu/+source/xdg-desktop-portal/+bug/1691649/comments/10

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.