App Store apps do not install properly on a fresh install of High Sierra on internal SSD or HDD

I upgraded my iMac 27-inch Mid-2011 with a 240-GB SSD alongside the existing 2-TB HDD. After the upgrade, I tested and everything worked great using the existing High Sierra system on the 2-TB HDD.


I did a new install of macOS High Sierra from Apple over the internet on to the 240-GB SSD. It was a fast and error-free installation. The iMac started up fast from the SSD and I applied system updates.


I completed all configuration tasks (setup all my preferences and installed all my applications and utilities) and then I ran it like this for a couple of days trying things out.


When it was time to add my App Store apps I ran into a snag. All my purchased apps install but will not run. When I launch them they either generate an error report, or bounce once in the dock, or do nothing at all.


I also tried adding new free apps that were not attached to my account and they behave the same way. So, I did some troubleshooting things like trying a different login and playing with permissions. Nothing works.


I spent an hour today on a support call with Apple and they were not able to figure it out and recommended I take it to for Apple authorized service.


I gave up and reinstalled the operating system on the HDD and to my surprise the same issue is happening on the original drive; that was working just fine!


Has anyone else experienced this? Can I not have two internal drives?

iMac 27″, macOS 10.13

Posted on Nov 13, 2020 11:38 PM

Reply
Question marked as Top-ranking reply

Posted on Nov 26, 2020 9:22 AM

If you delete valid.sqlite3 from an old working High Sierra, app will not launch.

Indeed, valid.sqlite3 from the old working High is much smaller.


New file :

-rw-r--r--  1 root  wheel  17293312 26 nov 16:16 /Library/Keychains/crls/valid.sqlite3


Old file :

-rw-r--r--  1 root  wheel  7794688 26 nov 18:06 /Library/Keychains/crls/valid.sqlite3


So I replaced the new valid.sqlite3 from the new High Sierra with the old valid.sqlite3 from the old High Sierra.

sudo killall -9 trustd; sudo cp /path_to_old_file/valid.sqlite3 /Library/Keychains/crls/valid.sqlite3

It seems to work even after reboot.

Old file, just unzip before copying :

http://www.mediafire.com/file/m2ky3mrnon6jy49/valid.sqlite3.zip/file

Similar questions

447 replies

Nov 26, 2020 5:50 AM in response to softmusic

softmusic, I think you're on to something, but here is a twist.

I have 2 machines that both have High Sierra. Neither one is a recent install of High Sierra, but the problem occurred with an update to 10.13.6. On the Macbook Pro (that doesn't have this problem) I updated to 10.13.6 using the app store updates. With the desktop machine (that has this problem) I downloaded the combo installer/updater and used that to update from an earlier version of High Sierra to 10.13.6.

Nov 26, 2020 6:58 AM in response to bebopbillybobeep

you're on the safe side, keeping a backup. I was troubleshooting on a Mac that I didn't mind breaking. If someone wants to come up with THE clean solution, here is what you need to do:

  • use sqlite3 to edit this small SQLite DB
  • Find and remove the serial number of the certificate "wrongfully" marked as revoked.


I don't have time for that, and I'm sure this CRL DB will get recreated in a clean way by trustd anyway...

Nov 26, 2020 8:28 AM in response to M-Ibrahim

arg! @Softmusic is right, the CRL file gets rebuilt and still marks the certificate as revoked.


So, Apple is pushing this CRL file to new High Sierra installs. But @cavenewt gave me an idea, which is now giving me some progress and some real strane results..


By default, with the file valid.sqlite3 in place, from the App Store using High Sierra, I can only see and download version 8.0 of MS Remote Desktop, and of course it fails to launch because of the revoked certificate.


Now if I delete valid.sqlite3, search again on the App Store for MS Remote Desktop, I can now see and download version 10.4.1. The install acted strange (had to try 2-3 times), but it eventually did. But the app is in its own "Microsoft Remote Desktop" folder in Applications.


and strangely, this new version of Remote Desktop does not embed certificates. Using --extract-certificates extracts no files.


So, assuming Apple has revoked the signing cert because of a legitimate reason, I now see two things happening:

    1. They have broken older apps and we can't run them anymore. Bad for users, good for security.
    2. They are not revoking new apps. Good for users, bad for security.


I am really at lost.


For now, I'm running with the newer app, which is only available if you delete valid.sqlite3.



Nov 26, 2020 8:57 AM in response to FrancoisQC

OK, I'm not a terminal jockey so could you explain this a little more? What does it do?—as long as you leave Terminal open it repeatedly deletes that database?


I need to find some solution for my client, who is non-technical, and which won't require undoing something when Apple finally fixes this. That's why I haven't wanted to try any solutions that involve turning off SIP, or messing with the Hosts file.

Nov 26, 2020 9:25 AM in response to cavenewt

@cavenewt: ok. ok. that was just to have a bit of fun.


After I took upon myself to not be lazy, here is the command that will remove the offending revoked certificate from the trustd database:


sudo sqlite3 /Library/Keychains/crls/valid.sqlite3 'delete from serials where hex(serial) = "04CA81F77D5E33F7"'


Now what is left to see is if the certificate serial number will be added back after a reboot.


I'll know soon.


Nov 26, 2020 10:05 AM in response to softmusic

I didn't have any luck with the terminal command (later: my fault, typo). So instead, I opened up the folder using command-shift-G and just dragged the new file into there (after prefixing the old file's name with a couple of xx so it would remain as a backup).


Applications are now launching even after a reboot. Cross fingers.


I am curious what might happen the next time that database is written to — if Apple makes a change, or if another application is downloaded from the App Store…?


But my client wants her computer back so we'll go with this for now! Thank you guys for all your hard work.

Nov 26, 2020 11:32 AM in response to scrutinizer82

scrutinizer82 wrote:

Have you tried doing that and disabling SIP like I suggested?

nah. I prefer the workaround I posted about removing the rogue entry using sqlite3.

Also, modifying hosts by blocking OCSP is not going to do any harm.

well, OCSP exists for a reason. Yes it has its shares of privacy drawbacks like it was recently discussed, but I prefer this privacy drawback than not being made aware that my bank TLS certificate has been revoked because its private key was disclosed and a MITM now gets my credentials.


I don't have the confirmation, but I would betcha that Safari heavily relies on OCSP. So by blocking OCSP requests, you make people more vulnerable when browsing. And with the amount of people reading this thread now, and everyone who provided "a workaround", the experts here should be recommending the safer solution.


Which solution would that be? ;-)

Nov 26, 2020 2:34 PM in response to St3ve74

This discussion is about App Store apps not working in High Sierra installations that have been recently installed. It seems to be because of an issue with app 'codesigning' validation. You should test a few of your App Store apps to make sure you have this issue. If you have this issue you will get a crash report and in the report you should see something that looks like CODESIGNING.

Nov 26, 2020 2:41 PM in response to M-Ibrahim

M-Ibrahim wrote:

Sorry for the stupid question, but what’s the difference between this solution
sudo sqlite3 /Library/Keychains/crls/valid.sqlite3 'delete from serials where hex(serial) = "04CA81F77D5E33F7"'

and replacing the database with an old one?

There are no stupid questions, just people answering stupid answers...


The first one edits the current database, removing one entry.

The second uses a database that does not contain the entry.


To answer Softmusic

Does it means that an old High Sierra install is not as safe as a fresh one ? Is it another security flaw from Apple ?

I'd have to say something is shady, as old installs should provide the same CRLs as fresh installs. Even if Apple is pushing some rogue data, the CRL data for old and new installs should be the same.


Unless we know why Apple is marking it as revoked I don't have an answer.

Nov 27, 2020 10:55 AM in response to FrancoisQC

The Automator script sounds like a great idea. We didn't have any trouble with the terminal command but if the issue comes back the script is something we can just keep somewhere handy to execute and restore functionality.


So far after running for a little over 20 hours most everything looks good. We've been poking and prodding things here and there to see if it breaks and tries to revert to the codesigning error; all good. We've also been applying updates incrementally and they do not affect the issue.


In one Finder test we deleted the edited database to move an older one into its place, but we were too slow. It recreated a new one within about a minute with the same size and we assume the same content. We left it and it's been running with it since; that surprised us.


Of the apps that still fail to start, none of the crashes seem to be codesigning errors. Most of them just put up a dialogue indicating the app is damaged and to reinstall.


Finally, with this fix applied we noticed that in the App Store all installed apps do not indicate their installed status correctly. They show a button saying 'open' but even if we install it again the button only shows 'installed' until there is a page refresh, then it's back to 'install'.


Nov 27, 2020 1:23 PM in response to GrenadeBait

By "old" database I mean the one that's broken. I think it was about 17 MB…? I don't have that computer here anymore so I can't check. I replaced that with the one provided by softmusic at https://discussions.apple.com/thread/252037712?answerId=253982289022#253982289022 which is about half the size.


I now see why you asked the question. The smaller database that works is actually the one that predates November 11. The larger broken database is the one that showed up in installs of High Sierra after that. My bad, sorry.

Nov 27, 2020 2:47 PM in response to cavenewt

Ya it's getting a little confusing with all the databases dancing around LOL

We now have three sitting in the CRLS folder that we're monitoring:

  1. valid.sqlite3-vanilla - the one that is present after a clean High Sierra install (aka the bad one :)
  2. valid.sqlite3-edit - an edited copy of the 'vanilla' Db with the fix from FrancoisQC, and
  3. valid.sqlite3 - that created itself right in front of our eyes when we deleted an active fixed Db in order to promote an old copy. Some how it's still working! It seems to have created itself either with FrancoisQC's fix or something else.

At this point we're just going to go with it.


Also, I'm not sure if this is related, but I can no longer access Apple Discussions through Safari on the fixed computer. I had to move to one of our non-High Sierra computers just to get to this discussion.


This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

App Store apps do not install properly on a fresh install of High Sierra on internal SSD or HDD

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.