So, in my situation, I have a brand new MacBook Air Retina Display. It came brand new with Mojave 10.14.2 and at first boot up, I had the issue of not being able to Sign In to the Apple Store, but was able to sign into all other things like iCloud Drive and iTunes. So, my experience was not from an upgrade, but a brand new computer boot up; not sure if that is relevant or not.
I went thru this thread, any many others, and tried all of them to no avail. The deleting certian "com.apple.appstore", folders, messing with the Trust Settings folder, etc. All of them.
What did finally seem to work for me, which by the way is now after I have updated to Mojave 10.14.3 (I thought that might resolve the issue as many of you probably hoped too), was using AppCleaner.
I have version 3.5.
Launch App Cleaner and then drag and drop the "App Store.app" onto the window. If it gives you an error prompt, just open the App Cleaner Preferences and uncheck the box next to "Protect default OS X apps" and then try it again.
Once successful, it will show all of the components associated with the App Store.app.
Select all of them EXCEPT for the App Store.app and the folder /Library/Application Support. For me, they were the first two in the list. Do Not delete those.
After that, I restarted and actually performed an install of Mojave 10.14.3 over my existing one, but I did not erase or delete anything.
When I completed the installation and restarted, I was able to Sign in "FINALLY" to the App Store.
Someone may want to test whether a reinstall is needed after removing the files. I did not try that. I just went straight to the reinstallation. I hope this works for some of you.