$ gajimNo translations foundDirs searched: [PosixPath('/usr/share/gnome'), PosixPath('/usr/share/cinnamon'), PosixPath('/home/crosser/.local/share/flatpak/exports/share'), PosixPath('/var/lib/flatpak/exports/share'), PosixPath('/usr/local/share'), PosixPath('/usr/share'), PosixPath('/var/lib/snapd/desktop')]Traceback (most recent call last): File "/usr/lib/python3/dist-packages/gajim/application.py", line 201, in _startup app.logger = logger.Logger() File "/usr/lib/python3/dist-packages/gajim/common/logger.py", line 195, in __init__ self._load_caps_data() File "/usr/lib/python3/dist-packages/gajim/common/logger.py", line 143, in func_wrapper result = func(self, *args, **kwargs) File "/usr/lib/python3/dist-packages/gajim/common/logger.py", line 1053, in _load_caps_data rows = self._con.execute( File "/usr/lib/python3/dist-packages/gajim/common/logger.py", line 152, in _convert_disco_info return parse_disco_info(Iq(node=disco_info)) File "/usr/lib/python3/dist-packages/nbxmpp/protocol.py", line 1553, in __init__ Protocol.__init__(self, File "/usr/lib/python3/dist-packages/nbxmpp/protocol.py", line 977, in __init__ Node.__init__(self, tag=name, attrs=attrs, payload=payload, node=node) File "/usr/lib/python3/dist-packages/nbxmpp/simplexml.py", line 109, in __init__ node = NodeBuilder(node, self) File "/usr/lib/python3/dist-packages/nbxmpp/simplexml.py", line 672, in __init__ self._parser.Parse(data, finished)xml.parsers.expat.ExpatError: not well-formed (invalid token): line 1, column 0Traceback (most recent call last): File "/usr/lib/python3/dist-packages/gajim/application.py", line 235, in _activate self.interface = Interface() File "/usr/lib/python3/dist-packages/gajim/gui_interface.py", line 2068, in __init__ app.logger.reset_shown_unread_messages()AttributeError: 'NoneType' object has no attribute 'reset_shown_unread_messages'Traceback (most recent call last): File "/usr/lib/python3/dist-packages/gajim/application.py", line 310, in do_shutdown app.logger.commit()AttributeError: 'NoneType' object has no attribute 'commit'
Designs
Child items
...
Show closed items
Linked items
0
Link issues together to show that they're related.
Learn more.
After rm .cache/gajim/cache.db and then even rm -r .cache/gajim behaviour did not change.
$ gajimNo translations foundDirs searched: [PosixPath('/usr/share/gnome'), PosixPath('/usr/share/cinnamon'), PosixPath('/home/crosser/.local/share/flatpak/exports/share'), PosixPath('/var/lib/flatpak/exports/share'), PosixPath('/usr/local/share'), PosixPath('/usr/share'), PosixPath('/var/lib/snapd/desktop')]creating /home/crosser/.cache/gajim directorycreating /home/crosser/.cache/gajim/plugins_download directorycreating /home/crosser/.cache/gajim/avatars directorycreating /home/crosser/.cache/gajim/bob directoryTraceback (most recent call last): File "/usr/lib/python3/dist-packages/gajim/application.py", line 201, in _startup app.logger = logger.Logger() File "/usr/lib/python3/dist-packages/gajim/common/logger.py", line 195, in __init__ self._load_caps_data() File "/usr/lib/python3/dist-packages/gajim/common/logger.py", line 143, in func_wrapper result = func(self, *args, **kwargs) File "/usr/lib/python3/dist-packages/gajim/common/logger.py", line 1053, in _load_caps_data rows = self._con.execute( File "/usr/lib/python3/dist-packages/gajim/common/logger.py", line 152, in _convert_disco_info return parse_disco_info(Iq(node=disco_info)) File "/usr/lib/python3/dist-packages/nbxmpp/protocol.py", line 1553, in __init__ Protocol.__init__(self, File "/usr/lib/python3/dist-packages/nbxmpp/protocol.py", line 977, in __init__ Node.__init__(self, tag=name, attrs=attrs, payload=payload, node=node) File "/usr/lib/python3/dist-packages/nbxmpp/simplexml.py", line 109, in __init__ node = NodeBuilder(node, self) File "/usr/lib/python3/dist-packages/nbxmpp/simplexml.py", line 672, in __init__ self._parser.Parse(data, finished)xml.parsers.expat.ExpatError: not well-formed (invalid token): line 1, column 0Traceback (most recent call last): File "/usr/lib/python3/dist-packages/gajim/application.py", line 235, in _activate self.interface = Interface() File "/usr/lib/python3/dist-packages/gajim/gui_interface.py", line 2068, in __init__ app.logger.reset_shown_unread_messages()AttributeError: 'NoneType' object has no attribute 'reset_shown_unread_messages'Traceback (most recent call last): File "/usr/lib/python3/dist-packages/gajim/application.py", line 310, in do_shutdown app.logger.commit()AttributeError: 'NoneType' object has no attribute 'commit'
$ dpkg --list|egrep 'gajim|nbxmpp'ii gajim-default-nightly 20200421-1 all XMPP client written in Python / GTKii python3-nbxmpp-nightly 20200420-1 all Non blocking XMPP Python library
Apparently the problems is not in the cache.db: I checked all the tables and they are all empty.
$ sqlite3 .cache/gajim/cache.db "select name from sqlite_master where type='table'"|while read t; do sqlite3 .cache/gajim/cache.db "select '$t', count(*) from $t"; done transports_cache|0caps_cache|0last_seen_disco_info|0roster_entry|0roster_group|0muc_avatars|0
Looks like it is trying to do something with disco_info? I ran it with -v and I am attaching the result.
I moved all plugins one by one away from .local/share/gajim/plugins and it did not change behaviour. Then, because I realized that the failing code was called from sqlite, I looked what databases are present there. And the only one other than keys of (already disabled) omemo, there was logs.db
So once I moved away logs.db, gajim started normally. But of course history is empty.
Speaking about client_icons, it indeed throws exception, but that does not prevent gajim from working.
23/04/20 20:49:56 (W) gajim.plugin_system While trying to load clients_icons, exception occurredTraceback (most recent call last): File "/usr/lib/python3/dist-packages/gajim/plugins/pluginmanager.py", line 666, in scan_dir_for_plugins module = __import__(module_name) File "/home/crosser/.local/share/gajim/plugins/clients_icons/__init__.py", line 1, in <module> from .clients_icons import ClientsIconsPlugin File "/home/crosser/.local/share/gajim/plugins/clients_icons/clients_icons.py", line 10, in <module> from gajim.common import caps_cacheImportError: cannot import name 'caps_cache' from 'gajim.common' (/usr/lib/python3/dist-packages/gajim/common/__init__.py)23/04/20 20:49:56 (W) gajim.plugin_system Skip Plugin plugin_installer because its already loaded
I looked at the last entries in the logs table in log.db, but nothing caught my eye.
I can send you complete log.db personaly (not as attachment here).
I did some investigation and I am more baffled than I was before.
I disable registration of the convertor in order to be able to see data as it was read from the database:
hi, looking at the logs.db it clear to me why it fails
in the logs.db is a table caps_cache, this table should not be there, the same table is also in cache.db. Both databases are attached to each other at runtime, so sqlite has 2 tables with the same name and chooses to use the one in logs.db, which contains BLOBs in its rows.
So solution is, delete that table from your logs.db, and lets look if this happens again.
Both databases are attached to each other at runtime, so sqlite has 2 tables with the same name and chooses to use the one in logs.db
Wow, I did not even know that it was possible! It also explain the "miracle" that I observed yesterday, when select from caps_cache returned this faulty value even when I saw that the table is empty.
I promise that I did not create the table in log.db!
Sure enough, dropping the table solved the problem. Now I'd need to figure out if it is possible to merge the "new" logs that accumulated in the past few days in the fresh logs.db...
Thanks for you help!
Before closing the ticket, do you think that the code ought to be more resilient to "bad" data? Not good if corrupt data in the database can crash the program...
Now I'd need to figure out if it is possible to merge the "new" logs that accumulated in the past few days in the fresh logs.db...
Naive insert into base.logs (...) select ... from extra.logs; did not work for OMEMO and possibly for other things. Oh well, lost logs for a few days is not such a big deal.
Removing caps_cache from logs.db helped also for me. It might be that I have used a nightly version of gajim at some point, probably from debian experimental, because I had other issues with gajim (dark theme-related).