Error code 12031 can be a bit annoying, as it appears when updating the QuickBooks or QuickBooks payroll service. This particular issue also appears due to network timeout that restricts the software from accessing the server. You would further encounter such an error, when the firewall or some other security issue appears.
To get a better insight into such an error, make sure to read this...