Don't assume that settings schema are installed by default

Bug #1098615 reported by Angel Guzman Maeso on 2013-01-11
268
This bug affects 61 people
Affects Status Importance Assigned to Milestone
Unity Tweak Tool
Critical
J Phani Mahesh
unity-tweak-tool (Ubuntu)
Undecided
Unassigned

Bug Description

Starting the app I get a SegFault:

$ unity-tweak-tool

(unity-tweak-tool:15722): GLib-GIO-ERROR **: Settings schema 'com.canonical.Unity.ApplicationsLens' is not installed

Looking at code, I see in Github:

https://github.com/freyja-dev/unity-tweak-tool/blob/devel/unitytweak/gsettings.py#L99
https://github.com/freyja-dev/unity-tweak-tool/blob/devel/unitytweak/gsettings.py#L41

I think that it should be improved checking the result and treating the option when the setting shema are not present. Same for other settings on that file.

ProblemType: Bug
DistroRelease: Ubuntu 12.10
Package: unity-tweak-tool 0.0.1-0~68~quantal1 [origin: LP-PPA-freyja-dev-unity-tweak-tool-daily]
ProcVersionSignature: Ubuntu 3.5.0-21.32-generic 3.5.7.1
Uname: Linux 3.5.0-21-generic i686
ApportVersion: 2.6.1-0ubuntu9
Architecture: i386
CrashDB: {"impl": "launchpad", "project": "unity-tweak-tool"}
Date: Fri Jan 11 16:47:20 2013
InstallationDate: Installed on 2012-02-09 (336 days ago)
InstallationMedia:

MarkForUpload: True
PackageArchitecture: all
ProcEnviron:
 TERM=xterm
 PATH=(custom, no user)
 LANG=es_ES.UTF-8
 SHELL=/bin/bash
SourcePackage: unity-tweak-tool
UpgradeStatus: Upgraded to quantal on 2012-06-05 (220 days ago)

Angel Guzman Maeso (shakaran) wrote :
J Phani Mahesh (phanimahesh) wrote :

Thanks for the bug report. The dynamic checking will be implemented as soon as possible.

I'm marking this bug as of critical importance since it is causing segfaults when schemas are missing.
Triaged since the behaviour is reproducibe by attempting to initialise using a non existing schema.

Changed in unity-tweak-tool:
status: New → Triaged
importance: Undecided → Critical
Changed in unity-tweak-tool:
assignee: nobody → J Phani Mahesh (phanimahesh)
Changed in unity-tweak-tool:
status: Triaged → In Progress
Milos Cubrilo (cubrilo-milos) wrote :

(unity-tweak-tool:17416): GLib-GIO-ERROR **: Settings schema 'com.canonical.indicator.bluetooth' is not installed
This is what Terminal says, and

You have some obsolete package versions installed. Please upgrade the following packages and check if the problem still occurs:

libqt4-dbus, libqt4-declarative, libqt4-network, libqt4-script, libqt4-sql, libqt4-sql-sqlite, libqt4-xml, libqt4-xmlpatterns, libqtcore4, libqtgui4, qdbus
This is what Ubuntu says.
Unity 13.04 says that it is fully updated.

A recent change in raring is causing the crash in your case. A fix is
under way.

(unity-tweak-tool:17466): GLib-GIO-ERROR **: Settings schema 'com.canonical.indicator.bluetooth' is not installed

pigi@ThinkPad-Edge-E430:~$ uname -a
Linux ThinkPad-Edge-E430 3.8.0-5-generic #10-Ubuntu SMP Thu Feb 7 18:00:50 UTC 2013 i686 i686 i686 GNU/Linux
pigi@ThinkPad-Edge-E430:~$ cat /etc/issue
Ubuntu Raring Ringtail (development branch) \n \l

Wojtek

Paco Patag (pfjap.paco) wrote :

Getting the same as Milos and Wojtek on Raring

Sam Hewitt (snwh) wrote :

Primarily the "Settings schema 'com.canonical.indicator.bluetooth' is not installed" is a bug in the bluetooth indicator which has been fixed (as of Feb 11), but we are doing backend work that will solve instances in which schemas do not exist to avoid any further errors.

Ok, it's working now. Thank you!

Wojtek

Milos Cubrilo (cubrilo-milos) wrote :

Updated today, works well. Thanks!

Sam Hewitt (snwh) on 2013-02-20
summary: - Don't assume that settings shema are installed by default
+ Don't assume that settings schema are installed by default
J Phani Mahesh (phanimahesh) wrote :

Update:

Majority of the code is covered to prevent crashes in case of missing schema, but we still have a small bit of old code that is lying around. (in the aptly named UnityTweakTol.section.sphagetti module :P)

It will be ported as soon as possible. This bug is essentially fixed, but just for the sake of completeness, will remain as inprogress till the last bit of code is converted.

Piotr Darzyn (darzynp) on 2013-07-24
Changed in unity-tweak-tool:
status: In Progress → New
status: New → Incomplete
status: Incomplete → Opinion
status: Opinion → Invalid
status: Invalid → Confirmed
status: Confirmed → In Progress
status: In Progress → Fix Committed
status: Fix Committed → Fix Released
Angel Guzman Maeso (shakaran) wrote :

@darzynp Could you please link that exact commit fix the problem? I am checking the revision log but I cannot find a commit message referencing this fix in the latest commits

Barneedhar (barneedhar) on 2013-07-26
Changed in unity-tweak-tool:
status: Fix Released → In Progress

I hope that you also take into account that not everyone uses PulseAudio on Ubuntu. I'm using Open Sound System and therefore I removed PulseAudio and with it also indicator-sound.

$ unity-tweak-tool
schema com.canonical.indicator.sound not installed
Traceback (most recent call last):
  File "/usr/bin/unity-tweak-tool", line 72, in <module>
    UnityTweakTool.Application()
  File "/usr/lib/python3/dist-packages/UnityTweakTool/__init__.py", line 88, in __init__
    self.run(pageid)
  File "/usr/lib/python3/dist-packages/UnityTweakTool/__init__.py", line 97, in run
    self.connectpages()
  File "/usr/lib/python3/dist-packages/UnityTweakTool/__init__.py", line 110, in connectpages
    from UnityTweakTool.section.unity import Unity
  File "/usr/lib/python3/dist-packages/UnityTweakTool/section/unity.py", line 742, in <module>
    Unity.add_page(unitysettings)
  File "/usr/lib/python3/dist-packages/UnityTweakTool/section/skeletonpage.py", line 48, in add_page
    page.refresh()
  File "/usr/lib/python3/dist-packages/UnityTweakTool/elements/option.py", line 62, in refresh
    self.ho.refresh()
  File "/usr/lib/python3/dist-packages/UnityTweakTool/section/sphagetti/unity.py", line 93, in refresh
    interested_players = gsettings.sound.get_strv('interested-media-players')
AttributeError: 'NoneType' object has no attribute 'get_strv'

J Phani Mahesh (phanimahesh) wrote :

Commit 02c4796 introduces a error dialog showing missing schema and exits UTT without crashing.

Hence this bug is essentially fixed, though the ideal solution would require UTT to disable just those components that depend on the missing schema and start up. this ideal behaviour has been implemented for some part of the code. For others, we fallback on the error message and exit.

Changed in unity-tweak-tool:
status: In Progress → Fix Committed

Can confirmthe problem with unity-tweak-tool in 13.04. Also updating the unity-tweak-tool to a daily build from the ppa does not solve the problem.

J Phani Mahesh (phanimahesh) wrote :

Hello Mateusz Stachowski,

Yes, we are aware of the issue. Though I admit it was not one of our priorities, a fix to allow using UTT without pulseaudio is underway. We have decided to remove the error dialog and complete the graceful-fallback model. By next week, UTT should be usable even with every schema missing. Missing schemas will cause corresponding controls to be disabled.

Hello lhcamilo,

Can you describe what your problem is?

_dan_ (dan-void) wrote :

unity-tweak-tool does not start for me, giving this error message:

Error: schema com.canonical.indicator.bluetooth not installed

i dont have bluetooth on my machine, therefor no bluetooth*

Margarita Manterola (marga-9) wrote :

If you don't have the hud package installed, you get:
  Error: schema com.canonical.indicator.appmenu.hud not installed

If you don't have unity-webapps-service, you get:
  Error: schema com.canonical.unity.webapps not installed

In both of this cases, you can't open unity-tweak-tool at all. These package should either be a dependency of unity-tweak-tool, or the tool made to work and only give warnings if they are not present. The current (in Trusty) functionality is not acceptable.

Sturm Flut (sturmflut) wrote :

Package version: 0.0.6ubuntu2 (amd64, vivid)

I ran into the "com.canonical.unity.webapps not installed" error message today after upgrading from Utopic to Vivid, and Unity Tweak Tool would not start. Installing the "unity-webapps-service" package fixed the problem, so either the fallback doesn't work or the package needs a dependency on unity-webapps-service?

djcj (djcj) wrote :

The tool apparently depends on the package unity-webapps-common, otherwise I get the same error message as the user above me.

djcj (djcj) wrote :

After the latest update I get the following error at startup:

org.gnome.desktop.peripherals.touchpad

In order to work properly, Unity Tweak Tool recommends you install the necessary packages

Makes UTT unusable. I guess I'll have to remove UTT and stick with Ubuntu-Tweak + dconf-editor.

The same bug in 15.10 in three laptopsorg.gnome.desktop.peripherals.touchpad please solve bug

Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in unity-tweak-tool (Ubuntu):
status: New → Confirmed
hackel (hackel) wrote :

I got hit with it too, in 0.0.7: Error: schema com.canonical.indicator.appmenu.hud not installed

Obviously I don't have the hud installed, because I don't like it, but that shouldn't stop me from configuring other things!

hackel (hackel) on 2016-05-19
Changed in unity-tweak-tool:
status: Fix Committed → Confirmed

This bug is still present in version 0.0.7ubuntu2 on Ubuntu 16.04.

Michael (michael1964) wrote :

Bug is still present for

schema com.canonical.indicator.bluetooth not installed

Mantas Kriaučiūnas (mantas) wrote :

Please fix tweak-tool to work correctly without com.canonical.unity.webapps schema, because this tweak is needed not for all people and 150 MB of unity-webapps related packages (like liboxideqtcore0) must be installed, see comments on this pull for more info:

https://github.com/freyja-dev/unity-tweak-tool/pull/132

$ sudo apt-get --no-install-recommends install unity-tweak-tool
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
  libaccounts-qt5-1 libandroid-properties1 libdouble-conversion1v5 libhud2 liboxideqt-qmlplugin liboxideqtcore0 liboxideqtquick0 libqt5feedback5 libqt5multimedia5 libqt5organizer5 libqt5positioning5 libqt5qml5 libqt5quick5
  libqt5quicktest5 libqt5test5 libqt5xml5 libsignon-qt5-1 libubuntugestures5 libubuntutoolkit5 libunity-action-qt1 libunity-webapps0 qml-module-qt-labs-folderlistmodel qml-module-qt-labs-settings qml-module-qtfeedback
  qml-module-qtgraphicaleffects qml-module-qtquick-layouts qml-module-qtquick-window2 qml-module-qtquick2 qml-module-qttest qml-module-ubuntu-components qml-module-ubuntu-layouts qml-module-ubuntu-onlineaccounts
  qml-module-ubuntu-performancemetrics qml-module-ubuntu-test qml-module-ubuntu-web qtdeclarative5-accounts-plugin qtdeclarative5-qtquick2-plugin qtdeclarative5-ubuntu-ui-toolkit-plugin qtdeclarative5-unity-action-plugin
  suru-icon-theme ubuntu-mobile-icons ubuntu-ui-toolkit-theme unity-webapps-common unity-webapps-qml unity-webapps-service webapp-container webbrowser-app
Suggested packages:
  xul-ext-unity | unity-chromium-extension qtdeclarative5-online-accounts-client0.1 qtdeclarative5-ubuntu-content1 qtdeclarative5-ubuntu-download-manager0.1 qml-module-ubuntu-onlineaccounts-client
The following NEW packages will be installed:
  libaccounts-qt5-1 libandroid-properties1 libdouble-conversion1v5 libhud2 liboxideqt-qmlplugin liboxideqtcore0 liboxideqtquick0 libqt5feedback5 libqt5multimedia5 libqt5organizer5 libqt5positioning5 libqt5qml5 libqt5quick5
  libqt5quicktest5 libqt5test5 libqt5xml5 libsignon-qt5-1 libubuntugestures5 libubuntutoolkit5 libunity-action-qt1 libunity-webapps0 qml-module-qt-labs-folderlistmodel qml-module-qt-labs-settings qml-module-qtfeedback
  qml-module-qtgraphicaleffects qml-module-qtquick-layouts qml-module-qtquick-window2 qml-module-qtquick2 qml-module-qttest qml-module-ubuntu-components qml-module-ubuntu-layouts qml-module-ubuntu-onlineaccounts
  qml-module-ubuntu-performancemetrics qml-module-ubuntu-test qml-module-ubuntu-web qtdeclarative5-accounts-plugin qtdeclarative5-qtquick2-plugin qtdeclarative5-ubuntu-ui-toolkit-plugin qtdeclarative5-unity-action-plugin
  suru-icon-theme ubuntu-mobile-icons ubuntu-ui-toolkit-theme unity-tweak-tool unity-webapps-common unity-webapps-qml unity-webapps-service webapp-container webbrowser-app
0 upgraded, 48 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/43.4 MB of archives.
After this operation, 154 MB of additional disk space will be used.
Do you want to continue? [Y/n] n

djcj (djcj) wrote :

Upgraded to Ubuntu 16.04 and UTT is still unusable.

Ant Dickens (antonydickens) wrote :

Unity session in Ubuntu 18.04 development branch.

Installed Unity Tweak Tool.Tweak Tool did not launch. Error: Missing Schema notify-osd.

Installed notify-osd then Tweak Tool worked OK.

Fredrik Jacobsson (smask) wrote :

Running UTT on Ubuntu 19.04 development branch.
Missing schemas:

com.canonical.notify.osd - installed notify-osd
com.canonical.desktop.interface - installed overlay-scrollbar
org.gnome.nautilus.desktop - this is where I'm stuck for now.

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

Other bug subscribers