Closed AvnerCohen closed 6 months ago
I'm not able to reproduce this. Anyone else?
Thanks @josteink For checking that!
Here is what I am seeing, when stopping inside a gmail.observe.on("recipient_change", ...
break point:
Looking at the code, it seems all this is supposed to be extracted from gmail.tracker.globals
.
How does that look on your end?
Seems empty ..
If so, that might make some other things stop working too…
If anyone can find an appropriate css-selector to fall back to, I guess we could add that as a fallback?
UI changed, using the following ugly-as-hell as a workaround:
let mainObj = Array.from(document.querySelectorAll('div')).find(el => el.textContent === 'Google Account');
var email = mainObj ? mainObj.parentNode.childNodes[2].innerText : 'N/A';
I am really surprised this is only happening to me...
If that works for you... How about making it into a PR? :smile:
To be clear: I've tested it in the dev-console on my machine and it seems to work.
Yeah, but I think this (wrong) solution assume English as the gmail language, for example. Not something that is really scalable.. I am sure there are better ways to do that. But I 1st love to know if this is even happening to other people..
gmail.get.user_email() only returns undefined, it doesn't seem to work anymore, anyone with a workaround for it?
Thank you!
A short status update, based on a new duplicate bug-report.
Using the boilerplate and latest gmail.js, I've tested on three different google accounts, using Google Chrome, on Linux:
On neither of those accounts can I reproduce this issue.
If this is an issue to you, you will probably have to do the debugging yourself, and try to reverse engineer another way to obtain the email and create a PR for it.
There's not really much I can do on my end.
Thanks @josteink yeah, it's been a while :) but I eventually got to try and find out what might be going on in here.. I got stuck pretty quickly I afraid..
I see the get method: https://github.com/KartikTalwar/gmail.js/blob/master/src/gmail.js#L121
But I can't seem to find out where does this global ([10]) is ever being set...
Any suggested pointers ?
Globals are things set in the global window-namespace by Gmail itself.
We dump it, investigate it, reverse-engineer it, and put that into our code.
We never set globals ourself.
Still not able to reproduce this issue. Closing for now.
Please re-open if you still have this issue, and know how to reproduce :)
Confirming I can reproduce this issue now. I can only reproduce on a grandfathered Google Apps account, but not others Weird.
Fix published in 1.1.13.
I can't seem to get user_email or manager_email to work.
Any chance there was a UI change that caused it to break?