offsetwidth error when loading the iframe containing the custom ui on another domain
botchat.js:sourcemap:12905 Uncaught TypeError: Cannot read property 'offsetWidth' of null
at HistoryView.componentDidUpdate (botchat.js:sourcemap:12905)
at commitLifeCycles (botchat.js:sourcemap:31662)
at commitAllLifeCycles (botchat.js:sourcemap:33325)
at HTMLUnknownElement.callCallback (botchat.js:sourcemap:21990)
at Object.invokeGuardedCallbackDev (botchat.js:sourcemap:22028)
at invokeGuardedCallback (botchat.js:sourcemap:22077)
at commitRoot (botchat.js:sourcemap:33464)
at completeRoot (botchat.js:sourcemap:34361)
at performWorkOnRoot (botchat.js:sourcemap:34311)
at performWork (botchat.js:sourcemap:34229)
HistoryView.componentDidUpdate @ botchat.js:sourcemap:12905
commitLifeCycles @ botchat.js:sourcemap:31662
commitAllLifeCycles @ botchat.js:sourcemap:33325
callCallback @ botchat.js:sourcemap:21990
invokeGuardedCallbackDev @ botchat.js:sourcemap:22028
invokeGuardedCallback @ botchat.js:sourcemap:22077
commitRoot @ botchat.js:sourcemap:33464
completeRoot @ botchat.js:sourcemap:34361
performWorkOnRoot @ botchat.js:sourcemap:34311
performWork @ botchat.js:sourcemap:34229
performSyncWork @ botchat.js:sourcemap:34206
requestWork @ botchat.js:sourcemap:34106
scheduleWorkImpl @ botchat.js:sourcemap:33981
scheduleWork @ botchat.js:sourcemap:33941
scheduleRootUpdate @ botchat.js:sourcemap:34569
updateContainerAtExpirationTime @ botchat.js:sourcemap:34597
updateContainer @ botchat.js:sourcemap:34616
ReactRoot.render @ botchat.js:sourcemap:37916
(anonymous) @ botchat.js:sourcemap:38335
unbatchedUpdates @ botchat.js:sourcemap:34416
legacyRenderSubtreeIntoContainer @ botchat.js:sourcemap:38331
render @ botchat.js:sourcemap:38399
exports.App @ botchat.js:sourcemap:8594
(anonymous) @ direct:57
botchat.js:sourcemap:31513 The above error occurred in the
Consider adding an error boundary to your tree to customize error handling behavior. Visit https://fb.me/react-error-boundaries to learn more about error boundaries. logCapturedError @ botchat.js:sourcemap:31513 botchat.js:sourcemap:12905 Uncaught TypeError: Cannot read property 'offsetWidth' of null at HistoryView.componentDidUpdate (botchat.js:sourcemap:12905) at commitLifeCycles (botchat.js:sourcemap:31662) at commitAllLifeCycles (botchat.js:sourcemap:33325) at HTMLUnknownElement.callCallback (botchat.js:sourcemap:21990) at Object.invokeGuardedCallbackDev (botchat.js:sourcemap:22028) at invokeGuardedCallback (botchat.js:sourcemap:22077) at commitRoot (botchat.js:sourcemap:33464) at completeRoot (botchat.js:sourcemap:34361) at performWorkOnRoot (botchat.js:sourcemap:34311) at performWork (botchat.js:sourcemap:34229)
This happens when the bot has a custom ui and is deployed through an iframe on another site. The site is an AEM based site
Got the solution. Had to use the botchat-es5.js file