I am trying to help the foliate upstream maintain and upkeep the foliate snap as they were going to ditch it due to build errors etc.
As my first step i upgraded the existing foliate snap yaml to core 22 from core18, plus since foliate github repos current main branch is for the upcoming dev version, i changed the source to a tar file of the latest stable release here is the error i get afte building it with above mods, i have kept the snap use gjs from gnome-sdk through layouts but the snap builds but wont run, producing the following error ;
(gjs:9140): Gjs-ERROR 11:14:34.073: JS ERROR: Error: Requiring GjsPrivate, version none: Typelib file for namespace ‘GjsPrivate’ (any version) not foundrequire@resource:///org/gnome/gjs/modules/esm/gi.js:14:24@gi://GjsPrivate:3:25
You need to set GI_TYPELIB_PATH to include the location of the GjsPrivate typelib. Also note you are renaming the snap in your yaml from what’s published and it doesn’t match the path in your prefix. To fix the typelib issue:
This isnt the case in mine, am using Lubuntu 22.04, and using the yaml as approved by you, gives the following error when triggering from terminal, is this problem distro specific ?? (I am building the snap as foliate-gtk for test purposes)
(com.github.johnfactotum.Foliate:8826): Gjs-CRITICAL : 09:00:29.796: JS ERROR: ImportError: No JS module ‘main’ found in search path@/snap/foliate-gtk/7/usr/bin/com.github.johnfactotum.Foliate:9:1
(com.github.johnfactotum.Foliate:8826): Gjs-CRITICAL : 09:00:29.797: Script /snap/foliate-gtk/7/usr/bin/com.github.johnfactotum.Foliate threw an exception
Exactly, you have a mix of foliate and foliate-gtk. Your prefix and organize lines weren’t changed to match. I don’t see the reason for testing it as a different snap name from what you have proposed to the snap maintainer. If they accept the change, you’ll need to ensure it’s named foliate and you’ll need thorough testing of what you are submitting.