Chosen Solution

The MacBook works in every way normally - boots normally, passes Apple Hardware Test with no errors, is normal to use… except it suddenly powers off, pretty much at random. This sometimes happens during booting, sometimes happens within a few minutes of starting up, and sometimes happens after a period of using it. Intense processor use, and the heat of the MacBook, seem to make no difference (at least I cannot work out a pattern). This has happened under two different versions of macOS, and using two different hard disks in the machine, and also having replace the SATA cable to the hard disk. The same happens when booting from a hard disk connected via a USB port. Also going to Console and checking the logs does not reveal much that is helpful - here are the logs from the last two times it has happened: https://pastebin.com/EJkiS5v8 When the computer suddenly powers off, a light sort of click/thud noise is heard. The MacBook will then reboot normally straight away. This looks likely to be a hardware problem (a damaged logicboard?) but any further tips would be most welcome!

Try to remove the battery, plug the charger and boot t he machine. If your problem is battery related the macbook should run ok. If the problem persist there’s probably an intermittent issue with a logic board component. The good news is that you can buy a used working motherbard for the A1342 for pretty cheap on ebay. If you have the 2,26 ghz version of the logic board buy the 2.4 ghz version fully compatible with your machine. Good luck :-)

First thing to do is check the health of the battery - eventually when the batteries get on the old side, they tend to have little issues like this and either need to be recalibrated, or replaced. These are old enough it’s usually a bad battery but it can also sometimes come back with a recalibration run long enough to get some extra time out of the battery. For Macs, you don’t charge when the machine no longer boots - the difference between Mac and PC is PCs tend to shut off while Macs go into forced suspend mode. If that doesn’t help, refresh the thermal paste. Get a tube of Artic MX-4 instead of AS5 for this laptop, since it’s not an easy job to correct a failed application and I have noticed in laptops AS5 degrades prematurely more then once, or an immediate application failure. AS5 will work, but I prefer MX-4 in laptops - even my easy to service ones.