Cloudkibo / KiboPush

0 stars 1 forks source link

Cannot read property 'CHAT_MESSAGE' of undefined #10651

Closed saniasiddiqui closed 3 years ago

saniasiddiqui commented 3 years ago

Title Cannot read property 'CHAT_MESSAGE' of undefined

  1. Go to KiboChat
  2. Go to a chatbot
  3. enter some text and quick replies
  4. Trigger from messenger
  5. See error Sentry StackTrace and Sentry Link Sentry Issue: KIBOPUSH-2WY
TypeError: Cannot read property 'CHAT_MESSAGE' of undefined
  File "/root/KiboChat/server/api/global/sendWebhook.js", line 12, in null.<anonymous>
    if (webhook && webhook.optIn[type]) {
  ?, in runMicrotasks

Events: 2

Users: 0

Last Seen: 8 mins ago

First Seen: 8 mins ago

Environment: production

Server_Name: KiboChat

Page Name: Pets-Karachi

Subscriber Name: sania siddiqui

User Name: sania@cloudkibo.com

IP:

Front End or Backend End issue? backend

Additional Data image

sentry-io[bot] commented 3 years ago

Sentry issue: KIBOPUSH-2WY

sentry-io[bot] commented 3 years ago

Sentry issue: KIBOPUSH-2X6

sentry-io[bot] commented 3 years ago

Sentry issue: KIBOPUSH-2X1

arveenkumar55 commented 3 years ago

Root Cause: This was happening because we were not updating properly webhook data in webhooks.

Identify the commit and developer who is responsible for that change. (Issue number, pull request) pull request: https://github.com/Cloudkibo/KiboPush/pull/10173 issue: https://github.com/Cloudkibo/KiboPush/issues/10142

What is the way that we can ensure that this code doesn’t break again? wrote the logic to update the correct update data in webhooks

@bjafri5 please test on staging

arveenkumar55 commented 3 years ago

@bjafri5 please test on staging

bjafri5 commented 3 years ago

Tested on staging

arveenkumar55 commented 3 years ago

@bjafri5 please test on production

bjafri5 commented 3 years ago

Tested on production