davmail icon indicating copy to clipboard operation
davmail copied to clipboard

Authentication failed - Timed out waiting for interactive authentication

Open serpro69 opened this issue 3 years ago • 4 comments

Hi,

I've been using davmail for awhile now without any issues, but recently I can't get authentication window for O365. Tried updating davmail to latest 6.0.1-3390 (was on 5.5 before that) and this didn't help either. How could I debug this to figure out what the issue might be and how to solve it? Thanks

serpro69 avatar Apr 20 '22 04:04 serpro69

I was working on 6.0.1 now broken. Just tried 6.1.0 still broken. It seems possibly a java upgrade broke this? I'd also like to learn how to "debug this to figure out what the issue might be and how to solve it?" How can I try it with a different java version? Can I run it directly using java rather than from /usr/bin/davmail? Can I pass in a java path somehow? Do I need to roll back my system java version? Spin the whole thing up in a vm with a custom installed java version so I don't risk breaking my main machine?

poleguy avatar Apr 11 '23 18:04 poleguy

--help gives me a hint that it's using my system java, but doesn't help me switch it out to debug the issue.

$ which davmail /usr/bin/davmail

$ davmail --help Using system provided JRE java version "19.0.2" 2023-01-17 Java(TM) SE Runtime Environment (build 19.0.2+7-44) Java HotSpot(TM) 64-Bit Server VM (build 19.0.2+7-44, mixed mode, sharing)

poleguy avatar Apr 11 '23 18:04 poleguy

I doubt it has anything to do with your version of Java.

There were two davmail 6.1.0 releases. The second one fixed a bundling issue that resulted in some code not being included. Make sure you are using davmail-6.1.0-3423 or re-download it.

Things to try:

  1. You didn't say, but I think you're using Linux? If so, read through https://davmail.sourceforge.net/linuxsetup.html and see if any of that applies to you.
  2. Execute davmail with the -notray option.
  3. Edit your davmail.properties file to change davmail.mode to O365Manual. This usually allows you to authenticate using your web browser instead of in a davmail window. (Combine this with the -notray option, also.)
  4. Edit your davmail.properties file and change or add the following parameters:
log4j.rootLogger=ERROR
log4j.logger.httpclient.wire=ERROR
log4j.logger.org.apache.commons.httpclient=ERROR
log4j.logger.davmail=INFO
log4j.logger.org.apache.http.conn.ssl=ERROR
log4j.logger.httpclient=ERROR
log4j.logger.org.apache.http.wire=ERROR
log4j.logger.org.apache.http=ERROR
davmail.logFilePath=/path/to/your/home/directory/.davmail.log

Then, post the contents of the ~/.davmail.log file here, if you continue to have issues.

esabol avatar Apr 11 '23 21:04 esabol

I rolled my system Linux back from 19 to an earlier one. I think I updated to support my Minecraft server, so that might break. But it fixed this davmail error. I was unable to get davmail to use a specific java by changing settings file or setting environment variables. I didn't try running the jar version as some Google searches suggested.

Thanks for your help. I will try to follow up with more details as I do think this is a java 19 issue.

poleguy avatar Apr 22 '23 15:04 poleguy