offsetParent is null when user applied "display: none"
When the user hide Web Chat using CSS style rules display: none;, the offsetParent become null and throw an exception. Hitting this line, History.tsx:59.
Try using the botchat-es5.js file that you get after the build
@Jake1996 This issue has nothing to do with ES6. This happens because a ref to an html element is null as the html element was not present in DOM due to display:none;
Working on a fix that is broader than we thought.
If the user hide it initally (thru display: none) and then un-hide it, since the chat component doesn't really know how big it should be, after un-hide, it think it is too narrow and not able to render the first bubble.

But after a message is sent/received, it will goes back to normal.

We need some more time to work on the size detection code.
@Kartik1607 the fix is in PR #1003.
But we still have a problem with size calculations, and that one could be one huge change:
- Our current measurement will make the screen flash
- We need measurement from time to time (we currently only do at launch)
Thus, we need to redo the measurement part by not making the screen flash. Or not doing measurement if not needed.
@compulim by hiding webchat using css, on which css selector is display none applied?
Anything on <History> (.wc-message-groups) or one of its ascendants up to <body>.
What's your scenario?
In my case, we are using the custom build of webchat in an iframe on another page something like this.
<div id="chat-frame" style="display:none;">
<iframe id="chatWindow"></iframe>
</div>
After getting user information etc, we remove the display:none from the chat-frame and send the information to the iframe.
At this point we get error at
const maxContentWidth = (this.carouselActivity.messageDiv.offsetParent as HTMLElement).offsetWidth - paddedWidth;
@Kartik1607 oh so you are hiding Web Chat until user profile is loaded?
Instead of using display: none;, how about load Web Chat on the page only after profile is loaded?