I had the same problem here, regarding the function checkMessagesCount().
What happens is that the variable "tag" is null when the evaluate() function doesn't find what it's looking for. Then, the following line will raise an exception:
if (tag.textContent != 'Gmail' && tag.textContent != 'Mail') {
I had the same problem here, regarding the function checkMessagesCo unt().
What happens is that the variable "tag" is null when the evaluate() function doesn't find what it's looking for. Then, the following line will raise an exception:
if (tag.textContent != 'Gmail' && tag.textContent != 'Mail') {
I changed to:
if (tag != null && tag.textContent != 'Gmail' && tag.textContent != 'Mail') {
Now the GMail integration is working for me!