Service Hub Onboarding

KFimreite
Member

Chat Widget / reportError.ts

I have the Chat Widget enabled on our website to load the Hubspot chat for our users. The issue I see is that when I load the hubspot chat code it throws a dozen or more javascript errors.  Is there anyway they can fix this?

Failed to load resource: the server responded with a status of 400 ()Understand this error
reportErrorAction.ts:13 Error report triggered by 'GET_SUPPLEMENTAL_INITIAL_MESSAGES_FAILED (Silent: false)
s @ reportErrorAction.ts:13Understand this error
reportError.ts:59 (Event Id: bef3608ea9e549e1b92476d5f7869f92)
Error reported with 'Request for https://app.hubspot.com/api/livechat-public/v1/bots/public/bot/4137236/welcomeMessages failed with status 400. '
p @ reportError.ts:59Understand this error
reportError.ts:63 Extra Data [componentDidCatch]: false
(anonymous) @ reportError.ts:63Understand this error
reportError.ts:63 Extra Data [actionType]: GET_SUPPLEMENTAL_INITIAL_MESSAGES_FAILED
(anonymous) @ reportError.ts:63Understand this error
reportError.ts:63 Extra Data [isGenericErrorMessage]: true
(anonymous) @ reportError.ts:63Understand this error
reportError.ts:63 Extra Data [isVisibleToUser]: true
(anonymous) @ reportError.ts:63Understand this error
reportError.ts:63 Extra Data [status]: 400
(anonymous) @ reportError.ts:63Understand this error
reportError.ts:63 Extra Data [data]: <html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
<title>Error 400 Bad Request</title>
</head>
<body><h2>HTTP ERROR 400</h2>
<p>Reason:
<pre> Bad Request</pre></p>
</body>
</html>

(anonymous) @ reportError.ts:63Understand this error
reportError.ts:63 Extra Data [headers]: /* Object, Error, or Array removed */
(anonymous) @ reportError.ts:63Understand this error
reportError.ts:63 Extra Data [xhr]: /* Object, Error, or Array removed */
(anonymous) @ reportError.ts:63Understand this error
reportError.ts:63 Extra Data [responseText]: <html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
<title>Error 400 Bad Request</title>
</head>
<body><h2>HTTP ERROR 400</h2>
<p>Reason:
<pre> Bad Request</pre></p>
</body>
</html>

(anonymous) @ reportError.ts:63Understand this error
reportError.ts:63 Extra Data [options]: /* Object, Error, or Array removed */
(anonymous) @ reportError.ts:63Understand this error
reportError.ts:63 Extra Data [message]: Request for https://app.hubspot.com/api/livechat-public/v1/bots/public/bot/4137236/welcomeMessages failed with status 400.
(anonymous) @ reportError.ts:63Understand this error
reportError.ts:63 Extra Data [_hsAdditionalProperties]: /* Object, Error, or Array removed */

0 Upvotes
7 Replies 7
jonchim
Guide | Diamond Partner
Guide | Diamond Partner

Chat Widget / reportError.ts

Thanks for the tag Kennedy! 
@KFimreite, try putting the hs tracking code script in your footer before the closing </body> tag and see if that makes a difference. My guess is a script conflict. Though this is a throwing a 404 https://app.hubspot.com/api/livechat-public/v1/bots/public/bot/4137236/welcomeMessages
Maybe something going on with the chatflow settings.






Jon Chim
VP of Design & Development
Hypha HubSpot Development


check Did my post help answer your query? Help the Community by marking it as a solution
0 Upvotes
KFimreite
Member

Chat Widget / reportError.ts

@jonchim I put it above the body tag as suggested and that did not make any difference. Still plenty of internal javascript / typescript errors.

I created the most basic of html pages for you team to test to make your life easy.
https://data.vintory.com/templates/hubspot-error.html

0 Upvotes
stefen
Key Advisor | Partner
Key Advisor | Partner

Chat Widget / reportError.ts

@KFimreite do you have a link to a page with the chat widget on it? That would be helpful to debug.

Stefen Phelps, Community Champion, Kelp Web Developer
0 Upvotes
KFimreite
Member

Chat Widget / reportError.ts

I just added the hubspot chat widget to my page:

<script type="text/javascript" id="hs-script-loader" async defer src="//js-na1.hs-scripts.com/5442952.js"></script>

Test page here: https://data.vintory.com/templates/mna-calculator.html

Found the script from the chat survey: 
https://app.hubspot.com/feedback-editor/5442952/satisfaction/3/survey

embedded the script found on this page:

https://app.hubspot.com/settings/5442952/analytics-and-tracking/tracking

0 Upvotes
kennedyp
Community Manager
Community Manager

Chat Widget / reportError.ts

Thank you for your post @KFimreite! & Welcome to the Community 😊

 

Could you clarify if this is a HubSpot page?

 

Let's invite some of our subject matter experts to the conversation. 

 

Hey @stefen, @jonchim, and @ChristinaKay1, can you help us with these javascript errors thrown when the chat widget loads on their page? 


Did you know that the Community is available in other languages?
Join regional conversations by changing your language settings !
0 Upvotes
KFimreite
Member

Chat Widget / reportError.ts

https://data.vintory.com/templates/hubspot-error.html  

Still getting the errors and now the chat isn't working.  

0 Upvotes
KFimreite
Member

Chat Widget / reportError.ts

I just added the hubspot chat widget to my page:

<script type="text/javascript" id="hs-script-loader" async defer src="//js-na1.hs-scripts.com/5442952.js"></script>

Test page here: https://data.vintory.com/templates/mna-calculator.html

Found the script from the chat survey: 
https://app.hubspot.com/feedback-editor/5442952/satisfaction/3/survey

embedded the script found on this page:

https://app.hubspot.com/settings/5442952/analytics-and-tracking/tracking

0 Upvotes