Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issues with O365Interactive protocol #7

Closed
Ri0n opened this issue Nov 21, 2018 · 18 comments
Closed

Issues with O365Interactive protocol #7

Ri0n opened this issue Nov 21, 2018 · 18 comments

Comments

@Ri0n
Copy link

Ri0n commented Nov 21, 2018

Hi

Unhappy davmail user here with Linux system (Kubuntu 18.04)

I just tried it and it doesn't work. I tried 4.9.0-trunk-1.deb and 5.0.0 deb. Both have the same problem.

  1. As soon as pass authentication and 2fa confirmation from my phone nothing more happens. My thunderbird keeps rotating login icon but nothing new in davmail logs except consequent login attempts from TB with some delay.

  2. 2FA window doesn't disappear but it's wiped out. I just see empty window. it's strange

  3. If I close this empty 2FA window it's immediately auto-opens again in the same empty state. But I can close it again and then it's kept closed.

  4. If I cancel login in Thunderbird and try to login again, davmail doesn't load 2FA form anymore, but open this empty window. To fix this I have to restart davmail

  5. If after such an unsuccessful login attempt I'll try to click on davmail tray icon it can crash or sometimes it somehow locks any X11 activity so I have to switch to raw keyboard mode then to terminal and them restart sddm.

  6. davmail crashes immediately if after successfull 2FA confirmation I try to connect with telnet on IMAP port in parallel with Thunderbird.

Thanks for the great work!

@Ri0n
Copy link
Author

Ri0n commented Nov 22, 2018

console output on tray click crash

[xcb] Unknown request in queue while dequeuing
[xcb] Most likely this is a multi-threaded client and XInitThreads has not been called
[xcb] Aborting, sorry about that.
java: ../../src/xcb_io.c:165: dequeue_pending_request: Assertion `!xcb_xlib_unknown_req_in_deq' failed.
Aborted (core dumped)

I also noticed a few gtk warnings/errors above. but after installing gnome themes they disappeared. But now I have this in terminal

Exception in thread "JavaFX Application Thread" Exception in thread "JavaFX Application Thread" Exception in thread "JavaFX Application Thread" Exception in thread "JavaFX Application Thread" Exception in thread "JavaFX Application Thread" Exception in thread "JavaFX Application Thread" Exception in thread "JavaFX Application Thread" Exception in thread "JavaFX Application Thread" Exception in thread "JavaFX Application Thread" Exception in thread "JavaFX Application Thread" Exception in thread "JavaFX Application Thread" Exception in thread "JavaFX Application Thread" Exception in thread "JavaFX Application Thread" Exception in thread "JavaFX Application Thread" Exception in thread "JavaFX Application Thread" Exception in thread "JavaFX Application Thread" Exception in thread "JavaFX Application Thread" Exception in thread "JavaFX Application Thread" Exception in thread "JavaFX Application Thread" Exception in thread "JavaFX Application Thread" Exception in thread "JavaFX Application Thread" Exception in thread "JavaFX Application Thread" Exception in thread "JavaFX Application Thread" Exception in thread "JavaFX Application Thread" Exception in thread "JavaFX Application Thread" Exception in thread "JavaFX Application Thread" Exception in thread "JavaFX Application Thread" Exception in thread "JavaFX Application Thread" Exception in thread "JavaFX Application Thread" Exception in thread "JavaFX Application Thread"

OpenJDK as mentioned in the documentation doesn't support 0365Interactive. So no luck at all.

@Ri0n
Copy link
Author

Ri0n commented Nov 22, 2018

I just tried with OpenJDK 8 and it works much better. I still have very frequent Exception in thread "JavaFX Application Thread" in the terminal but instead of white 2FA window after confirmation I now get "Grant davmail access" window.

After granting access to davmail it was able to read folders from server and probably started syncing emails but crashed somewhere in the middle.

Attempt to unlock mutex that was not locked
Aborted (core dumped)

Anyway it's a good progress.

@Ri0n
Copy link
Author

Ri0n commented Nov 22, 2018

I just tried davmail_4.9.0-trunk-1_all.deb. I don't know who built it and from what commit but it doesn't crash like 5.0.0 on mail sync.

@Ri0n
Copy link
Author

Ri0n commented Nov 22, 2018

Well there are problems with 4.9.0-trunk.

  1. tray menu doesn't work after login
  2. On second 2FA request (for example I have not just email) browser window is empty.

@Ri0n
Copy link
Author

Ri0n commented Nov 22, 2018

Calendar setup from thunderbird fails if initially I entered just username instead of username@domain in username window. This window never pops up again if I try to reregister calendar.
It just reports after 2FA that username doesn't match with username@domain.

@mguessan
Copy link
Owner

Well, its not great if it does not work...

Anyway, the first step is to remove SWT from classpath, it's definitely incompatible with JavaFX used by interactive O365 authenticator, or run DavMail without tray icon:
davmail -notray

Can you please check this and provide an updated report ?

@Ri0n
Copy link
Author

Ri0n commented Nov 22, 2018

I just tried 4.9.0-trunk with davmail -notray. I still see empty 2FA window if before I passed 2FA for something else. (In this case I'm trying to use calendar when already authenticated to mail). So basically nothing changed except the tray icon which is now replaced with "DavMail Gateway" status window.

I'll provide more test results tomorrow. It's quite late here already.

@mguessan
Copy link
Owner

Working fine here with 5.0.0 under Ubuntu 18 with Thunderbird 60.2.1 and xul-ext-lightning.

The "authentication window does not open more than once" issue was fixed lately, just before 5.0.0 release.

@Ri0n
Copy link
Author

Ri0n commented Nov 23, 2018

Installed 5.0.0. Now it opens more than once and doesn't crash with -notray.
But still with calendars this windows popup every time I try to sync. And after the sync my lighting is empty while via web I see a lot of stuff there.
Calendar was added according to this doc http://davmail.sourceforge.net/thunderbirdcalendarsetup.html

btw the popped up window for calendar is kind of different. Every time it asks me what MS account to use, but not the one with "send push to phone".

In the davmail window I still see

DavMail configuration exception:
Connect exception: java.io.IOException Authenticated username MyName@epam.com does not match myname

I tried to grep in ~/.thunderbird to understand why it comes without domain but found nothing.


I can also confirm it does't crash without swt.


It also doesn't crash anymore on parallel telnet connection or somewhere in the middle of mail sync.


neither has it problem with tray menu. It looks different without swt but always works and doesn't crash the application.

@mguessan
Copy link
Owner

Ok, you just need to configure your calendar with your email as username: this is the real principal for Office 365.
I guess you have an ADFS tenant => you windows username is just used for authentication.

@Ri0n
Copy link
Author

Ri0n commented Nov 23, 2018

Unfortunately thunderbird's calendar settings do not have username field. just email is there.

@mguessan
Copy link
Owner

You probably have the username in stored credentials => please clear it (under Tools/Options/Security/Passwords)
=> You will then get the username/password prompt, use your email as username and anything as password (not used)

@Ri0n
Copy link
Author

Ri0n commented Nov 23, 2018

Thanks it worked. First I tried to change username there but it didn't help, after removing it requested creds again and finally authenticated.
What I don't understand why Thunderbird doesn't show auth dialog on auth failure.

But calendar works! I have all my calendar events now :-)

@mguessan
Copy link
Owner

Thanks for your feedback => closing issue

@Ri0n
Copy link
Author

Ri0n commented Nov 23, 2018

Ok in the rest we have.

  1. it would be nice if davmail checked versions of libs/jdks/etc and reported about possible failures with suggestions.
  2. probably thunderbird doesn't receive auth failure from davmail. That's why it doesn't rerequest credentials.

@Ri0n
Copy link
Author

Ri0n commented Nov 26, 2018

I'll put the above to another issue to not be lost.

@Ri0n
Copy link
Author

Ri0n commented Nov 26, 2018

Does 2160eb1 solve the p.2 from my comment above?

@mguessan
Copy link
Owner

Indeed :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants