Erro in HubSpotConversations.widget.load(); on 'EventTarget': parameter 1 is not of type 'Event'

matheusmurta
Participant

I would like to have support for the error that is occurring on my console to call the hubspot chat function.

 

 

 

 

These were my steps:

 

1. insert the script into my application

 

 

2. I make a script that sets the startup options: Note: I noticed that an expected object "reason" even informed and recognized by the function as undefined.

 

window.hsConversationsSettings = {
loadImmediately: false
};

3.I make the user identification. 

var _hsq = window._hsq = window._hsq || [];

_hsq.push(["identify",{
email: user.email,
firstname: user.name
}]);

4. Clicking on a button will load the chat

if (window.HubSpotConversations) {
window.HubSpotConversations.widget.load({ widgetOpen: false });
}

 

In the Google Chrome console, the error was triggered:

 

 

events.js:25 Uncaught TypeError: Failed to execute 'dispatchEvent' on 'EventTarget': parameter 1 is not of type 'Event'.
    at o (events.js:25)
    at Object.messagesInitialized (events.js:33)
    at WidgetShell.js:548
    at XMLHttpRequest.<anonymous> (fetchWidgetData.js:60)

 

 

How can I resolve this error?

 

 

 

 

0 Upvotes
1 Reply 1
Derek_Gervais
HubSpot Employee

Hey @matheusmurta ,

 

Can you link to an example page where you;re seeing this error? I'm not able to reproduce this error on my own pages.

0 Upvotes