Skip to main content
Solved

Cannot read properties of undefined (reading 'success') while trying to integrate web-widget

  • November 7, 2023
  • 1 reply
  • 216 views

Omnicake
Apprentice

Hello.
I encountered a problem when integrating a web widget into my Next.js application.
I added the script to the top of the page, but when I try to load it I get an error:

fd-messaging.61110ffdb17f21cb83e2.js:1 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'success')

Which refers to the internal code of the widget. Please tell me what could be the reason for the error?

Best answer by srikanthkarunakaran

Hi there,

Srikanth here from FreshChat support.

Could you please try the updating the script from  window.fcSettings to window.fcWidgetMessengerConfig?

If still doesnt work, could you please share the complete widget script to troubleshoot the error?

For future reference please use this developer document: https://developers.freshchat.com/web-sdk/v2/#user-identification for widget related queries.

Thank you.

View original
Did this topic help you find an answer to your question?

1 reply

srikanthkarunakaran
Community Manager
Forum|alt.badge.img+6

Hi there,

Srikanth here from FreshChat support.

Could you please try the updating the script from  window.fcSettings to window.fcWidgetMessengerConfig?

If still doesnt work, could you please share the complete widget script to troubleshoot the error?

For future reference please use this developer document: https://developers.freshchat.com/web-sdk/v2/#user-identification for widget related queries.

Thank you.


Reply