This just happened to me when trying to install the latest version of macOS Sierra public beta. The alert is followed by “Click “Show Details” to see the available updates.” and goes into an endless loop of trying to restart and the error message coming up again when you click on “Show Details.” It did not happen with my MacBook Pro or in a secondary volume in my Mac Pro, but only to the main volume.
Happily, ex3m82’s suggestion (sudo software update -i -a) worked! It alerts you to restart right away. After the restart, I went back to the App Store, and this time the update was successful. Thanks, ex3m82.
It’s funny that the thread started with the error being reported with the installation of “preview 7” and here, two years later, it’s still doing it while installing Sierra public beta version 7. What goes around comes around.