Closed RejownAhmed closed 8 months ago
I had similar problems. Your extension is loading too early in the DOM lifecycle. If you check the hello world example and follow how they load the extension then it would work.
Thanks for your reply. Let me check it!
Update: It's working now. For those who are facing the same issue check this repo to know how to initialize the gmail js properly: https://github.com/sripathikrishnan/gmail-sanity-checker
Hi, I am using this in one of my extensions. On first page load we get the user mail by:
However, reloading the window returns:
undefined
.Additionally, if I hard reload it's the same but clearing the cache and reloading again returns the email address perfectly.
Here's a screenshot of the pb:-