I had this problem, too - black screen, fan spins up, keyboard lit, 5-15 seconds of that, then shutoff. I called support, talked at length, brought it to them, they replaced the battery, wiped and created a new user, and found...nothing.
I brought it home, it kept doing the thing. I took it back, they checked for anything, wiped, gave it back. They still hadn't found anything. I brought it home, it did the thing. I took it back, they did the same thing. I took it back.
I noticed a thread that was similar - not the exact problems, but seemed like my problems, and they (superstitiously, I think) decided it was a power-cord-frayed issue. I examined my two power cords (both 7 years old - Macbook Pro late 2013), and they weren't in the best shape. I replaced my power cords, and my computer has done the shutdown thing 4 times since April - used to be 0-5 times per day, 30 times per week.
I'm not sure if it was the battery replacement at the Apple Store, and it just took a while for my computer to stop freaking out about a seven year old battery, or my superstition about getting new wall worts, or if the bug was fixed with the updates (I'm current), but it only happens once a month now (crossing my fingers).
I brought it home, it kept doing the thing. I took it back, they checked for anything, wiped, gave it back. They still hadn't found anything. I brought it home, it did the thing. I took it back, they did the same thing. I took it back.
I noticed a thread that was similar - not the exact problems, but seemed like my problems, and they (superstitiously, I think) decided it was a power-cord-frayed issue. I examined my two power cords (both 7 years old - Macbook Pro late 2013), and they weren't in the best shape. I replaced my power cords, and my computer has done the shutdown thing 4 times since April - used to be 0-5 times per day, 30 times per week.
I'm not sure if it was the battery replacement at the Apple Store, and it just took a while for my computer to stop freaking out about a seven year old battery, or my superstition about getting new wall worts, or if the bug was fixed with the updates (I'm current), but it only happens once a month now (crossing my fingers).