Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1196765 - A short while after working in EWS, Authentication Failed message appears.
Summary: A short while after working in EWS, Authentication Failed message appears.
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: evolution-ews
Version: 21
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Milan Crha
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-02-26 16:50 UTC by Louis van Dyk
Modified: 2016-01-12 20:07 UTC (History)
4 users (show)

Fixed In Version: libsoup-2.48.1-2.fc21
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-03-22 04:41:18 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
EWS_DEBUG=2 evolution (696.90 KB, text/plain)
2015-02-26 16:50 UTC, Louis van Dyk
no flags Details
EWS_DEBUG=2 evolution &>log.txt (1.23 MB, text/plain)
2015-03-02 15:48 UTC, Louis van Dyk
no flags Details
log.txt, generated by EWS_DEBUG=2; evolution & >/tmp/log.txt (1.09 MB, text/plain)
2015-03-02 20:00 UTC, Mladen Gogala
no flags Details


Links
System ID Private Priority Status Summary Last Updated
GNOME Bugzilla 735197 0 None None None Never

Description Louis van Dyk 2015-02-26 16:50:24 UTC
Created attachment 995696 [details]
EWS_DEBUG=2 evolution

Description of problem:

I've just upgraded using fedup from F20 to F21.  When reading mails and trying to send replies, I notice that when I first sign in, all is well, but after a short period (like say I was writing an email), when I try to send it I get the error:
An error occurred while sending. How do you want to proceed?
The reported error was "Authentication failed".

Sometimes, it won't connect at all and times out at the start.

On F20 there was a similar problem which Dan fixed in libsoup. Bug 1088458.

Version-Release number of selected component (if applicable):
evolution-3.12.11-1.fc21.x86_64
evolution-data-server-3.12.11-1.fc21.x86_64
evolution-ews-3.12.11-1.fc21.x86_64
evolution-help-3.12.11-1.fc21.noarch
libsoup-2.48.1-1.fc21.x86_64


How reproducible:
It does it every time I try.


Steps to Reproduce:
run killev to clear out the running evolution if necessary.
wait a bit.
open evolution.
IF it doesn't time out then, you can immediately send a message.
wait a few minutes (say 5) doing nothing.
try to send another message, and the error occurs.


Actual results:
timeout or invalid password messages appear in the log.
"Authentication Failed" pop-up message appears.


Expected results:
It should send the message as it did the first one.


Additional info:
Including the output of EWS_DEBUG=2.
As mentioned, this seems similar to Bug 1088458

Comment 1 Milan Crha 2015-02-27 09:47:23 UTC
Thanks for a bug report. I tried to reproduce this, but no luck, my server doesn't suffer of this issue. I waited for more than 5 minutes while doing other stuff in the Evolution, only not touching EWS mail.

Comment 2 Louis van Dyk 2015-02-27 12:23:37 UTC
Typical!  :D

First, thanks for your time in assisting me. Is there anything I can do for you to help you diagnose further?  It has done it with me this morning again.

I have an IMAPX and EWS account set up.  I can see when it fails on the two bidirectional arrows next to the account names.  The IMAP account's remains normal, but the EWS account has a little red circle next to the arrows.

Similarly, I opened a meeting request that had been mailed to me, and wanted to send a "Decline", however, I get the error:
Found the appointment in the calendar 'Calendar'
Unable to send item to calendar 'Calendar'. Cannot receive calendar objects: Authentication failed

The bidirectinoal arrow now has a small cross (x) at the bottom right of the arrows.  I clicked open Calendar, which it did.  Then I closed the Calendar and the invite message I was declining.  Now the bidirectional arrows have a small red circle at the bottom right -- like a "no entry" traffic sign.

Now, in this state, it seems strange, but I can open and read any message, even with the red "no entry" sign present.  However, I cannot SEND any new message, or reply to an existing one.  I also cannot save the message I have spent time composing to Draft because I get the error:
An error occurred while saving to your Drafts folder.
The reported error was "Invalid password for myemailaddress@mydomain".  The message has most likely not been saved.

Fortunately, I have just discovered that I can save the message to my Outbox on my local PC.  I then quit Evolution and reopen it, go to my Outbox and tell it to Flush.  Then the message sends.

But this is a painful way of working!

So please let me know anything I can do to help fix this!

Comment 3 Milan Crha 2015-03-02 14:27:19 UTC
I think (and hope) the communication log between the server and the client will provide the information what happened to the connection. As you see the differences in the folder tree, I'd guess that there was done some connection changes. That you can read messages while being offline can be possible only if the messages were already downloaded locally. A truly new messages might not be read from the server when in offline mode (it claims here an error when I try to view a message which is not downloaded locally while the EWS account is in offline mode).

You can capture the communication log with this command:
   $ EWS_DEBUG=2 evolution &>log.txt

The most interesting part will be when the connection icon in UI changes and when you'll try to send a message while the EWS account is in the offline state (it may not necessarily print anything in the log on the send, especially when the code will just realize that the account is in the offline mode.

Comment 4 Louis van Dyk 2015-03-02 15:48:16 UTC
Created attachment 997119 [details]
EWS_DEBUG=2 evolution &>log.txt

BTW, I *did* include debug output when I created the ticket.

I have run the process to log.txt.  I sent a test email, and then left it viewing the IMAP folder for a few minutes.  The arrows stayed "normal".  But when I clicked on EWS Inbox, the arrows got the X next to them.  After refreshing again the red no-entry sign was there.

Thanks!

Comment 5 Mladen Gogala 2015-03-02 20:00:27 UTC
Created attachment 997198 [details]
log.txt, generated by EWS_DEBUG=2; evolution & >/tmp/log.txt

Comment 6 Mladen Gogala 2015-03-02 20:02:38 UTC
Hello Gentlemen!
New version, same distinguished company. And a very similar problem. Hopefully, my attachment, generated as Milan has described few posts above, will help.

Comment 7 Milan Crha 2015-03-03 09:07:03 UTC
(In reply to Louis van Dyk from comment #4)
> BTW, I *did* include debug output when I created the ticket.

My bad, I'm sorry for that, I should look more carefully around, not mixing different bug reports all together (in my mind).

The log from comment #4 shows that the last working request was only slightly more than 3 minutes before the first failing request. The log from comment #0 shows exactly 3 minutes difference between the last working and the first failing request. Both seem to be related to some folder update, one with a very long SyncState.

The log from comment #5 has about 4 and half minute delay between the last working request and the first failed. The failed request also uses longer sync state, but not as that long as Louis has.

Dan, I vaguely recall a similar bug, there was some issue with a long sync state too, but we were not able to reproduce it, if I'm not mistaken. Do you know the bug and eventually more details than me, please?

Comment 8 Mladen Gogala 2015-03-03 21:24:32 UTC
I can reproduce at will. Please let me know if I can help in any way shape or form. Evolution is not very useful right now, I am using thunderbird with DavMail on a Windows 8.1 VM right now.

Comment 9 Milan Crha 2015-03-04 07:31:06 UTC
(In reply to Mladen Gogala from comment #8)
> I can reproduce at will. Please let me know if I can help in any way shape
> or form. Evolution is not very useful right now, I am using thunderbird with
> DavMail on a Windows 8.1 VM right now.

What do you do exactly to reproduce the issue, please? Is it similar with Louis, send a message through EWS, then wait for about 5 minutes, and another attempt to send a message fails with the authentication error?

I'm wondering whether the error is not fake, maybe the server tries to tell that there are too many opened connections and rejects to use another one. Though it doesn't explain why libsoup didn't ask for a password when it should.

What are your mail account settings, including authentication method? Did you enter your password to evolution, and saved it into keyring?

I may have slightly different setup, which can explain why I cannot reproduce it.

Comment 10 Louis van Dyk 2015-03-04 11:36:39 UTC
My setup is as follows:
1.  I have an IMAPX account to my Linux server at home.  This is the second account in my account order on Evolution.  (The first and Default is "On This Computer".)
2.  The EWS is the third account.  On my work notebook, I use the Gnome Online Accounts.  On my home PC I chose to add the account directly in Evolution's accounts.  I experience the same problem on both installations.
3.  I use search folders - I have quite a few - and they are based on source email addresses and scan "all local and remote accounts".

All my passwords are SAVED so I don't have to enter them.  Each account checks for new messages every 5 minutes.  So it would seem that when the next check happens, that that is when the failure is reported to me.

Does that help?

Comment 11 Milan Crha 2015-03-04 12:32:58 UTC
Partly yes, thanks. What is checked (and eventually what values are) i, Edit->Preferences->Mail Accounts->Evolution EWS account->Edit, basically in each tab? I'll just setup as close to you and will see. I suspect that the server has short connection close interval, which is not seen in the logs, despite using "Connection: Keep-Alive" in evolution-ews (which still can be related).

Comment 12 Mladen Gogala 2015-03-04 16:08:54 UTC
Milan, after 5 min or so, server will ask me for authentication, regardless of the operation. Even if I try just retrieving an already read message.

Comment 13 Mladen Gogala 2015-03-04 17:15:39 UTC
Milan, my connection timeout is set to 600 seconds (10 min). What particular settings are you interested in?

Comment 14 Dan Winship 2015-03-04 18:06:25 UTC
(In reply to Louis van Dyk from comment #0)
> On F20 there was a similar problem which Dan fixed in libsoup. Bug 1088458.

doh... it looks like I never committed that fix to F21.

Can you confirm that the packages at http://koji.fedoraproject.org/koji/taskinfo?taskID=9138330 fix things?

Comment 15 Mladen Gogala 2015-03-04 18:27:39 UTC
I just installed your version of libsoup:

 Installing : libsoup-2.48.1-1.danw1.fc21.x86_64                           1/1 
  Verifying  : libsoup-2.48.1-1.danw1.fc21.x86_64                           1/1 

Installed:
  libsoup.x86_64 0:2.48.1-1.danw1.fc21          

Will let you know shortly.

Comment 16 Mladen Gogala 2015-03-04 19:19:41 UTC
It looks good. Ever since I installed the new version of libsoup, there are no more requests for re-authentication. Thanks a lot. Will that be pushed to the regular F21 updates or do I have to keep it in versionlock?
Once again, thank you very much! Evolution-ews is so much faster than DavMail based solution.

Comment 17 Mladen Gogala 2015-03-04 22:20:10 UTC
This is definitely good. I've had no problems with my email for the whole afternoon. I consider the bug fixed. I don't know about Louis. Despite the fact that we seem to encounter the same problems, we don't know each other.

Comment 18 Louis van Dyk 2015-03-05 12:35:14 UTC
Dan, I am so pleased that you remembered!  The new libsoup has fixed the problem for me ... again.

Could you please roll out the update for Fedora 21 (and Rawhide)?

Again, Milan and Dan, thanks SO much for your assistance.

Comment 19 Fedora Update System 2015-03-05 17:01:57 UTC
libsoup-2.48.1-2.fc21 has been submitted as an update for Fedora 21.
https://admin.fedoraproject.org/updates/libsoup-2.48.1-2.fc21

Comment 20 Fedora Update System 2015-03-06 06:58:25 UTC
Package libsoup-2.48.1-2.fc21:
* should fix your issue,
* was pushed to the Fedora 21 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing libsoup-2.48.1-2.fc21'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2015-3303/libsoup-2.48.1-2.fc21
then log in and leave karma (feedback).

Comment 21 Fedora Update System 2015-03-22 04:41:18 UTC
libsoup-2.48.1-2.fc21 has been pushed to the Fedora 21 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.