Can't open DeltaChat on macOS no more: "Fatal Error during ini - TypeError: Provided dc_accounts is null, did you unref the accounts object?"

Hi all,
when I want open DC on dektop macOS, then this alert come and it doesn’t open: “Fatal Error during init - TypeError: Provided dc_accounts is null, did you unref the accounts object?”
it’s since a half year or so. It was the DC version 1.32 I think. I tried it with 1.38.1 but it’s the same.

it could be that in this time I renamed my user directory… but the problem didn’t appear in other programs.

thank u :**

please look if the log files under /Users/<your_username>/Library/Application Support/DeltaChat/logs provide some useful information.
The content of /Users/<your_username>/Library/Application Support/DeltaChat/accounts.toml could also be helpful.

Backup your account folder /Users/<your_username>/Library/Application Support/DeltaChat/accounts then you can delete deltachat and see if it works again with a fresh account, later you can restore the account folder again.

Before Desktop 1.34.2 there is a chance your accounts.toml file used absolute paths rather than relative paths and included the name of your home folder. This issue was completely fixed in core 1.106.0 and Delta Chat Desktop 1.34.2 is the first released desktop version that used core 1.106.0.

As a solution you can rename your home folder back, make sure Delta Chat works, then upgrade it to a version >= 1.34.2. Alternatively, try to open accounts.toml and replace the dir with a relative path, so an example entry might look like this:

[[accounts]]
id = 41
dir = "4a02c489-8d68-4e33-81e8-f4992ef07c1b"
uuid = "4a02c489-8d68-4e33-81e8-f4992ef07c1b"

(or just replace the username there with a new one if that was the issue, Delta Chat will upgrade to relative paths itself afterwards).

2 Likes

i deleted the direcory /Users/<your_username>/Library/Application Support/DeltaChat/accounts. now it works. if i restore this directory, the same error shows up.

i don’t know what i should look in the accounts.toml file…

you can post/upload it here and we can take a look, afaik the uuid and dir-(name) are random, so accounts.toml does not contain private/sensitive information and thus you can post it here

my way to a solution:

  1. I moved the accounts folder from this path /Users/<your_username>/Library/Application Support/DeltaChat/accounts to another directory. now i started Delta again and it works as a fresh start, so i had to log in. so it is clear that it is something with the accunt folder. when i moved bak, the same error appears.

  2. I opened the accounts.toml file in the the accounts folder with a text editor. yes there was written an absolute path with the old home directory name. i editet the name to the new name. and averything startet an i was still logged in with 2 accounts and all datas and chats.

next time i would look directly in the accounts.toml file. i was not brave enough bc i am not an it-person at all, but it was so simple :smiley:

thanks for the great help from @link2xt and @Simon. both of your posts together brought me to te solution.

<1312

1 Like