Critical Error Failed to Start (fixed)

Using Ubuntu 20.04 - Had a messy restore of a back up which caused some issues, all fixed but now get this when I start Insync:

eter@peter-NL40-50CU:~$ insync start --no-daemon
QXcbIntegration: Cannot create platform OpenGL context, neither GLX nor EGL are enabled
WARNING:root:While reading /usr/share/applications/defaults.list
Traceback (most recent call last):
File “idesklinux/application_manager.py”, line 53, in __index_default_apps
File “configparser.py”, line 696, in read
File “configparser.py”, line 1091, in _read
configparser.DuplicateOptionError: While reading from ‘/usr/share/applications/defaults.list’ [line 265]: option ‘application/xhtml+xml’ in section ‘Default Applications’ already exists
WARNING:root:While reading /usr/share/applications/defaults.list
Traceback (most recent call last):
File “idesklinux/application_manager.py”, line 70, in __index_apps_for_mimetypes
File “configparser.py”, line 696, in read
File “configparser.py”, line 1091, in _read
configparser.DuplicateOptionError: While reading from ‘/usr/share/applications/defaults.list’ [line 265]: option ‘application/xhtml+xml’ in section ‘Default Applications’ already exists
INFO 2021-07-05 17:09:47,393 [mainlogs:_log_run:139] Core(app_version=3.4.1.40977, platform=Linux-x86_64-ubuntu/20.04) initialized
WARNING 2021-07-05 17:09:47,401 [base_events:_run_once:1771] Executing <Task pending coro=<init() running at ideskcore/core.py:146> wait_for=<Task pending coro=<SettingsMain._load_settings() running at ideskcore/mainsettings.py:170> cb=[_log_tb_after_delay() at ideskasync/coreloop.py:303, <TaskWakeupMethWrapper object at 0x7f3e141dfc78>()] created at ideskcore/mainsettings.py:148> cb=[_log_tb_after_delay() at ideskasync/coreloop.py:303, _chain_future.._call_set_state() at asyncio/futures.py:355] created at asyncio/events.py:88> took 0.140 seconds
CRITICAL 2021-07-05 17:09:47,408 [core:init:154] while creating Core main
Traceback (most recent call last):
File “ideskcore/core.py”, line 146, in init
File “ideskcore/mainbase.py”, line 14, in init
File “ideskcore/core.py”, line 52, in _init
File “ideskcore/mainsync.py”, line 174, in _init
File “ideskcore/mainhttp.py”, line 110, in _init
File “ideskcore/mainsettings.py”, line 152, in _init
File “ideskcore/mainsync.py”, line 178, in _start_syncing
File “ideskcore/mainsettings.py”, line 188, in _load_settings
File “ideskcore/mainsettings.py”, line 18, in init
File “ideskdb/clientdb.py”, line 193, in init
File “ideskdb/clientdb.py”, line 232, in _check_integrity
File “ideskdb/clientdb.py”, line 271, in check_integrity
File “ideskdb/clientdb.py”, line 255, in get_first
sqlite3.DatabaseError: database disk image is malformed
ERROR 2021-07-05 17:09:50,428 [base_events:default_exception_handler:1608] Task exception was never retrieved after 3.0 seconds
future: <Task finished coro=<SyncMain._start_syncing() done, defined at ideskcore/mainsync.py:177> exception=DatabaseError(‘database disk image is malformed’) created at ideskcore/mainsync.py:163>
source_traceback: Object created at (most recent call last):
File “threading.py”, line 885, in _bootstrap
File “threading.py”, line 917, in _bootstrap_inner
File “threading.py”, line 865, in run
File “ideskasync/coreloop.py”, line 274, in run_loop
File “asyncio/base_events.py”, line 539, in run_forever
File “asyncio/base_events.py”, line 1767, in _run_once
File “asyncio/events.py”, line 88, in _run
File “ideskcore/core.py”, line 145, in init
File “ideskcore/core.py”, line 23, in init
File “ideskcore/mainsync.py”, line 163, in init
Traceback (most recent call last):
File “ideskcore/core.py”, line 146, in init
File “ideskcore/mainbase.py”, line 14, in init
File “ideskcore/core.py”, line 52, in _init
File “ideskcore/mainsync.py”, line 174, in _init
File “ideskcore/mainhttp.py”, line 110, in _init
File “ideskcore/mainsettings.py”, line 152, in _init
File “ideskcore/mainsync.py”, line 178, in _start_syncing
File “ideskcore/mainsettings.py”, line 188, in _load_settings
File “ideskcore/mainsettings.py”, line 18, in init
File “ideskdb/clientdb.py”, line 193, in init
File “ideskdb/clientdb.py”, line 232, in _check_integrity
File “ideskdb/clientdb.py”, line 271, in check_integrity
File “ideskdb/clientdb.py”, line 255, in get_first
sqlite3.DatabaseError: database disk image is malformed
INFO 2021-07-05 17:09:51,428 [main:quit:64] quitting
INFO 2021-07-05 17:09:51,431 [main:stop:59] core stopped
INFO 2021-07-05 17:09:51,432 [main:stop:61] clean exit
peter@peter-NL40-50CU:~$

Should I edit the lines it mentions?

Thanks.

Hi @Peter_Sefton!

Let me forward this to our engineers and will advise you on the next steps to take. Could you confirm your Insync version by running apt-cache policy insync? :slight_smile: Thanks!

Hi again, @Peter_Sefton!

It seems like the db file is corrupted and causing the app to crash – how did you restore the backup?

As per our engineer, you can do the following:

  • Quit the app
  • Delete the Insync config folder: ~/.config/Insync
  • Run Insync
  • Re-add the account.

This should allow Insync to start w/o crashing. :slight_smile:

The versions was:
insync:
Installed: 3.4.1.40977-focal
Candidate: 3.4.1.40977-focal
Version table:
*** 3.4.1.40977-focal 500
500 http://apt.insync.io/ubuntu focal/non-free amd64 Packages
100 /var/lib/dpkg/status

I think the problem was caused when I restored a backup from Ubuntu 21.04 on a new installation of Ubuntu 20.04.

It’s now started successfully and working perfectly.

Thanks so much for your help.

Peter.

I’m glad to know that things are working smoothly, @Peter_Sefton!