0
Fixed

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

AntonV 2 months ago in Widgets • updated by Sergey Stukov (co-founder) 1 month ago 3

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 1 month 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.