Shutdown Cause -128
Please make sure you also check your Macbook for excessive dust inside!
I have a Macbook pro which shutdown randomly (and gave the shutdown cause -128 error). When I cleaned the build up dust it started functioning normally again!
I just removed the backplate and used a can of compressed air to clean it. Check https://www.ifixit.com/Device/Mac_Laptop to see how you can remove the backplate of your model.
PS: Try not to touch any parts inside, because of static discharge
Check your memory.
From Apple Support Communities
There is also a really good procedure for testing hardware and software of your Mac on Apple's Support site https://support.apple.com/en-us/ts3742
The shutdown cause -128 is related to the hardware issues. For example it may be related to RAM, although some people suggest that it can be also related to battery time span (it surpassed the end of its life), so basically it tells you that you shouldn't re-cell this battery due to proprietary circuitry that protects the battery. Therefore you should try to plug in your Mac into a power source and check whether it helps. Then install Coconut Battery app to find out the state of your battery, if it's fine, then it could be some issue with your logic board.
Keep in mind that -128 code is a general unknown hardware error ("catch all" code), so it can be anything else. So in general you should:
- Reset the SMC and Reset NVRAM (which you did).
- Run an Apple Hardware Test.
- Log a kernel panic.
- Install EtreCheck app to find serious problems on your Mac.
- Monitor whether your laptop is not overheating (e.g. using iStat Menus).
See also: Are OS X shutdown cause and sleep cause numbers listed/explained anywhere?
Mine has been with Apple for a couple of weeks now, with this problem. They've reproduced it with a full rebuild of the software from scratch, so at least they now acknowledge it wasn't anything I was running and is hardware related.
They're suggesting most likely a logic board to correct the problem. $750 Canadian. Not sure I'm going to shell out that much on my mid-2014 MacBook Pro 15" but I'm plenty pissed about it.