davesteele / gnome-gmail

Integrate GMail into the Linux Desktop
https://davesteele.github.io/gnome-gmail/
GNU General Public License v2.0
50 stars 13 forks source link

After giving permission, code appears to paste in application. #33

Closed HoboPrimate closed 7 years ago

HoboPrimate commented 8 years ago

Not sure if this is because I have two-step authentication in gmail, but when launching gnome-gmail, and giving permission to it, gmail tells me "copy this code, switch to your application and paste it there"(my translation) with some code. Where would I put this code?

Thank you for making this software!

davesteele commented 8 years ago

The application is supposed to grab the information from the window you describe, and automatically close it before you get a chance to read it. There is no practical way for you to paste the information manually.

This is not likely related to two-factor authentication.

Are you able to compose emails after this?

HoboPrimate commented 8 years ago

No, Iclick a mailto: link, give permission to the application, the code appears and nothing happens. If I open directly gnome-gmail, it opens up my gmail though.

Eduardo 2016-03-28 2:25 GMT+01:00 David Steele notifications@github.com:

The application is supposed to grab the information from the window you describe, and automatically close it before you get a chance to read it. There is no practical way for you to paste the information manually.

This is not likely related to two-factor authentication.

Are you able to compose emails after this?

— You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub https://github.com/davesteele/gnome-gmail/issues/33#issuecomment-202183429

davesteele commented 8 years ago

For an Arch Linux issue that would explain this behavior, see #6.

hackerb9 commented 7 years ago

Not an Arch specific issue. I'm seeing the same bug using Ubuntu Xenial Xerus.

Timeline:

  1. Open Office: File → Send → Email as Attachment
  2. In Firefox, Google asks for permission, I click OK
  3. Google asks me to please paste the code into my application
  4. There is nowhere to paste the code and running gnome-gmail just loads up a new tab of email
  5. Eventually I get a notification from gnome-gmail: "Timeout getting OAuth"
hackerb9 commented 7 years ago

Addendum: while investigating another Gnome Gmail bug, bizarrely the OAuth worked. I'm not sure what, if anything, I did differently from the other half dozen attempts that made it work. Perhaps a clue is that Gnome Gmail then tried to close all my Firefox tabs: screenshot from 2017-01-03 06-13-10

Is it supposed to be using a sandboxed browser of some kind?

davesteele commented 7 years ago

Ok, here is what I suspect is going on. GG launches the confirmation request in a "new browser window". Once authentication is complete, Google puts the confirmation information in the title for the page. GG is scanning all X window titles, looking for that confirmation. Once it sees it, it closes the window and moves on.

If the confirmation window is actually tabbed, and the confirmation tab is not the active tab, then the window title won't have the required information, and GG won't see it. If you happen to click the tab while the scanning is active, GG succeeds, and you get the warning you included.

Sound plausible? Is the confirmation tab not the active one during the process?

davesteele commented 7 years ago

Try https://davesteele.github.io/gnome-gmail/deb/gnome-gmail_2.3-1+ppa1_all.deb.

davesteele commented 7 years ago

Also, for all, what is your environment? (i.e. Ubuntu/Unity/Firefox ...)

hackerb9 commented 7 years ago

Bug occurred using completely standard, freshly installed Ubuntu with Unity. The only thing slightly different was that this was on an iMac, but I can't see how that would affect GG.

The confirmation tab was always focused during the process, IIRC, so that should not be the issue.

hackerb9 commented 7 years ago

This Heisenbug keeps popping in and out of existence as I try to observe it. I'm not sure why, but today it is working every time I try.

Perhaps a workaround would be to have GG, instead of showing the OAuth timeout message, open a dialog box asking the user to paste in the code.

davesteele commented 7 years ago

I tried out Ubuntu 16.10. There were three bugs associated with this report. They are addressed in V2.3.1-1, in the PPA.