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

Dec 8, 2020 1:11 PM in response to AvoOhanian

147? Really, still not showing up for me.

And @Johnno_uk, if you haven't seen it, valid.sqlite3 has a trigger to do a delete cascade when delete an issuer:

CREATE TRIGGER group_del BEFORE DELETE ON groups FOR EACH ROW BEGIN DELETE FROM serials WHERE groupid=OLD.groupid; 
DELETE FROM hashes WHERE groupid=OLD.groupid; 
DELETE FROM issuers WHERE groupid=OLD.groupid; 
DELETE FROM dates WHERE groupid=OLD.groupid; END

Dec 8, 2020 3:14 PM in response to johnno_uk

OK this is interesting in the first plist at least version 0 to 45 are all the same version, a non incremental update.


v147 does differ from v146 in the checksum like hashes and it matches the hashcode of a new version 43

bgrep 638a03c4 ~/Downloads/v* # 638a03c4 is the start of one of the checksum hash thingys

/Users/johnno/Downloads/v147: 00000063

/Users/johnno/Downloads/v147: 000000f4

/Users/johnno/Downloads/v43-again: 000d610f # The prior version of v43 did not match


Anyhow the flags are not broken this time around:

sqlite> select groupid FROM serials where hex(serial) IN ("04CA81F77D5E33F7", "0EEB5787E79E098D");

2587

2587

sqlite> select * from groups where groupid=2587;

2587|16|1|


Looking at the source we have which is for a later version of trustd does not help much but I think the prior version tried to generate a local hash of the db and then if it gets an update with the same hash it will be skipped. The hashes may have been wrong all along and that was never fixed in the original datasets. The code we do have may just store hashes from the server in the DB and not do much more and be less clever. There is a lot about the original design of this system that is over engineered.


In the past Apple probably gave up and just started deleting lots of stuff in version 46 once they figured that they couldn't work out how to feed what they'd built correctly.


I think that now they may have actually fixed the data in the way they should have done years ago rather than using a kludge to delete rows by this time getting the hashes correct. This will make all those deletes in v46 redundant as it always should have been.


So I think there has been a bug all along in the hash generation code of the updates and they may have finally fixed it.

Dec 9, 2020 6:29 AM in response to FrancoisQC

Hmmm, I could SWEAR a while ago I came across such a file inside a framework, but now I can't seem to find it. For the **** of it I just ran the "confirmation" before killing trustd and got v.147. Hmmm, slightly different last line on my rig, maybe I should do it exactly as you documented it:


db_version|5|

db_format|3|

db_source|0|valid.apple.com

version|147|

check_again|0|??X????A

P

Dec 9, 2020 10:53 AM in response to GrenadeBait

I have the same problem, and when I sent the problem to apple feedback Assistant, they replied by this:


We reviewed your report and determined the behavior you experienced is currently functioning as intended. Your Mac needs to be able to reach ocsp.apple.com periodically in order to launch App Store apps safely. Please unlock ocsp.apple.com to restore functionality.


Thank you for your feedback.


but I have no idea how to unlock ocsp.apple.com and I asked them and they didn't reply yet, so please help if anyone know how to do it and if this is helpful.

Dec 11, 2020 7:32 AM in response to FrancoisQC

I had been experiencing this problem also, being unable to run Numbers on High Sierra. I saw a post about deleting the file /Library/Keychains/crls/valid.sqlite3 then trying again. I renamed the file instead of deleting it, then tried again to launch Numbers. It seemed to take longer than usual to launch, but launched successfully. I then starting trying all of the other programs which had similar problems, and they all started working again also.


The problem has not recurred again yet for me even across reboots.

Dec 15, 2020 8:48 AM in response to valentin1214

Safe Boot, (holding Shift key down at startup), does the problem occur in Safe Mode?


Safe mode attempts to repair Disks & clears lots of caches & loads safe Drivers, & prevents loading of 3rd party extensions, so if Safe Mode works try again in regular boot.


To find out if it's system wide or user specific, try this...


Open System Preferences>Users & Groups, unlock the lock, click on the little plus icon, make a new admin account, log out & into the new account.


Does it work in the new account?

Dec 18, 2020 7:50 AM in response to valentin1214

I did a test, re-installed from scratch High Sierra (erased HDD) from USB image downloaded from the App Store (same as I have been using since this issue started).

Install went fine, installed all security patches (2020-006), reboot & all.

Logged in to App Store, downloaded Remote Desktop and Display Menu (apps I knew were once problematic).


The outcome: all looks good and normal. Apple fixed their issue.


And as of today, they also seem to be pushing a version 148 of valid.sqlite3.


Gotta give some props to Apple for fixing this issue in a way that makes it invisible to the users. I'm sure what was posted on this thread helped them to figure out the issue and come up with a clean fix. A month and a half isn't that bad to fix an issue in an OS that is on the verge of being unsupported (but still loved!!).

Dec 18, 2020 8:31 AM in response to FrancoisQC

Honestly can't say I'm all that happy with a "stealth" fix... while I have no issue with them NOT needing to do another OS update, at least they could have been up front and TOLD us they were going to do this rather than forcing guys like you a jonny to go rooting around trying to figure out what is going on. Instead, like a 2 year old, they stuck their fingers in their ears and went "wah, wah, wah wah reinstall the os, wha, wha, wha." Which never would have worked ANYWAY because I spoke to them before this stealth shizz went down.


No, the props go to guys like you too, not to anything coming from the wormy fruit.

Dec 18, 2020 10:20 AM in response to Riverside_Guy

:-) thanks!

"wah, wah, wah wah reinstall the os, wha, wha, wha."

well, that is standard front line support verbiage.. And when you get front line support being told "my apps don't work", the standard policy is normally to say "please reinstall and try again".


You need people (like us) who can challenge this front-line support, get beyond it, and get to the experts staying in the shadow by pointing directly to what the issue is.

I have to say that John impressed me as well, that doesn't happen often (I have no modesty!!).

And anyone that contributed here can use this thread as a learning exercise. Lots of topics covered. Some people don't know what Terminal is, some don't know what SQL / SQLite is, some people don't know how to deal with plist (me!), some people don't know about PKI / certs. Lots to learn!

Dec 18, 2020 10:39 AM in response to AltaPowder

I'll as you the same question I asked to Valentin1214:


What's your "seed database" version? Open a Terminal and run this:

sqlite3 /System/Library/Security/Certificates.bundle/Contents/Resources/valid.sqlite3  "select * from admin"


What's your current DB version? Run those two commands:

ls -l /Library/Keychains/crls/valid.sqlite3
sqlite3 /Library/Keychains/crls/valid.sqlite3 "select * from admin"


Dec 18, 2020 12:20 PM in response to FrancoisQC

So sorry - my page did not refresh and I did not know you had responded until I saw an email letting me kno. Here are the sequences for the 3 different commands.


sqlite3 /System/Library/Security/Certificates.bundle/Contents/Resources/valid.sqlite3 "select * from admin"

db_version|5|

db_format|3|

version|42|

db_source|0|valid.apple.com

check_again|0|J?cK?K?A


ls -l /Library/Keychains/crls/valid.sqlite3

-rw-r--r-- 1 root wheel 17440768 Dec 18 12:14 /Library/Keychains/crls/valid.sqlite3



sqlite3 /Library/Keychains/crls/valid.sqlite3 "select * from admin"

db_version|5|

db_format|3|

db_source|0|valid.apple.com

version|148|

check_again|0|jJ???A

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.