flathub / org.gnome.Documents

https://flathub.org/apps/details/org.gnome.Documents
1 stars 4 forks source link

Can't launch Documents #1

Closed junocomp closed 5 years ago

junocomp commented 6 years ago

There seems to be a dependencies issues

$ flatpak run org.gnome.Documents 
Gtk-Message: Failed to load module "pantheon-filechooser-module"

(org.gnome.Documents:2): Gjs-WARNING **: JS ERROR: Unable to connect to the tracker database: Tracker.Error: Failed to load SPARQL backend: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.Tracker1 was not provided by any .service files
Application<.vfunc_startup@resource:///org/gnome/Documents/js/application.js:374:26
wrapper@resource:///org/gnome/gjs/modules/_legacy.js:82:22
main@resource:///org/gnome/Documents/js/main.js:47:12
run@resource:///org/gnome/gjs/modules/package.js:221:12
@/app/bin/gnome-documents:6:1

(org.gnome.Documents:2): Gjs-WARNING **: JS ERROR: TypeError: Application.modeController is null
IndexingNotification<._init@resource:///org/gnome/Documents/js/notifications.js:189:9
wrapper@resource:///org/gnome/gjs/modules/_legacy.js:82:22
_Base.prototype._construct@resource:///org/gnome/gjs/modules/_legacy.js:18:5
Class.prototype._construct/newClass@resource:///org/gnome/gjs/modules/_legacy.js:117:20
NotificationManager<._init@resource:///org/gnome/Documents/js/notifications.js:345:38
wrapper@resource:///org/gnome/gjs/modules/_legacy.js:82:22
Application<._createWindow@resource:///org/gnome/Documents/js/application.js:430:31
wrapper@resource:///org/gnome/gjs/modules/_legacy.js:82:22
Application<.vfunc_activate@resource:///org/gnome/Documents/js/application.js:485:13
wrapper@resource:///org/gnome/gjs/modules/_legacy.js:82:22
main@resource:///org/gnome/Documents/js/main.js:47:12
run@resource:///org/gnome/gjs/modules/package.js:221:12
@/app/bin/gnome-documents:6:1
nedrichards commented 6 years ago

Looks like this is trying to connect to a host tracker instance which doesn't exist on your system. I don't know too much about this myself, but I think I overhead some comments that org.gnome.Photos was a little more robust here. Would it be possible for you to test that app as well?

Otherwise we'll need an actual expert like @debarshiray to help.

junocomp commented 6 years ago

I just tried it, Gnome Photos works fine.

For some reason gnome Documents is trying to call out gjs as a dependency but it can not find it. In Ubuntu you could install

sudo apt install gjs

and that would do it, but it does not apply to flatpak packages.

nedrichards commented 6 years ago

GJS is very much in the GNOME runtime and is being used to run the code, that's why you're getting errors from GJS rather than about it. This isn't what that error message is saying. It's failing because it uses Tracker to get the items to show in the app and it can't connect to a Tracker instance.

junocomp commented 6 years ago

Is tracker part of the Gnome 3.26 platform?

alice-mkh commented 6 years ago

GNOME Games bundles it, so it probably isn't. https://github.com/GNOME/gnome-games/blob/master/flatpak/org.gnome.Games.json

Edit: But Documents bundles it as well, so this isn't the problem.

Edit2: Just in case, I have tracker on host system, and I have exactly same issue.

alice-mkh commented 6 years ago

It runs for me with --filesystem=home:ro Seems it cannot access tracker database file.

ghost commented 6 years ago

I've this problem too and @Exalm's workaround doesn't work for me.

alice-mkh commented 6 years ago

Just in case, that was build-finish argument to add to manifest, not an option to run the app with.

ghost commented 6 years ago

@Exalm ok, I tried it as a flatpak --user override argument.

alice-mkh commented 6 years ago

Just installed unmodified package from flathub (as user). After doing: flatpak override --user org.gnome.Documents --filesystem=home:ro It works fine for me. I'm not sure what you're doing differently, but in any case this is just a workaround. The proper solution would be to only give access to tracker database file, not to the whole home.

debarshiray commented 6 years ago

I think @nedrichards is right that this error is about the application not being to connect to the OS-side Tracker D-Bus services:

$ flatpak run org.gnome.Documents 
Gtk-Message: Failed to load module "pantheon-filechooser-module"

(org.gnome.Documents:2): Gjs-WARNING **: JS ERROR: Unable to connect to the tracker database: Tracker.Error: Failed to load SPARQL backend: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.Tracker1 was not provided by any .service files
Application<.vfunc_startup@resource:///org/gnome/Documents/js/application.js:374:26
wrapper@resource:///org/gnome/gjs/modules/_legacy.js:82:22
main@resource:///org/gnome/Documents/js/main.js:47:12
run@resource:///org/gnome/gjs/modules/package.js:221:12
@/app/bin/gnome-documents:6:1

The Documents and Books nightlies were broken after some parts of tracker.git were moved to tracker-miners.git, but the stable Flathub builds didn't have that problem. I am able to run both applications from Flathub.

I just tried it, Gnome Photos works fine.

@giovannicaligaris: Were you actually able to see your photos? Or did it launch the main window with an error about missing Tracker services in it?

I thought that Documents also launched the main window and put the error inside it, but I might be mistaken.

@Exalm: Were you talking about this:

(org.gnome.Documents:2): Tracker-WARNING **: Falling back to bus backend, the direct backend failed to initialize: Could not open sqlite3 database:'/home/rishi/.var/app/org.gnome.Documents/cache/tracker/meta.db': unable to open database file
alice-mkh commented 6 years ago

@debarshiray I was talking about this: 2018-03-13 20-57-33

log.txt

With the override it runs totally fine, though it still outputs

(org.gnome.Documents:2): Tracker-WARNING **: Falling back to bus backend, the direct backend failed to initialize: Could not open sqlite3 database:'/home/exalm/.var/app/org.gnome.Documents/cache/tracker/meta.db': unable to open database file

Edit: Hmm, the log is different from the one in the issue. IIRC it was same in a previous version

debarshiray commented 6 years ago

The "JS ERROR" in that screenshot looks like https://bugzilla.gnome.org/show_bug.cgi?id=793489#c2

However, I don't see that error here with this build:

[rishi@kolache ~]$ flatpak info --user org.gnome.Documents//stable
Ref: app/org.gnome.Documents/x86_64/stable
ID: org.gnome.Documents
Arch: x86_64
Branch: stable
Origin: flathub
Date: 2017-11-09 14:22:47 +0000
Subject: Build org.gnome.Documents at 217771330bc9cf60b9bcb3e0a4cef4a2ada7cc3f
Commit: a47fa9ac10cce5a418457a58fa672855188d1e013c471d79ebbfab5cc8c36a8e
Parent: -
Location: /home/rishi/.local/share/flatpak/app/org.gnome.Documents/x86_64/stable/a47fa9ac10cce5a418457a58fa672855188d1e013c471d79ebbfab5cc8c36a8e
Installed size: 31.2 MB
Runtime: org.gnome.Platform/x86_64/3.26
alice-mkh commented 6 years ago

I have exactly same version.

 ~  flatpak info --user org.gnome.Documents
Ref: app/org.gnome.Documents/x86_64/stable
ID: org.gnome.Documents
Arch: x86_64
Branch: stable
Origin: flathub
Date: 2017-11-09 14:22:47 +0000
Subject: Build org.gnome.Documents at 217771330bc9cf60b9bcb3e0a4cef4a2ada7cc3f
Commit: a47fa9ac10cce5a418457a58fa672855188d1e013c471d79ebbfab5cc8c36a8e
Parent: -
Location: /home/exalm/.local/share/flatpak/app/org.gnome.Documents/x86_64/stable/a47fa9ac10cce5a418457a58fa672855188d1e013c471d79ebbfab5cc8c36a8e
Installed size: 31,2 МБ
Runtime: org.gnome.Platform/x86_64/3.26
 ~  flatpak info org.gnome.Platform//3.26
Ref: runtime/org.gnome.Platform/x86_64/3.26
ID: org.gnome.Platform
Arch: x86_64
Branch: 3.26
Origin: flathub
Date: 2018-02-19 00:35:39 +0000
Subject: build of org.gnome.Sdk, Sun Feb 18 22:39:27 UTC 2018
Commit: 75870d0acf191285cf9edf5bfd3346411bfc55bd019f8c952514c340be3eb66d
Parent: be9fe7b437119762f4368d16fa552bcba8b694e5110f75efb1e2cb994a99cb67
Location: /var/lib/flatpak/runtime/org.gnome.Platform/x86_64/3.26/75870d0acf191285cf9edf5bfd3346411bfc55bd019f8c952514c340be3eb66d
Installed size: 782,5 МБ

Fedora 27, tracker 2.0.3-1.fc27

nedrichards commented 6 years ago

I see that error on the same commit id. And yes, it does look rather like that bug doesn't it.

debarshiray commented 6 years ago

Ok, so that's strange, but it does sound like a second separate problem than the one @giovannicaligaris reported. I can clearly see where the Unable to connect to the tracker database comes from in the sources. I guess we could handle the error more gracefully and present it inside the GUI, instead of dumping it in the console.

hadess commented 6 years ago

For what it's worth, things are also likely to break if you have Books or Documents installed by your distribution, and try to run the Flatpak (or vice-versa, I don't remember).

So we'd need to know all the versions of Documents that are installed, not just the Flatpak ones. Or try to remove the system installed one before trying the Flatpak one.

alice-mkh commented 6 years ago

I don't have system ones installed. I did run them before installing flatpak version though

nedrichards commented 6 years ago

I'm running Endless OS which doesn't have Books or Documents built in. I can't remember if I've run something in the past but happy to wipe everything and see if I can reproduce if that helps.

alice-mkh commented 6 years ago

Hmm, so I cannot reproduce this on (almost) clean FAW 27. I wonder what this could be then.

debarshiray commented 6 years ago

I definitely had Documents and Books installed via both distribution packages and Flatpak (both master and stable builds). So I guess the Flatpaks break if they are the only things available on the system.

alice-mkh commented 6 years ago

FAW doesn't have neither installed by default, yet both Flatpaks work.

nedrichards commented 6 years ago

Something I've just realised is that the version of tracker in my base os (that these apps will be connecting to) is Tracker 1.12.1. This may be the issue.

BrainBlasted commented 5 years ago

I've put out a new release 3.30.1. Please try it and see if you can reproduce now.

BrainBlasted commented 5 years ago

@Exalm has confirmed that this is no longer an issue as of 3.30.1. Closing.