FS#62860 - [gnome-shell] Gio issue in gnome-shell 1:3.32.2+1+g24cb1c1aa-1

Attached to Project: Arch Linux
Opened by abakkk (abakkk) - Monday, 10 June 2019, 11:22 GMT
Last edited by Toolybird (Toolybird) - Monday, 29 May 2023, 03:06 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Jan Alexander Steffens (heftig)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 7
Private No

Details

I have problems with Gio.File (related to glib-networking ?), but only via GNOME Shell.
Files that have not a 'file:///' uri scheme are not recognized.

State of packages:

* gnome-shell (1:3.32.2-2 -> 1:3.32.2+1+g24cb1c1aa-1)
* glib-networking (2.60.2-1 -> 2.60.3-1)
* glib2 2.60.3-1 (not upgraded)
* gjs 2:1.56.2-1 (not upgraded)

In GJS console, I get:

* `Gio.File.new_for_uri('file:///').query_exists(null)` return `true`
* `Gio.File.new_for_uri('trash:///').query_exists(null)` return `true`
* `Gio.File.new_for_uri('recent:///').query_exists(null)` return `true`
* `Gio.File.new_for_uri('network:///').query_exists(null)` return `true`
* `Gio.File.new_for_uri('computer:///').query_exists(null)` return `true`
* `Gio.File.new_for_uri('smb://my/server').query_exists(null)` return `true`

In GNOME Shell (looking glass), I get:

* `Gio.File.new_for_uri('file:///').query_exists(null)` return `true`
* `Gio.File.new_for_uri('trash:///').query_exists(null)` return `false`
* `Gio.File.new_for_uri('recent:///').query_exists(null)` return `false`
* `Gio.File.new_for_uri('network:///').query_exists(null)` return `false`
* `Gio.File.new_for_uri('computer:///').query_exists(null)` return `false`
* `Gio.File.new_for_uri('smb://my/server').query_exists(null)` return `false`
This task depends upon

Closed by  Toolybird (Toolybird)
Monday, 29 May 2023, 03:06 GMT
Reason for closing:  No response
Additional comments about closing:  Plus it's old and stale. Assuming fixed by update. If still an issue, please let us know.
Comment by abakkk (abakkk) - Monday, 10 June 2019, 11:55 GMT
More precisely, it seems it's a problem between gnome-shell and gvfs.
gvfs has not been upgraded (1.40.1-2).
Comment by Ivan V (pcm720) - Monday, 10 June 2019, 16:10 GMT
There's also an issue with gnome-shell-trash-extension which seems to be related to this bug.
The extension uses "trash:///" URI to get a list of trashed files and monitor the Trash.
Gio.file_new_for_uri("trash:///") returns GDummyFile object instead of GDaemonFile, and Gio.file_new_for_uri("trash:///").enumerate_children(<>) returns "Gio.IOErrorEnum: Operation is not supported" instead of GDaemonFileEnumerator.
Looks like something is broken in gnome-shell 1:3.32.2+1+g24cb1c1aa-1 because extension works fine after downgrading gnome-shell to 3.32.2-2.

I was unable to find any commits that could break Gio.file_new_for_uri() in the upstream.
Comment by abakkk (abakkk) - Monday, 10 June 2019, 18:57 GMT
I downgraded the package to 1:3.32.2-2 and the bug disappeared. So it is related to gnome-shell 1:3.32.2+1+g24cb1c1aa-1
Comment by Sergio Costas (rastersoft) - Sunday, 07 July 2019, 08:04 GMT
I can confirm that this bug is happening not only in Arch, but also in PopOS! (which has an odd mix of Gnome Shell 3.30 and 3.32) but not in Fedora 30, which has Gnome Shell 3.32. So it looks more like some build problem, more than a bug in Gnome Shell itself.

Another problem that seems related is that trying to set "metadata::*" extended attributes in a file also fails.

Both bugs affect to the extension Desktop-Icons.

I wrote a simple gnome shell extension that tests this. You can download it from http://www.rastersoft.com/test_bug_trash.zip . Just unzip it into ~/.local/share/gnome-shell/extensions , launch gnome-tweaks, enable the extension, reload gnome-shell (Alt+F2, and then 'r' if you are using X11, or logout and login again in case of use Wayland), and an icon with two gears will be shown in the upper left corner. Press it and a popup will be shown with the results of the test (it will create a file called a_test.txt in your home folder to test the attributes bug).
Comment by abakkk (abakkk) - Friday, 26 July 2019, 07:40 GMT
It is not fixed in 1:3.32.2+6+g8b9874089-1
Comment by Jan Alexander Steffens (heftig) - Friday, 26 July 2019, 08:30 GMT
Does it work if you remove the caps from the executable?

# setcap -r /usr/bin/gnome-shell
Comment by Ivan V (pcm720) - Friday, 26 July 2019, 08:43 GMT
Yes, looks like removing the capabilities from gnome-shell works. query_exists(null) now returns 'true' in Looking Glass, just like it's supposed to.
Comment by Sergio Costas (rastersoft) - Friday, 26 July 2019, 10:49 GMT
Tested in Pop!OS and works too.
Comment by Chris Billington (chrisjbillington) - Thursday, 03 October 2019, 18:07 GMT
This issue prevents the gnome shell desktop icons extension from displaying the trash in 3.34:

https://gitlab.gnome.org/World/ShellExtensions/desktop-icons/issues/152

gvfs has been upgraded since this bug report was filed. Is there an upstream bug report for the issue? Since it seems like it might not be a simple incompatibility between versions now that everything is up to date.

The setcap workaround still does resolve it for me.
Comment by abakkk (abakkk) - Friday, 20 November 2020, 18:21 GMT Comment by mattia (nTia89) - Sunday, 26 September 2021, 13:57 GMT
I cannot reproduce the issue.
Is it still valid?

Loading...