Question

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

  • 7 November 2023
  • 1 reply
  • 116 views

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?


1 reply

Userlevel 1
Badge

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