johnfactotum / foliate

Read e-books in style
https://johnfactotum.github.io/foliate/
GNU General Public License v3.0
6.18k stars 287 forks source link

Gschema stuff not working #1031

Closed sinetek closed 1 year ago

sinetek commented 1 year ago

I'm running pop OS. I tried both installing the deb file for version 2.6.1 and also building 2.6.1 from source, but I get this error about something Gschema. I don't know what a gschema is so I'm creating this ticket.

(com.github.johnfactotum.Foliate:57795): Gjs-CRITICAL **: 01:19:30.624: JS ERROR: Error: GSettings key store-uris not found in schema com.github.johnfactotum.Foliate
_checkKey@resource:///org/gnome/gjs/modules/core/overrides/Gio.js:580:23
createCheckedMethod/<@resource:///org/gnome/gjs/modules/core/overrides/Gio.js:532:30
@resource:///com/github/johnfactotum/Foliate/js/uriStore.js:21:28
@resource:///com/github/johnfactotum/Foliate/js/epubView.js:19:31
@resource:///com/github/johnfactotum/Foliate/js/window.js:23:42
@resource:///com/github/johnfactotum/Foliate/js/main.js:43:20
@/usr/bin/com.github.johnfactotum.Foliate:9:1

(com.github.johnfactotum.Foliate:57795): Gjs-CRITICAL **: 01:19:30.624: Script /usr/bin/com.github.johnfactotum.Foliate threw an exception

Additionally, an AppImage could prove to be useful, if someone wants to build one I would be very thankful.

Thanks.

johnfactotum commented 1 year ago

Firstly, you should install 2.6.4, which is the latest stable release. Secondly, GSettings is how Foliate stores settings, and the error suggests that you didn't install Foliate or aren't launching it correctly. The schema is found, but is inconsistent, i.e. probably caused by running a newer version of Foliate with old schema, or something of the sort.

sinetek commented 1 year ago

Thanks for looking at this john!

2.6.4 requires webkit 6, which doesn't exist on popOS, not yet anyway. how do I nuke the schema/settings thing?

johnfactotum commented 1 year ago

2.6.4 requires webkit 2.6

It doesn't. v2.6.4 has the same WebKit version requirement as v2.6.1.

how do I nuke the schema/settings thing?

Well, I guess try uninstalling it first. If the file com.github.johnfactotum.Foliate.gschema.xml (probably in /usr/share/glib-2.0/schemas/; the location depends on the prefix you set when instaling) still exists after that, remove it. Then try reinstalling it again.

sinetek commented 1 year ago

Hmm, I installed 2.6.4, and get this error now.

(com.github.johnfactotum.Foliate:21589): Gjs-CRITICAL **: 19:28:30.836: JS ERROR: Error: GSettings key store-uris not found in schema com.github.johnfactotum.Foliate
_checkKey@resource:///org/gnome/gjs/modules/core/overrides/Gio.js:580:23
createCheckedMethod/<@resource:///org/gnome/gjs/modules/core/overrides/Gio.js:532:30
@resource:///com/github/johnfactotum/Foliate/js/uriStore.js:21:28
@resource:///com/github/johnfactotum/Foliate/js/epubView.js:19:31
@resource:///com/github/johnfactotum/Foliate/js/window.js:23:42
@resource:///com/github/johnfactotum/Foliate/js/main.js:44:20
@/usr/bin/com.github.johnfactotum.Foliate:9:1

(com.github.johnfactotum.Foliate:21589): Gjs-CRITICAL **: 19:28:30.836: Script /usr/bin/com.github.johnfactotum.Foliate threw an exception

I removed all the Foliate.gschema.xml files I could find, namely:

/usr/share/metainfo/com.github.johnfactotum.Foliate.metainfo.xml
/usr/share/glib-2.0/schemas/com.github.johnfactotum.Foliate.gschema.xml
johnfactotum commented 1 year ago

Try running glib-compile-schemas /usr/share/glib-2.0/schemas. Usually this would have been run automatically after installing but maybe it wasn't for some reason.

sinetek commented 1 year ago

No change. Ah well, I don't know. Thanks for the help.

johnfactotum commented 1 year ago

Try "Build and run from source without installing".

sinetek commented 1 year ago

Try "Build and run from source without installing".

It kind of sort of works. The application starts, but there is no icon that shows up in the task bar, and also it's not installed normally with a desktop file so you have to manually enter the command every time.

For a workaround I installed the application via 'flatpak' and that seems to work well enough.

johnfactotum commented 1 year ago

OK. I will close this as works for me as it seems to be a problem local to your system. Still it would be nice if one could find out why it's happening. Since it works when you set GSETTINGS_SCHEMA_DIR, it would confirm that the problem is indeed a gschemas.compiled file somewhere that needs to be updated.

chaoyi commented 1 year ago

Running into the same issue. glib-compile-schemas /usr/share/glib-2.0/schemas didn't work because of outdated cache in /usr/local/share/glib-2.0/schemas from source installation. sudo rm /usr/local/share/glib-2.0/schemas/gschemas.compiled fixed it.