Bug 2067969

Summary: GNOME Sushi crash on launch
Product: [Fedora] Fedora Reporter: vtq <vtq-gnome>
Component: sushiAssignee: Felipe Borges <feborges>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 36CC: awilliam, feborges, geraldo.simiao.kutz, gnome-sig, klember, kparal
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: AcceptedFreezeException RejectedBlocker
Fixed In Version: sushi-41.2-1.fc36 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-05-04 17:33:36 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1953786    

Description vtq 2022-03-24 07:17:58 UTC
Description of problem:
GNOME Sushi crash on launch

Version-Release number of selected component (if applicable):
sushi-41.0-2.fc36.x86_64
nautilus-42.0-1.fc36.x86_64
gjs-1.71.90-1.fc36.x86_64
glib2-2.72.0-2.fc36.x86_64

How reproducible:
Always

Steps to Reproduce:
1. Try to use GNOME Sushi to preview a file by selecting a file in Nautilus (for example a text file) and press space bar on the keyboard 
2. Or use command line 'sushi FILE'

Actual results:
1. Nothing happens after pressing space bar in Nautilus. 
2. For the command line launch, an error message:

(sushi:4203): Gjs-CRITICAL **: 15:08:41.022: JS ERROR: Gio.DBusError: GDBus.Error:org.freedesktop.DBus.Error.NameHasNoOwner: Could not activate remote peer.
_proxyInvoker@resource:///org/gnome/gjs/modules/core/overrides/Gio.js:122:46
_makeProxyMethod/<@resource:///org/gnome/gjs/modules/core/overrides/Gio.js:147:30
@/usr/bin/sushi:54:7


(sushi:4203): Gjs-CRITICAL **: 15:08:41.022: Script /usr/bin/sushi threw an exception


Expected results:
In both cases, a preview window of the selected file pops up.


Additional info:
This is working in F35 so it's a regression in F36. The 'sushi' command line works in GNOME OS nightly, suggesting this might be a Fedora issue. Preview in Nautilus also doesn't work in GNOME OS but that probably is because it has the unstable GTK4 port of Nautilus.

Comment 1 vtq 2022-03-25 05:27:33 UTC
This is because gtksourceview-4 is not installed.

$ /usr/libexec/org.gnome.NautilusPreviewer 
Unsatisfied dependency: GtkSource

On F36:
$ rpm -qa | grep gtksourceview
gtksourceview5-5.3.2-3.fc36.x86_64

On F35:
$ rpm -qa | grep gtksourceview
gtksourceview4-4.8.2-1.fc35.x86_64

After installing gtksourceview4-4.8.3-1.fc36.x86_64, gnome-sushi works. 

sushi is installed by default on Workstation, but somehow gtksourceview4 isn't. It seems that gtksourceview4 is specified as a build dependency in https://src.fedoraproject.org/rpms/sushi/blob/rawhide/f/sushi.spec#_19. Maybe it should be changed to a runtime dependency instead?

Comment 2 vtq 2022-04-10 03:58:53 UTC
Trying to propose as a F36 Common Bug because GNOME Sushi is installed by default in Fedora Workstation and provides the file preview functionality of the file manager. Currently it does not work out of the box in F36 live image or new install. The workaround is to install the gtksourceview4 package.

Comment 3 vtq 2022-04-10 04:11:40 UTC
> Preview in Nautilus also doesn't work in GNOME OS but that probably is because it has the unstable GTK4 port of Nautilus.

This part was not accurate and turns out it's not working only for some file types, and not related to Nautilus. It happens in both GNOME OS nightly and Fedora 36 (after fixing the gtksourceview4 part), so reported upstream at https://gitlab.gnome.org/GNOME/sushi/-/issues/80

Comment 4 Kamil Páral 2022-05-03 15:02:16 UTC
I tested now with
sushi-41.0-2.fc36.x86_64
gjs-1.72.0-2.fc36.x86_64
glib2-2.72.1-1.fc36.x86_64

and sushi seems to work fine for pictures, videos, images, txt files. It fails with a mimetype error on python files. I don't think that's enough to document it as a common bug, though, removing the nomination.

Comment 5 vtq 2022-05-03 16:52:56 UTC
The python file bug is a different one. This present one is about missing gtksourceview4 dependency, and sushi is not working for any file type. 

In your test did you have gtksourceview4 installed? Or is it somehow installed by default now (due to other packages depending on it) on latest live image or fresh install? I looked at sushi-41.0-2.fc36.x86_64 and it still does not include this dependency.

Comment 6 Kamil Páral 2022-05-04 05:10:56 UTC
Oh, you are correct. I tested on a system which had gtksourceview4 already installed. But default F36 Workstation only installs gtksourceview5, which doesn't work for sushi. If I try to preview e.g. a txt file or a png file in default F36 Workstation, nothing happens, and I see this in journal:

May 04 07:04:12 localhost-live systemd[1342]: Started dbus-:1.2-org.gnome.NautilusPreviewer.
May 04 07:04:12 localhost-live org.gnome.NautilusPreviewer[2673]: Unsatisfied dependency: GtkSource
May 04 07:04:12 localhost-live systemd[1342]: dbus-:1.2-org.gnome.NautilusPreviewer: Main process exited, code=exited, status=1/FAILURE
May 04 07:04:12 localhost-live systemd[1342]: dbus-:1.2-org.gnome.NautilusPreviewer: Failed with result 'exit-code'.

When I install gtksourceview4, it starts working.

Reproducer:
1. In a clean F36 Workstation install, create a txt file and a png file.
2. In Nautilus, select such a file and press space. A preview should open, but it doesn't.
3. Install gtksourceview4.
4. Repeat step 2, now it works.

I don't think file preview will qualify as a blocker for F36 release, but we could easily make it a freeze exception at least. Proposing for a discussion.

Kalev, can you please fix the runtime dependency for sushi? Thanks!

Comment 7 Fedora Update System 2022-05-04 14:55:40 UTC
FEDORA-2022-27ae0a298d has been submitted as an update to Fedora 36. https://bodhi.fedoraproject.org/updates/FEDORA-2022-27ae0a298d

Comment 8 Kamil Páral 2022-05-04 15:04:24 UTC
(In reply to Fedora Update System from comment #7)
> FEDORA-2022-27ae0a298d has been submitted as an update to Fedora 36.
> https://bodhi.fedoraproject.org/updates/FEDORA-2022-27ae0a298d

Fixes the problem.

Comment 9 Geraldo Simião 2022-05-04 16:06:17 UTC
Fixes indeed

Comment 10 Adam Williamson 2022-05-04 17:04:25 UTC
-4 blocker +6 FE in https://pagure.io/fedora-qa/blocker-review/issue/809 , marking rejected/accepted.

Comment 11 Fedora Update System 2022-05-04 17:33:36 UTC
FEDORA-2022-27ae0a298d has been pushed to the Fedora 36 stable repository.
If problem still persists, please make note of it in this bug report.