Sivin Varghese c80de24ac1 fix: TypeError Unhandled Promise Rejection: null is not an object (evaluating 'e[Symbol.iterator]') (#10007)
# Pull Request Template

## Description

**Cause of Issue**

The problem was that the `clearSelectedState` action was being
dispatched late in the component lifecycle. By the time it was called,
child components like `ConversationBox` and `MessagesView` had already
been mounted and were trying to access data from a previous conversation
that no longer existed. This resulted in throwing error `TypeError
Unhandled Promise Rejection: null is not an object (evaluating
'e[Symbol.iterator]')` when users navigated from other screens to the
conversation view screen.

**Solution**

I added the `clearSelectedState` dispatch to the `created()` lifecycle
hook for cases where there's no `conversationId` from route props. This
ensures that the state is cleared before any child components are
mounted.


Fixes
https://chatwoot-p3.sentry.io/issues/5707937964/?project=4507182691975168

## Type of change

Please delete options that are not relevant.

- [x] Bug fix (non-breaking change which fixes an issue)

## How Has This Been Tested?

**Steps to reproduce**
1. Navigate to chat list screen and open the console.
2. Open any chat, wait to load the messages and stay in conversation
view screen.
3. Then navigate to contact or any other view from primary sidebar. 
4. Then back to chat list view. 
5. Now you can see this error in console.

**Before**

https://www.loom.com/share/193aaf1d1926479982a192dfb06a8764?sid=3f9ee000-d6a0-47cc-a49f-0050d2c64bbf

**After**

https://www.loom.com/share/3d88cfd5e7744958bc5856dd601ee6c4?sid=0e07a5d0-e461-4a1a-914b-e49f669422f5

## Checklist:

- [x] My code follows the style guidelines of this project
- [x] I have performed a self-review of my code
- [x] I have commented on my code, particularly in hard-to-understand
areas
- [ ] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my
feature works
- [x] New and existing unit tests pass locally with my changes
- [ ] Any dependent changes have been merged and published in downstream
modules
2024-08-22 16:41:42 +05:30
2019-11-25 09:48:11 +05:30
2023-05-06 10:44:52 +05:30
2024-08-19 15:53:25 -07:00
2019-08-14 15:18:44 +05:30
2019-08-14 15:18:44 +05:30
2019-08-14 15:18:44 +05:30
2024-08-05 14:02:16 +05:30
2023-08-28 19:20:35 +05:30
2023-05-06 10:44:52 +05:30
2019-10-20 14:17:26 +05:30
2019-08-14 15:18:44 +05:30
2024-02-01 15:37:05 +05:30
2024-08-19 15:53:25 -07:00
2019-08-14 15:18:44 +05:30

Chat dashboard dark mode Chat dashboard

Chatwoot

Customer engagement suite, an open-source alternative to Intercom, Zendesk, Salesforce Service Cloud etc.

Deploy Deploy to DO

Maintainability CircleCI Badge Docker Pull Badge Docker Build Badge Commits-per-month Discord uptime response time Artifact HUB

Chat dashboard dark mode Chat dashboard

Chatwoot is an open-source, self-hosted customer engagement suite. Chatwoot lets you view and manage your customer data, communicate with them irrespective of which medium they use, and re-engage them based on their profile.

Features

Chatwoot supports the following conversation channels:

  • Website: Talk to your customers using our live chat widget and make use of our SDK to identify a user and provide contextual support.
  • Facebook: Connect your Facebook pages and start replying to the direct messages to your page.
  • Instagram: Connect your Instagram profile and start replying to the direct messages.
  • Twitter: Connect your Twitter profiles and reply to direct messages or the tweets where you are mentioned.
  • Telegram: Connect your Telegram bot and reply to your customers right from a single dashboard.
  • WhatsApp: Connect your WhatsApp business account and manage the conversation in Chatwoot.
  • Line: Connect your Line account and manage the conversations in Chatwoot.
  • SMS: Connect your Twilio SMS account and reply to the SMS queries in Chatwoot.
  • API Channel: Build custom communication channels using our API channel.
  • Email: Forward all your email queries to Chatwoot and view it in our integrated dashboard.

And more.

Other features include:

  • CRM: Save all your customer information right inside Chatwoot, use contact notes to log emails, phone calls, or meeting notes.
  • Custom Attributes: Define custom attribute attributes to store information about a contact or a conversation and extend the product to match your workflow.
  • Shared multi-brand inboxes: Manage multiple brands or pages using a shared inbox.
  • Private notes: Use @mentions and private notes to communicate internally about a conversation.
  • Canned responses (Saved replies): Improve the response rate by adding saved replies for frequently asked questions.
  • Conversation Labels: Use conversation labels to create custom workflows.
  • Auto assignment: Chatwoot intelligently assigns a ticket to the agents who have access to the inbox depending on their availability and load.
  • Conversation continuity: If the user has provided an email address through the chat widget, Chatwoot will send an email to the customer under the agent name so that the user can continue the conversation over the email.
  • Multi-lingual support: Chatwoot supports 10+ languages.
  • Powerful API & Webhooks: Extend the capability of the software using Chatwoots webhooks and APIs.
  • Integrations: Chatwoot natively integrates with Slack right now. Manage your conversations in Slack without logging into the dashboard.

Documentation

Detailed documentation is available at chatwoot.com/help-center.

Translation process

The translation process for Chatwoot web and mobile app is managed at https://translate.chatwoot.com using Crowdin. Please read the translation guide for contributing to Chatwoot.

Branching model

We use the git-flow branching model. The base branch is develop. If you are looking for a stable version, please use the master or tags labelled as v1.x.x.

Deployment

Heroku one-click deploy

Deploying Chatwoot to Heroku is a breeze. It's as simple as clicking this button:

Deploy

Follow this link to understand setting the correct environment variables for the app to work with all the features. There might be breakages if you do not set the relevant environment variables.

DigitalOcean 1-Click Kubernetes deployment

Chatwoot now supports 1-Click deployment to DigitalOcean as a kubernetes app.

Deploy to DO

Other deployment options

For other supported options, checkout our deployment page.

Security

Looking to report a vulnerability? Please refer our SECURITY.md file.

Community? Questions? Support ?

If you need help or just want to hang out, come, say hi on our Discord server.

Contributors

Thanks goes to all these wonderful people:

Chatwoot © 2017-2024, Chatwoot Inc - Released under the MIT License.

Description
No description provided
Readme MIT 181 MiB
Languages
Ruby 46.1%
Vue 28.1%
JavaScript 22.9%
HTML 1.6%
SCSS 0.5%
Other 0.7%