Not sure why it works on AGO, but not internally.
A clue for our issue was that not all layers were throwing the error, just the map services that had sharing problems. Plus those same problem services were causing issues in the attribute table widget.
Do you get the error right away after clicking the print button? Also, check out what is happening in your browser's developer tools.
I guess I should add that we are using WAB Developers Edition. Not sure if that has any impact.