Make sure QuickBooks and the Web Connector are open when doing this.
If error still occurs: Verify company file is not corrupt and clean the data if needed
The web connector will create an error because payportal does not like that corrupt data
Look at this article for reference and how to verify: https://quickbooks.intuit.com/learn-support/en-us/help-article/damaged-data/verify-rebuild-data-quickbooks-desktop/L30pINADU_US_en_US?uid=l5u4h9q9