Unable to get property 'getElementsByTagName' of undefined or null reference

Avatar
  • updated
  • Fixed

Steps to reproduce:

  • Embed widget with chat & feedback on a page
  • At least 1 agent goes online
  • Chat tab becomes visible
  • Click chat tab

Expected Result:

Chat window opens


Actual Result:

Console error says "SCRIPT5007: Unable to get property 'getElementsByTagName' of undefined or null reference" in file widget-1.4.gz.js"


Upon cursory inspection it appears that there is a content_template for the chat widget that is not actually added to the DOM.  This causes the error above once the chat tab tries to actually load the chat interface.

How would you rate the customer service you received?

Satisfaction mark by AntonV 6 years ago

Very responsive support.

Add a comment about quality of support you received (optional):

Pinned replies
Avatar
Sergey Stukov co-founder
  • Answer
  • Under review

Hello, do you have URL with embedded widget code, so we can check and reproduce issue?

Please note that widget will not work if you will open .html file directly, it should be loaded over http protocol via webserver.

Avatar
Vladimir Mullagaliyev co-founder
  • Fixed
Avatar
Sergey Stukov co-founder
  • Under review
Quote from mandeep singh1

Hi,
I am facing the same issue and unable to resolve it yet. Please see the detail as below: Kindly help and provide the solution step by step.

We are trying to reproduce it, but widget on our dev servers and for existing customers works without such error. If you provide us with URL where widget is installed on your side it will be very helpful to find out and fix issue that causing this error.

Avatar
mandeep singh1
Quote from Sergey Stukov

Thank you for detailed response will update cookie name today, with next release of widget code.

Hi,
I am facing the same issue and unable to resolve it yet. Please see the detail as below: Kindly help and provide the solution step by step.

Avatar
Sergey Stukov co-founder
  • Fixed
Quote from AntonV

I actually figured out the issue.  It turns out that the chat widget uses a cookie called XSRF-TOKEN which happened to be the same name of a cookie we use in our own application.  I changed our app to use a different cookie name and now everything works.


However, I would recommend that you contact your colleagues at getinchat and ask them to change their cookie name to something less generic like "CHAT-XSRF-TOKEN" so that there is less chance of a collision.


Thank you, Sergey. We really enjoy using your products.

Thank you for detailed response will update cookie name today, with next release of widget code.

Avatar
AntonV

I actually figured out the issue.  It turns out that the chat widget uses a cookie called XSRF-TOKEN which happened to be the same name of a cookie we use in our own application.  I changed our app to use a different cookie name and now everything works.


However, I would recommend that you contact your colleagues at getinchat and ask them to change their cookie name to something less generic like "CHAT-XSRF-TOKEN" so that there is less chance of a collision.


Thank you, Sergey. We really enjoy using your products.

Avatar
Sergey Stukov co-founder
  • Answer
  • Under review

Hello, do you have URL with embedded widget code, so we can check and reproduce issue?

Please note that widget will not work if you will open .html file directly, it should be loaded over http protocol via webserver.