icloud – Error 500 of the Appstore (com.apple.commerce.client)

I just formatted my hard drive and reinstall MacOS Mojave 10.14.3 (18D109).

I can not login to my Apple account through the Appstore nor install any application (I have an urgent need for Keynote)

I have found several people online with similar problems and have followed certain steps, but all without success.

I tried to disconnect myself from icloud, to restart it, to connect

I have tried to restart the laptop several times

I tried to clean a folder from the library

I tried to delete the configuration files

I tried to connect to iTunes and to disconnect

The current behavior is as follows: I open the App Store and find that I am not connected in the lower left corner. I can either connect to the place where I enter my email and my password but it fails silently, or try to install an application by being disconnected and ask me to connect. The error message error 500 (com.apple.commerce.client) is displayed. .

I would love to understand what the problem is and how to solve it.

I do not understand why