Viewer fails to start because of missing schema

Bug #982362 reported by Rafał Cieślak
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ubuntu Accomplishments Viewer
Incomplete
Undecided
Unassigned

Bug Description

I really can't get the viewer to run out-of-the-box. It says:

(accomplishments-viewer:15487): GLib-GIO-ERROR **: Settings schema 'net.launchpad.accomplishments-viewer' is not installed

and crashes immediately. The point is that it is looking for schema file in /usr/share/glib-2.0/schemas, which is not present there - when running from source/branch the file is only in ./data/glib-2.0/schemas. Also, it the application is installed to anywhere else then /usr it will fail to start too.

There is probably no (documented) way to force Gio to load a schema from given directory. Personally, I find whole this GSettings thing very confusing - because it seems we are forced to put this file to /usr/share regardless of installation prefix, and that it disallows us to run the viewer from source...

A temporary workaround is to run as root from branch directory:
cp data/glib-2.0/schemas/net.launchpad.accomplishments-viewer.gschema.xml /usr/share/glib-2.0/schemas/
sudo glib-compile-schemas /usr/share/glib-2.0/schemas/

Revision history for this message
Jono Bacon (jonobacon) wrote :

This is odd, I am not having this issue. I just pulled the source from LP, built it, installed it, run it from the dash (or running 'accomplishments-viewer') and it worked fine.

Can you pull lp:ubuntu-accomplishments-viewer, then run 'quickly package' in the dir and install the package and let me know if you are still having problems?

Changed in ubuntu-accomplishments-viewer:
status: New → Incomplete
Revision history for this message
Rafał Cieślak (rafalcieslak256) wrote : Re: [Bug 982362] Re: Viewer fails to start because of missing schema

Okay, I have re-checked that, and still not working.

Jono: The reason this is working for you is probably that you already
have the schema installed in your system! And because it does not get
packaged, it does not get removed when you uninstall the application.
Likely this file is left on your system from an older manual
installation. We would need that to be checked by someone who never
had the daemon installed.

To test the app's behavior when this file is not installed, try:
sudo rm /usr/share/glib-2.0/schemas/net.launchpad.accomplishments-viewer.gschema.xml
sudo glib-compile-schemas /usr/share/glib-2.0/schemas/

Revision history for this message
Jono Bacon (jonobacon) wrote :

On 16 April 2012 11:59, Rafal Cieślak <email address hidden> wrote:
> Okay, I have re-checked that, and still not working.
>
> Jono: The reason this is working for you is probably that you already
> have the schema installed in your system! And because it does not get
> packaged, it does not get removed when you uninstall the application.
> Likely this file is left on your system from an older manual
> installation. We would need that to be checked by someone who never
> had the daemon installed.
>
> To test the app's behavior when this file is not installed, try:
> sudo rm /usr/share/glib-2.0/schemas/net.launchpad.accomplishments-viewer.gschema.xml
> sudo glib-compile-schemas /usr/share/glib-2.0/schemas/

Ahhh interesting. I don't really understand where this schema comes
from - any idea?

--
Jono Bacon
Ubuntu Community Manager
www.ubuntu.com / www.jonobacon.org
www.identi.ca/jonobacon www.twitter.com/jonobacon

Revision history for this message
Rafał Cieślak (rafalcieslak256) wrote :

Yes, it can be found in the branch in data/glib-2.0/schemas. It is meant to provide access to global GNOME settings (gsettings, which seems to work similarly as gconf) and is used by the Preferences window to store the settings in a system register.

Revision history for this message
Jono Bacon (jonobacon) wrote :

On 17 April 2012 12:24, Rafal Cieślak <email address hidden> wrote:
> Yes, it can be found in the branch in data/glib-2.0/schemas. It is meant
> to provide access to global GNOME settings (gsettings, which seems to
> work similarly as gconf) and is used by the Preferences window to store
> the settings in a system register.

Sorry, I wasn't clear - I know it is in there, but do I just need to
commit it to the branch or does it get generated somehow?

   Jono

--
Jono Bacon
Ubuntu Community Manager
www.ubuntu.com / www.jonobacon.org
www.identi.ca/jonobacon www.twitter.com/jonobacon

Revision history for this message
Matt Fischer (mfisch) wrote :

Rafal,

Can you invalidate this? I assume it's fixed since everything is working great now.

Revision history for this message
Rafał Cieślak (rafalcieslak256) wrote :

I have re-tested this and this issue is still present. Note that this will never affect default installations, or PPA packages.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.