Skip to content

Failure to read property GLOBALS when using gmail.dom.email(obj) in a threaded message #450

@YesThatAllen

Description

@YesThatAllen

We've got an app that surfaces information in gmail's web-ui based on the to:/from: or a keyword in the body.

Over the past two months, I've watched it start to fail on threaded messages. The failures did not seem to coincide with changes in our tool, or changes in this repo's gmail.js. I assume it was changes in gmail.

Our tool still works fine on single emails, but fails if there is more than one email in the thread.

the failure shows as:

gmail.js:674 api.dom.email called with invalid element/id
VM4905:239 Uncaught TypeError: Cannot read property 'includes' of undefined
    at <anonymous>:239:30
    at Array.forEach (<anonymous>)
    at <anonymous>:238:23

the full failure is in this gist.

For quite some time, I was able to solve it by merging in the changes from @hitbits ' PR titled Fix issues for api.get.visible_emails

I'm not the one who built this tool, and if there's someone out there who'd rather get paid to fix this for us (and submit any needed changes to this repo) I'd be open to hearing from you.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions