We are having an issue with our widget loading and not getting notifications when a chat messages is sent to the user.
We are using the frontchat widget and we are loading through a script and accessing it through a custom react component. When the react component loads the “front-chat-iframe” isn’t loaded with it.
Here is our code in the react component.
if (window.FrontChat) {
window.FrontChat('onUnreadChange', unreadCount => {
this.updateNotificationCount(unreadCount);
});
}
this.openLauncher = this.openLauncher.bind(this);
We get the following error.
chat.bundle.js:2 Error: :FrontChat] Have not finished setting up FrontChatApp
at T (chat.bundle.js:2:47077)
at x (chat.bundle.js:2:46893)
at window.FrontChat (chat.bundle.js:2:46488)
at new FrontLauncher (web-bundle.js:498:332)
at constructClassInstance (react-dom.development.js:12880:18)
at updateClassComponent (react-dom.development.js:17100:5)
at beginWork (react-dom.development.js:18620:16)
at beginWork$1 (react-dom.development.js:23179:14)
at performUnitOfWork (react-dom.development.js:22154:12)
at workLoopSync (react-dom.development.js:22130:22)
at performSyncWorkOnRoot (react-dom.development.js:21756:9)
at scheduleUpdateOnFiber (react-dom.development.js:21188:7)
at updateContainer (react-dom.development.js:24373:3)
at eval (react-dom.development.js:24758:7)
at unbatchedUpdates (react-dom.development.js:21903:12)
at legacyRenderSubtreeIntoContainer (react-dom.development.js:24757:5)
at Object.render (react-dom.development.js:24840:10)
at eval (react_phoenix.js:43:27)
at NodeList.forEach (<anonymous>)
at Function.value (react_phoenix.js:35:31)
at HTMLDocument.eval (react_phoenix.js:49:16)