Gnucash is completely screwed up after recent upgrade from 4.4 to 4.8

Bug #1963766 reported by Jonathan Kamens
24
This bug affects 4 people
Affects Status Importance Assigned to Milestone
gnucash (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

After installing the recent upgrade from gnucash 4.4 to 4.8 and opening gnucash, it doesn't start with my previously opened gnucash file opened as it usually does, but that's the only start of the problems.

When I open the file explicitly, it only shows two account tabs even though there were previously a lot more tabs than that open, it doesn't show the main Accounts tab, and there appears to be no way to get it to open the main Accounts tab.

My previously configured preferences are all gone.

Changing preferences does not seem to have any effect, and when I change preferences and then close and reopen the preferences window my changes are gone.

Removing ~/.config/gnucash has no effect on any of this.

Removing ~/.cache/gnucash has no effect on any of this.

Removing ~/.gnucash has no effect on any of this.

Removing ~/.local/share/gnucash at least brings back the Accounts tab but all the other problems enumerated above remain.

Basically, things are completely screwed up and I can't find any way to fix it.

ProblemType: Bug
DistroRelease: Ubuntu 22.04
Package: gnucash 1:4.8-1build2
ProcVersionSignature: Ubuntu 5.15.0-18.18-generic 5.15.12
Uname: Linux 5.15.0-18-generic x86_64
ApportVersion: 2.20.11-0ubuntu78
Architecture: amd64
CasperMD5CheckResult: unknown
CurrentDesktop: ubuntu:GNOME
Date: Sat Mar 5 15:05:29 2022
InstallationDate: Installed on 2019-01-02 (1158 days ago)
InstallationMedia: Ubuntu 18.10 "Cosmic Cuttlefish" - Release amd64 (20181017.3)
SourcePackage: gnucash
UpgradeStatus: Upgraded to jammy on 2022-02-20 (12 days ago)

Revision history for this message
Jonathan Kamens (jik) wrote :
Revision history for this message
Jonathan Kamens (jik) wrote :

All of these problems seem to go away when I download GnuCash 4.9 from gnucash.org, build it from source after `apt-get build-dep gnucash` with an install prefix of /opt/gnucash, install it in /opt/gnucash, and run it from there.

Revision history for this message
Launchpad Janitor (janitor) wrote :

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

Changed in gnucash (Ubuntu):
status: New → Confirmed
Revision history for this message
Ben Goldsworthy (rumperuu) wrote :

GnuCash is also borked for me as of upgrading to Ubuntu 22.04 from 21.10.

I can still see my accounts list unlike @jik, but all of the other issues are present: there is no recent files list, my last-opened file is not automatically opened and preferences are not saved.

In addition (although, I imagine, a consequence of the preferences not saving), I am asked for every single changed transaction whether I want to save or discard the changes, and checking the 'remember the answer' box is no use.

Also, I am using a dark theme for my OS and GnuCash now takes account of that where it didn't before - unfortunately, it does so in a way that makes it borderline unreadable (see screenshot).

Revision history for this message
MyHessler (myhessler) wrote :

Please rename issue to 'gnucash does not read or store any of its settings in 4.8'.

Revision history for this message
MyHessler (myhessler) wrote :
Download full text (4.3 KiB)

I'm also affected after upgrading from Ubuntu LTS 20.04 to 22.04 two days ago, which upgraded gnucash along with it, probably from 2.6.x to 4.8-1build2.

gnucash does not read nor store its settings. Whenever opening the settings via the menu 'edit | settings' all settings are empty (no tip of the day, no start notification, no 24h setting). When storing the settings by closing the setting window via 'close' and reopening the settings window, all settings are lost. Also gnucash never remembers the last file I opened, therefore on every gnucash start I have to manually select and open my gnucash file.

Interesting is that when I try to change the settings once (which is not successful) gnucash always asks me on exit whether I want to save (even when I did not open any file and did not create a new one) and wants me to select a file name. I don't understand this behaviour.

Interestingly enough, at the very first start of gnucash after the upgrade, it did open my file and showed all the account tabs along with it, exactly how it is supposed to happen. I did not store the file at this point in time, as I wanted to first make a backup of my gnucash file before the newer version changes it to the newest data file format.

I tried to reinstall all gnucash related packages with 'sudo apt reinstall gnucash gnucash-common gnucash-docs python3-gnucash', but this did not change anything.

Further research in /tmp/gnucash.trace found there are many error messages, like:
* 18:06:11 ERROR <GLib-GIO> g_settings_new_full: assertion 'schema != NULL' failed
* 18:06:11 WARN <gnc.app-utils.gsettings> [gnc_gsettings_get_settings_ptr()] Ignoring attempt to access unknown gsettings schema org.gnucash.GnuCash.general
* 18:06:11 ERROR <gnc.app-utils> GVariant* gnc_gsettings_get_user_value(const gchar*, const gchar*): assertion 'G_IS_SETTINGS (settings_ptr)' failed
* 18:06:11 ERROR <GLib-GIO> g_settings_new_full: assertion 'schema != NULL' failed
* 18:06:11 WARN <gnc.app-utils.gsettings> [gnc_gsettings_get_settings_ptr()] Ignoring attempt to access unknown gsettings schema org.gnucash.general
* 18:06:11 ERROR <gnc.app-utils> GVariant* gnc_gsettings_get_user_value(const gchar*, const gchar*): assertion 'G_IS_SETTINGS (settings_ptr)' failed
* 18:06:11 ERROR <GLib-GIO> g_settings_new_full: assertion 'schema != NULL' failed
* 18:06:11 WARN <gnc.app-utils.gsettings> [gnc_gsettings_get_settings_ptr()] Ignoring attempt to access unknown gsettings schema org.gnucash.GnuCash.general
* 18:06:11 ERROR <gnc.app-utils> gdouble gnc_gsettings_get_float(const gchar*, const gchar*): assertion 'G_IS_SETTINGS (settings_ptr)' failed
* 18:06:11 ERROR <GLib-GIO> g_settings_new_full: assertion 'schema != NULL' failed
* 18:06:11 WARN <gnc.app-utils.gsettings> [gnc_gsettings_get_settings_ptr()] Ignoring attempt to access unknown gsettings schema org.gnucash.GnuCash.general
* 18:06:11 ERROR <gnc.app-utils> gboolean gnc_gsettings_get_bool(const gchar*, const gchar*): assertion 'G_IS_SETTINGS (settings_ptr)' failed
(and so on)

This points gnucash not able to access its configuration data in dconf via gsettings.

I've used 'dconf-editor' and could find the configuration settings of gnucash u...

Read more...

Revision history for this message
MyHessler (myhessler) wrote :

For the records: I've tried various workarounds to still get gnucash to work for me.
After some attempts I was successful with the flatpak version.
From my first look the flatpak version works flawlessly, including reading and storing all configuration settings. The already existing dconf settings are now being used by the flatpak gnucash installation, or at least they are meaningfully filled and can be changed within gnucash. This substantiates the suspicion of an error in the regular gnucash package.

Here is what I tried until I came to this result. Maybe this is helpful for someone running into the same issue.

I would have liked to install the deb-Packages provided on gnucash.org with gnucash 4.11, but they did not work because some new required libraries (libboost-regex1.74.0-icu71 and libicu71) were missing which are not part of LTS 22.04, so I could not install them easily.
I did not attempt building gnucash because those libraries would also be missing from my system. And I don't like it if I have software installed without using the package manager. I also searched for elder versions (4.9), but those are not available anywhere any more (at least not from trustworthy sources).

In the end I went with the flatpak installation, following the suggestions (in German) on https://wiki.gnucash.org/wiki/De/Flatpak

[For stable version:]
# Install FlatPak (on debian based distributions, others have to replace 'apt-get install'):
sudo apt-get install flatpak

# Register FlatHub repository for a system app (available to all users):
sudo flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
# or only you:
flatpak remote-add --user --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo

# Install GnuCash ...
# for all users:
# sudo is only needed for a --system install, if the user is not in the 'sudo' group
# --system is the default if --user is not specified
sudo flatpak install --system flathub org.gnucash.GnuCash
# or only you:
flatpak install --user flathub org.gnucash.GnuCash

# Run GnuCash:
flatpak run org.gnucash.GnuCash

# For updates run:
flatpak update

The flatpak version includes Aqbanking in a new version, which is also what I require in Germany.

My only issue after installation was related to the flatpak installation was that all saved reporting definitions were deleted in the process. If someone else has the same problem: I was able to recover them by copying an old version (in my case saved-reports-2.4) into the new configuration directory ~/.var/app/org.gnucash.GnuCash/data/gnucash/ and removing the new files saved-reports-2.8 and saved-reports-2.8-backup.

Revision history for this message
Jonathan Kamens (jik) wrote :

I figured out what was causing this problem on my computer, but I don't understand why it was causing the problem in Jammy but not the previous releases, so I don't know what the "correct" fix is.

I had an old, stale gschemas.compiled file in /usr/local/share/glib-2.0/schemas. When I deleted this file, the problem went away. I had this file there from when I installed an application by hand in /usr/local; I was able to delete it since that application was no longer needed/installed in /usr/local.

For some reason before upgrading to Jammy this file wasn't being read, but after upgrading this file was being read, and I dunno, maybe causing the correct version of the file in /usr/share/glib-2.0/schemas (not: /usr/share, not /usr/local/share) to be ignored?

I see that on Jammy the environment variable XDG_DATA_DIRS has /usr/local/share in it before /usr/share. Perhaps this is a change in Jammy? Perhaps this is a bad idea?

Or perhaps GNOME has changed in Jammy such that only the first gschemas.compiled file that is found is read, rather than all files?

It seems to me that it should be possible to have applications that use gsettings installed with /usr/local as their prefix without breaking applications that use gsettings installed with /usrt as their prefix.

Revision history for this message
Lowell Stewart (lowell-stewart) wrote :

I have this same problem. I renamed the /usr/local/share/glib-2.0/schemas/gschemas.compiled file as Jonathan Kamens suggested and it seems to have fixed my problem.

Revision history for this message
Sebastien Bacher (seb128) wrote :

The /usr/local files have always be loaded before the package ones, it's a standard way to provide a local installation replacing the system one. It was probably. The issue was probably not impacting you before because the content of your locally installed schemas was compatible with the old versions of gnucash but isn't with 4.8. Closing since that's not an Ubuntu bug

Changed in gnucash (Ubuntu):
status: Confirmed → Invalid
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.