Screenshots

Version
R12 candidate
Describe the bug
When using webchat*.js, it load React 16.8.6 internally.
When rendering attachments with error, such as the unknown attachment command, we didn't catch that exception in <ErrorBoundary>. Thus the uncaught exception bubble up to React and triggered a bug in React, causing hooks to collapse catastrophically.
It was fixed in React 16.11 (or lower). Instead of bumping React, we prefer to keep the internal React to 16.8.6.
Like other middleware, we should use <ErrorBoundary> (or the friendlier <UserlandBoundary>) to wrap around components that have potential to break Web Chat.
This issue should have caught earlier, but we missed a test for unknown attachment command.
Steps to reproduce
- Use
webchat*.js to load Web Chat
- Talk to MockBot
- Type
unknown attachment
Expected behavior
It should show a red box or console error in production mode. Or a red box in development mode.
Additional context
[Bug]
Screenshots
Version
R12 candidate
Describe the bug
When using
webchat*.js, it load React 16.8.6 internally.When rendering attachments with error, such as the
unknown attachmentcommand, we didn't catch that exception in<ErrorBoundary>. Thus the uncaught exception bubble up to React and triggered a bug in React, causing hooks to collapse catastrophically.It was fixed in React 16.11 (or lower). Instead of bumping React, we prefer to keep the internal React to 16.8.6.
Like other middleware, we should use
<ErrorBoundary>(or the friendlier<UserlandBoundary>) to wrap around components that have potential to break Web Chat.This issue should have caught earlier, but we missed a test for
unknown attachmentcommand.Steps to reproduce
webchat*.jsto load Web Chatunknown attachmentExpected behavior
It should show a red box or console error in production mode. Or a red box in development mode.
Additional context
[Bug]