Duplicati 2.0.2.1 not launching on MacOS Sierra

Hi,
I am not sure if this happened only after the update to 2.0.2.1 or after some other point of time, but Duplicati is not launching anymore on my MacOS Sierra Machine.
Tried to install experimental builds, but there I also get the same issue. When I tried to install the experimental builds via the .pkg installation, the installation itself is even failing.
After trying to launch via Terminal I get the following result:

Crash!
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. —> System.Exception: A serious error occurred in Duplicati: System.Exception: Failed to create, open or upgrade the database.
Error message: The database disk image is malformed
database disk image is malformed
at Duplicati.Server.Program.GetDatabaseConnection (System.Collections.Generic.Dictionary2[TKey,TValue] commandlineOptions) [0x0023b] in <a6c0c2089b9a44ec9be5057a44f12116>:0 at Duplicati.Server.Program.RealMain (System.String[] args) [0x00206] in <a6c0c2089b9a44ec9be5057a44f12116>:0 ---> System.Exception: Failed to create, open or upgrade the database. Error message: The database disk image is malformed database disk image is malformed at Duplicati.Server.Program.GetDatabaseConnection (System.Collections.Generic.Dictionary2[TKey,TValue] commandlineOptions) [0x0023b] in :0
at Duplicati.Server.Program.RealMain (System.String args) [0x00206] in :0
— End of inner exception stack trace —
at Duplicati.Server.Program.RealMain (System.String args) [0x0065d] in :0
at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod,object,object,System.Exception&)
at System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object parameters, System.Globalization.CultureInfo culture) [0x00032] in <4fdc5ed61a074cafb49fa42deb20d521>:0
— End of inner exception stack trace —
at System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object parameters, System.Globalization.CultureInfo culture) [0x00048] in <4fdc5ed61a074cafb49fa42deb20d521>:0
at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object parameters) [0x00000] in <4fdc5ed61a074cafb49fa42deb20d521>:0
at Duplicati.Library.AutoUpdater.UpdaterManager.RunMethod (System.Reflection.MethodInfo method, System.String args) [0x00000] in <2e3a1be277654a188f84e503094300c3>:0
Crash!
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. —> System.Exception: A serious error occurred in Duplicati: System.Exception: Failed to create, open or upgrade the database.
Error message: The database disk image is malformed
database disk image is malformed
at Duplicati.Server.Program.GetDatabaseConnection (System.Collections.Generic.Dictionary2[TKey,TValue] commandlineOptions) [0x0023b] in <a6c0c2089b9a44ec9be5057a44f12116>:0 at Duplicati.Server.Program.RealMain (System.String[] args) [0x00206] in <a6c0c2089b9a44ec9be5057a44f12116>:0 ---> System.Exception: Failed to create, open or upgrade the database. Error message: The database disk image is malformed database disk image is malformed at Duplicati.Server.Program.GetDatabaseConnection (System.Collections.Generic.Dictionary2[TKey,TValue] commandlineOptions) [0x0023b] in :0
at Duplicati.Server.Program.RealMain (System.String args) [0x00206] in :0
— End of inner exception stack trace —
at Duplicati.GUI.TrayIcon.HostedInstanceKeeper…ctor (System.String args) [0x00093] in :0
at Duplicati.GUI.TrayIcon.Program.RealMain (System.String _args) [0x00288] in :0
at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod,object,object,System.Exception&)
at System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object parameters, System.Globalization.CultureInfo culture) [0x00032] in <4fdc5ed61a074cafb49fa42deb20d521>:0
— End of inner exception stack trace —
at System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object parameters, System.Globalization.CultureInfo culture) [0x00048] in <4fdc5ed61a074cafb49fa42deb20d521>:0
at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object parameters) [0x00000] in <4fdc5ed61a074cafb49fa42deb20d521>:0
at Duplicati.Library.AutoUpdater.UpdaterManager.RunMethod (System.Reflection.MethodInfo method, System.String args) [0x00000] in <2e3a1be277654a188f84e503094300c3>:0

Unhandled Exception:
System.Exception: A serious error occurred in Duplicati: System.Exception: Failed to create, open or upgrade the database.
Error message: The database disk image is malformed
database disk image is malformed
at Duplicati.Server.Program.GetDatabaseConnection (System.Collections.Generic.Dictionary2[TKey,TValue] commandlineOptions) [0x0023b] in <a6c0c2089b9a44ec9be5057a44f12116>:0 at Duplicati.Server.Program.RealMain (System.String[] args) [0x00206] in <a6c0c2089b9a44ec9be5057a44f12116>:0 ---> System.Exception: Failed to create, open or upgrade the database. Error message: The database disk image is malformed database disk image is malformed at Duplicati.Server.Program.GetDatabaseConnection (System.Collections.Generic.Dictionary2[TKey,TValue] commandlineOptions) [0x0023b] in :0
at Duplicati.Server.Program.RealMain (System.String args) [0x00206] in :0
— End of inner exception stack trace —

Server stack trace:
at Duplicati.Library.AutoUpdater.UpdaterManager.RunMethod (System.Reflection.MethodInfo method, System.String args) [0x0009c] in <2e3a1be277654a188f84e503094300c3>:0
at Duplicati.Library.AutoUpdater.UpdaterManager+<>c__DisplayClass53_0.b__0 () [0x00000] in <2e3a1be277654a188f84e503094300c3>:0
at Duplicati.Library.AutoUpdater.UpdaterManager.WrapWithUpdater (Duplicati.Library.AutoUpdater.AutoUpdateStrategy defaultstrategy, System.Action wrappedFunction) [0x00157] in <2e3a1be277654a188f84e503094300c3>:0
at Duplicati.Library.AutoUpdater.UpdaterManager.RunFromMostRecent (System.Reflection.MethodInfo method, System.String cmdargs, Duplicati.Library.AutoUpdater.AutoUpdateStrategy defaultstrategy) [0x00050] in <2e3a1be277654a188f84e503094300c3>:0
at Duplicati.GUI.TrayIcon.Program.Main (System.String args) [0x0001c] in :0
at (wrapper managed-to-native) System.AppDomain:ExecuteAssembly (System.AppDomain,System.Reflection.Assembly,string)
at System.AppDomain.ExecuteAssemblyInternal (System.Reflection.Assembly a, System.String args) [0x00029] in <4fdc5ed61a074cafb49fa42deb20d521>:0
at System.AppDomain.ExecuteAssemblyByName (System.String assemblyName, System.String args) [0x00008] in <4fdc5ed61a074cafb49fa42deb20d521>:0
at (wrapper remoting-invoke-with-check) System.AppDomain:ExecuteAssemblyByName (string,string)
at (wrapper xdomain-dispatch) System.AppDomain:ExecuteAssemblyByName (object,byte&,byte&,string,string)

Exception rethrown at [0]:
at (wrapper xdomain-invoke) System.AppDomain:ExecuteAssemblyByName (string,string)
at (wrapper remoting-invoke-with-check) System.AppDomain:ExecuteAssemblyByName (string,string)
at Duplicati.Library.AutoUpdater.UpdaterManager.RunFromMostRecent (System.Reflection.MethodInfo method, System.String cmdargs, Duplicati.Library.AutoUpdater.AutoUpdateStrategy defaultstrategy) [0x001fb] in <2e3a1be277654a188f84e503094300c3>:0
at Duplicati.GUI.TrayIcon.Program.Main (System.String args) [0x0001c] in :0
[ERROR] FATAL UNHANDLED EXCEPTION: System.Exception: A serious error occurred in Duplicati: System.Exception: Failed to create, open or upgrade the database.
Error message: The database disk image is malformed
database disk image is malformed
at Duplicati.Server.Program.GetDatabaseConnection (System.Collections.Generic.Dictionary2[TKey,TValue] commandlineOptions) [0x0023b] in <a6c0c2089b9a44ec9be5057a44f12116>:0 at Duplicati.Server.Program.RealMain (System.String[] args) [0x00206] in <a6c0c2089b9a44ec9be5057a44f12116>:0 ---> System.Exception: Failed to create, open or upgrade the database. Error message: The database disk image is malformed database disk image is malformed at Duplicati.Server.Program.GetDatabaseConnection (System.Collections.Generic.Dictionary2[TKey,TValue] commandlineOptions) [0x0023b] in :0
at Duplicati.Server.Program.RealMain (System.String args) [0x00206] in :0
— End of inner exception stack trace —

Server stack trace:
at Duplicati.Library.AutoUpdater.UpdaterManager.RunMethod (System.Reflection.MethodInfo method, System.String args) [0x0009c] in <2e3a1be277654a188f84e503094300c3>:0
at Duplicati.Library.AutoUpdater.UpdaterManager+<>c__DisplayClass53_0.b__0 () [0x00000] in <2e3a1be277654a188f84e503094300c3>:0
at Duplicati.Library.AutoUpdater.UpdaterManager.WrapWithUpdater (Duplicati.Library.AutoUpdater.AutoUpdateStrategy defaultstrategy, System.Action wrappedFunction) [0x00157] in <2e3a1be277654a188f84e503094300c3>:0
at Duplicati.Library.AutoUpdater.UpdaterManager.RunFromMostRecent (System.Reflection.MethodInfo method, System.String cmdargs, Duplicati.Library.AutoUpdater.AutoUpdateStrategy defaultstrategy) [0x00050] in <2e3a1be277654a188f84e503094300c3>:0
at Duplicati.GUI.TrayIcon.Program.Main (System.String args) [0x0001c] in :0
at (wrapper managed-to-native) System.AppDomain:ExecuteAssembly (System.AppDomain,System.Reflection.Assembly,string)
at System.AppDomain.ExecuteAssemblyInternal (System.Reflection.Assembly a, System.String args) [0x00029] in <4fdc5ed61a074cafb49fa42deb20d521>:0
at System.AppDomain.ExecuteAssemblyByName (System.String assemblyName, System.String args) [0x00008] in <4fdc5ed61a074cafb49fa42deb20d521>:0
at (wrapper remoting-invoke-with-check) System.AppDomain:ExecuteAssemblyByName (string,string)
at (wrapper xdomain-dispatch) System.AppDomain:ExecuteAssemblyByName (object,byte&,byte&,string,string)

Exception rethrown at [0]:
at (wrapper xdomain-invoke) System.AppDomain:ExecuteAssemblyByName (string,string)
at (wrapper remoting-invoke-with-check) System.AppDomain:ExecuteAssemblyByName (string,string)
at Duplicati.Library.AutoUpdater.UpdaterManager.RunFromMostRecent (System.Reflection.MethodInfo method, System.String cmdargs, Duplicati.Library.AutoUpdater.AutoUpdateStrategy defaultstrategy) [0x001fb] in <2e3a1be277654a188f84e503094300c3>:0
at Duplicati.GUI.TrayIcon.Program.Main (System.String args) [0x0001c] in :0

Hi @harbeckster, welcome to the fourm!

That’s definitely not a normal experience, though it looks like one other user has reported the issue - did you get a chance to read through this thread?

Hi @JonMikelV
Yes, I read this thread already.
What I couldn’t find out is where the SQLite file is located.
I also tried to uninstall the whole application, manually as well as with the uninstall.sh script.
When I tried to run the uninstall script with normal user permissions, I got a permission denied error:

rm: /Library/LaunchAgents/com.duplicati.app.launchagent.plist: Permission denied`

Could that indicate problems with writing rights?
After that I ran the script with sudo and got no error.

But also after reinstallation the problem remains. So I think, my problem might be different from what is mentioned in the thread you have linked?

You probably got the “Permission denied” error because I think by default MacOs only allows root users write access to /Library/LaunchAgents (hence it working with sudo).

If you’re looking for the generic “Duplicati-server.sqlite” file try looking in ~/.config (which is likely also where you’ll find the dbconfig.json file which might give you a clue on the path to the job specific SQLite files).

If you’re looking for the job specific SQLite file (and you can get the GUI working) try opening the job menu in the GUI, click in “Database …” in the “Advanced” section, and you should see the location listed in the “Local database path” field.

Can you confirm you’ve got “enough” disk space on the drive(s) where the databases are stored?

Okay i just realized, that I haven’t removed the DB files.
Once I remove these, it’s launching.
Is there any way to restore them or do I have to setup the backup again?

I have more than 100gb left on the drive so that should not be an issue.

If you open the job menu and click on the “Database …” link you should see a page with Repair and Recreate options.

Recreate should do what you want, but note that for some users this step can take quite a while.

The problem is, that the jobs are disappearing when I delete the files from the config folder. But unless I do so, duplicati won’t start.
I think, the Duplicati-server.sql is causing this problem. After removing that file and leaving all others in the folder, it is starting. But all the jobs are missing then.

Got it - so something in the database file that stores the job info is causing Duplicati to not be able to start.

I’m not really sure why this would happen in the first place unless there was something like a power outage while the database was being written to or hard drive crash that corrupted the file.

Regardless of the cause, it sounds like your plan of “somehow extract the backup jobs then delete everything and import them fresh” is a good plan. Unfortunately, I’m not strong on the database side of things.

In theory you should be able to read the database files directly with a SQLite viewer. While I haven’t tried that myself, I know a few other users on the forum have so they might have a suggestion. Additionally, @kenkendk might be able to help out (or maybe even be interested in seeing your corrupt duplicati-server.sqlite file).

Okay, would be great if someone could help with this issue then. I also don’t know much about SQLite and all this.