Error connecting to QuickBooks: Authentication Failed / Response is not well formed XML / Receive Response XML Failed

Learn how to troubleshoot errors with QuickBooks authentication and XML responses to fix connection issues.

Written by the MyWorks Team

Updated at June 30th, 2023

Are you getting the below error message when attempting to run the Web Connector in QuickBooks Desktop using MyWorks Sync?


Message can contain: QBWC1012, QBWC1041, QBWC1042 ReceiveResponseXML "Authentication failed due to the following message: Response is not well formed XML"

More Information

This typically means that there is at least one blank line that's being added to the top of your site's output - and is also being included in responses to the Web Connector, causing it to fail.

In the rare cases we see this, it can be caused by a runaway/unintentional blank line after a PHP closing tag in custom code on your site.

Solutions to Resolve

Firewall / Security Rule 

One possible culprit here can be a firewall or security rule on your website/server that's blocking the connection from the QuickBooks Web Connector.

Your web developer can be helpful in identifying and correctly whitelisting the offending rule here. Our support team is also happy to participate and guide a resolution here.

In cases like this, there will normally be a 403 Forbidden, 504 Timeout, or 500 Internal Server error message in your Web Connector Log that further confirms this block is occurring. Using Dreamhost? The 500 Internal Server error message indicates there's a rule in their mod_security that's causing this connection to be blocked. 

Issues like this can normally be easily resolved by reaching out to your web developer or hosting support with the following message:

Example message to your developer/hosting support

Hi there,

I'm attempting to connect to my site with a QuickBooks application on my computer, but it's failing with a {500 Internal Server} error being returned from my site. Checking this further, this seems to be caused by a firewall /security rule like mod_security on the hosting/server level.

Are you able to review and whitelist this connection in on your end? These connections are coming from IP address of my QuickBooks Computer, which is:

(you can find the IP address of your QuickBooks computer by visiting on that computer.)



PHP error on your site

Another possible reason for this error can be a PHP error occurring on your site. This can normally be found in WooCommerce > Status > Logs, and would further point to the source of the issue causing this error. Once resolved, the connection should be successful.


Blank Line in the top of your site's output

Your site may be adding a blank extra line (or more) to the head of the site output. This can be verified in your site code or by contacting our support for additional help.

Steps to troubleshoot/resolve this:

  • Relaying this information to your web developer, as it is usually simple for them to either review custom theme/plugin code on your site to remove blank lines after a PHP closing tag - and/or disable/enable plugins or themes temporarily to identify the culprit - so it's not present in your site response, and thus in our web service URL.
  • Temporarily disabling plugins / themes one by one until the blank line(s) in our web service URL disappear - which helps locate the cause of these additional lines being added to the output of your site.
  • If your web developer has difficulty locating the code on your site causing this issue, we'd be happy to help take a closer look as a courtesy via support ticket in your account with us.