I have a late 2013 27" iMac i7, 8GB RAM, 500GB SSD, running the laster version of Sierra 10.12.4 (I think) Two days ago I suddenly got the spinning beachball while browsing in Safari. However, after a few seconds it just froze completely - the first time ever! I had to hold down the power button to shut it down. I restarted and then a few hours later it happened again. I shut it down again but this time it would not start. Nothing happened when I pressed the power button. I tried a SMC reset and it started so I ran disk utility. There were a couple of minor permissions errors, which were fixed but then it froze again. After 2-3mins A black screen appeared saying there was a problem and the computer had to be shut down, which it did by itself.
From that moment, it's gotten worse. Now it won't start properly at all. I press the power button and nothing happens, then maybe 3-4 mins later it starts and I get the flashing folder.
I tried starting in safe mode, recovery mode and also from a Disk Warrior start-up USB drive but when I run disk utility I don't see the hard drive, only disk0 > OS X Base System.
I thought it might just be the SSD but why would it be so difficult to power on from safe mode, recovery or the Disk Warrior USB drive? Do I have a power issue, an SSD issue or both?
Additional Information: As requested, I tried to run tests holding down Option + "D". As before, it was very reluctant to power on at all. Pressing the power button did nothing. I pressed it a couple more times and then suddenly about 3mins later I got the startup bong. I immediately hit option+d and it started the diagnostics. I then got a black screen with the following message:
There may be an issue with a storage device. Ref Code: VDH002 ...followed by instructions to contact Apple.
I also took it to an Apple service centre today and the engineer confirmed that the main hard drive was not appearing, so it does look like the SSD has failed, but why does it have so much trouble starting up? Why doesn't the power button work properly?