Error "Initial messages API call failed"


We found error in Javascript like this in Chrome Developer Tools

2166894.js:formatted:186 GET…e42af092ecf7cc47dbccb61cb14d76&hubspotUtk=71e42af092ecf7cc47dbccb61cb14d76 404 (Not Found)

2166894.js:formatted:182 Initial messages API call failed

We have put all the script with Hubspot analytic script

    (function(d,s,i,r) {
      if (d.getElementById(i)){return;}
      var n=d.createElement(s),e=d.getElementsByTagName(s)[0];;n.src='//'+(Math.ceil(new Date()/r)*r)+'/2166894.js';
      e.parentNode.insertBefore(n, e);


Hi @jev,

The 404 error here means that the cookie in the browser where you are seeing that is not attached to any known contact and you have restricted the message to show to known contacts only. If you were to fill out a form (thereby attaching your cookie to a contact record) you would see that request get a 200 OK back and the messages widget would display.

Let me know if you have any questions.



Thx @zwolfson for your reply. It this just Warning (Not Error)? will this affecting the hubspot tracking?


While it is an error saying that the contact that it’s looking for doesn’t exist (hence the 404 status) it will not affect the HubSpot tracking.



I’m encountering the same error after implementing the hubspot tracking script. Is there a way to remove this error message by changing hubspot api/account settings?




we have the same error. Its a wordpress installation with woocommerce hubspot for wordpress(the plugin from hubspot) and hubspot for gravity forms. How can we resolve this error?



We are having the same issues on and a few other of our brochure sites it did fix itself for a bit of time but it has come back. It work for a month with no issues.


Hi @jonasva, @Oecsike, and @rybowden,

This is the expected behavior when the Messages settings are configured to only show the message to a known contact or a member of a specific list and an unknown visitor is on the site. If you are seeing the 404 response for what should be a known contact or you have different settings selected in Messages, let us know because that may be an issue.



same problem here:

Initial messages API call failed messageswidgetshell.js:1:1654
XML Parsing Error: no root element found
Line Number 1, Column 1:


@zwolfson I don’t know what you mean, the only thing we have on the page is the tracking code, Surely that should not throw errors?



i don’t change anything, i only installed the plugin and that’s it. but no matter what i tried, two plugins and the tracking code self and all 3 ways threw an error. but that can’t be normal?!


Hey Everyone,

The development team is actively working on this use case. I’ll update this thread here when this behavior is changed.



Hey Everyone,

This should now be resolved. Please update us here if that’s not the case for anyone.


Script error windows