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.

gmail.get.email_data failing for some reason

See original GitHub issue

I believe I found a bug but want to make sure my code is correct.

gmail.observe.on('view_thread', () => {
  const emailData = gmail.get.email_data()
  console.log(`${emailData}`)
})

Based on the documentation I believe that when I click an email thread, emailData should return an object which contains data about the email.

When I click an email thread the code executes at the proper time. Unfortunately I get the following in the console. The GET seems to be receiving an undefined param which results in an erroneous response format. The behavior is the same even if I move lines 2-3 out of the observer.

screen shot 2018-03-05 at 10 44 14 am

Issue Analytics

  • State:open
  • Created 6 years ago
  • Comments:11

github_iconTop GitHub Comments

2reactions
o-x-y-g-e-ncommented, Mar 14, 2018

I had the same error. Just Update your gmail.js file.

1reaction
josteinkcommented, Jan 31, 2019

As discussed to great lengths in a previous issue, google has effectively obsoleted all XHR-based APIs we’ve used in the past. This particularly includes anything related to gmail.get.email_data().

Now it’s 2019 and it should be considered fundamentally broken.

Consider replacing all use of gmail.get.email_data() with gmail.new.get.email_data().

Please note data-format differs, it has some limitations and it’s not a simple drop-in replacement.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Gmail won't load - Gmail Help - Google Support
If Gmail is slow or isn't loading correctly, use the steps below to fix the problem. Step 1: Check that you're using a...
Read more >
Why is My Gmail Not Receiving Emails? - RightInbox
Gmail not receiving emails? It's more common then you think. Thankfully there is more often than not a quick fix. Here's some of...
Read more >
api.new.get.email_data is giving null. · Issue #558 - GitHub
Earlier I was using api.get.email_data to get email data. ... I specifically see in the README that Gmail-js is not working as a ......
Read more >
Gmail Attachment Failed: 4 Easy Methods to Fix This Issue
Easy steps to get the Gmail attachment working again · Why is my attachment failing in Gmail? · How can I fix Gmail...
Read more >
Common Gmail Problems and How to Solve Them - Mailbird
... because Gmail's not working? See some simple ways of solving the most common Gmail issues. ... Other Reasons Why Gmail Is Not...
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