0
Under review

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

AntonV 6 months ago in Widgets • updated by Sergey Stukov (co-founder) 2 months ago 5

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.

Answer

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.

GOOD, I'M SATISFIED

Very responsive support.

Satisfaction mark by AntonV 5 months ago
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.

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.

Fixed

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.

Under review

We 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.