Getting error code -128 on a late-2015 iMac
The precise meaning of the shutdown cause codes is not publicly documented, so linked error about userCanceledErr isn't correct, as these are different list of codes.

The shutdown cause -128 in general is related to the unknown hardware issue (e.g. RAM). If it happens repeatedly, you should take it to the repair.

See also:


Shutdown Cause -128
Are OS X shutdown cause and sleep cause numbers listed/explained anywhere?