question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Open email observer is only firing once

See original GitHub issue

The open email observer is only fired once.

gmail.observe.on("open_email", function(id, url, body, xhr) {
  console.log("id:", id, "url:", url, 'body', body, 'xhr', xhr);
  console.log(gmail.get.email_data(id));
})

When running the following observer, it is only fired once when an email is opened, and will not fire again on subsequent openings of the same email. Any reason why and how to fix it?

Thanks

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:1
  • Comments:5

github_iconTop GitHub Comments

1reaction
josteinkcommented, Jun 2, 2021

Hey there and thanks for reporting!

I’m honestly not sure, but it might be the same phenomena we’re seeing with the view_email event, which is documented:

https://github.com/KartikTalwar/gmail.js#gmailobserveonaction-callback

If that’s how open_email works too now (gmail keeps changing, after all), it might be a good idea to update the documentation with that information too.

If you want to look into why this happens and try to create a fix, I’m open to reviewing that, but I won’t be investigating that myself, as I don’t rely on that event for any of my production-extensions.

Read more comments on GitHub >

github_iconTop Results From Across the Web

intersectionObserver only fires once - Stack Overflow
I'm attempting to use the new Intersection Observer API, but I can only get to fire its event just once. I believe I'm...
Read more >
FM 6-30 Chapter 4 Call For Fire - GlobalSecurity.org
A call for fire (CFF) is a concise message prepared by the observer. ... If fuze quick is desired or if a projectile...
Read more >
The Mission this Veteran's Day: To Leave No One Behind
The problem of veterans' homelessness is no one person's fault – and, yet, it is everyone's responsibility.
Read more >
Emily Dickinson | Poetry Foundation
Emily Dickinson is one of America's greatest and most original poets of all ... like those in Brontë's and Browning's works, are sharp-sighted...
Read more >
Read and Write Data on Apple platforms - Firebase - Google
If you need the data only once, you can use getData() to get a snapshot of the data from the database. If for...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found