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

davmail.exchange.ews.EWSException: ErrorCorruptData exception when trying to send invitation answer #336

Open
Yamakuzure opened this issue Feb 27, 2024 · 3 comments

Comments

@Yamakuzure
Copy link

When I get an invitation for a meeting, I click on "Accept" and everything is working just fine.
The apointment shows up in my calender (davmail caldav setup to Exchange 2013 using EWS) and I am marked as having accepted.

Sometimes davmail opens a popup window where I can enter a message to add to my invitation answer.

On invites I accept I normally just click "send" and everything is good. But in some cases the popup reopens once, and then stays silent for a couple of minutes before coming back up. It also comes twice and and comes back after a couple of minutes, if I press Cancel.
Restarting Davmail does not change that and/or end the constant popups

I have taken a look into the log file and found this:

2024-02-27 10:50:37,959 DEBUG [CaldavConnection-38744] org.apache.http.client.protocol.RequestAddCookies  - CookieSpec selected: default
2024-02-27 10:50:37,959 DEBUG [CaldavConnection-38744] org.apache.http.client.protocol.RequestAddCookies  - Cookie [version: 0][name: ClientId][value: ***CLIENT_ID***][domain: ***MAIL_SERVER_ADDRESS***][path: /][expiry: Wed Feb 26 10:50:32 CET 2025] match [(secure)***MAIL_SERVER_ADDRESS***:443/ews/exchange.asmx]
2024-02-27 10:50:37,959 DEBUG [CaldavConnection-38744] org.apache.http.client.protocol.RequestAddCookies  - Cookie [version: 0][name: X-BackEndCookie][value: ***USER_UUID***=***USER_TOKEN***J][domain: ***MAIL_SERVER_ADDRESS***][path: /ews][expiry: Thu Mar 28 10:50:36 CET 2024] match [(secure)***MAIL_SERVER_ADDRESS***:443/ews/exchange.asmx]
2024-02-27 10:50:37,959 DEBUG [CaldavConnection-38744] org.apache.http.client.protocol.RequestAddCookies  - Cookie [version: 0][name: exchangecookie][value: ***EXCHANGE_COOKIE***][domain: ***MAIL_SERVER_ADDRESS***][path: /][expiry: null] match [(secure)***MAIL_SERVER_ADDRESS***:443/ews/exchange.asmx]
2024-02-27 10:50:37,959 DEBUG [CaldavConnection-38744] org.apache.http.client.protocol.RequestAuthCache  - Auth cache not set in the context
2024-02-27 10:50:37,959 DEBUG [CaldavConnection-38744] org.apache.http.impl.conn.PoolingHttpClientConnectionManager  - Connection request: [route: {s}->https://***MAIL_SERVER_ADDRESS***:443][total kept alive: 1; route allocated: 1 of 5; total allocated: 1 of 20]
2024-02-27 10:50:37,959 DEBUG [CaldavConnection-38744] org.apache.http.impl.conn.PoolingHttpClientConnectionManager  - Connection leased: [id: 0][route: {s}->https://***MAIL_SERVER_ADDRESS***:443][total kept alive: 0; route allocated: 1 of 5; total allocated: 1 of 20]
2024-02-27 10:50:37,959 DEBUG [CaldavConnection-38744] org.apache.http.impl.conn.DefaultManagedHttpClientConnection  - http-outgoing-1: set socket timeout to 0
2024-02-27 10:50:37,959 DEBUG [CaldavConnection-38744] org.apache.http.impl.conn.DefaultManagedHttpClientConnection  - http-outgoing-1: set socket timeout to 120000
2024-02-27 10:50:37,959 DEBUG [CaldavConnection-38744] org.apache.http.impl.execchain.MainClientExec  - Executing request POST /ews/exchange.asmx HTTP/1.1
2024-02-27 10:50:37,959 DEBUG [CaldavConnection-38744] org.apache.http.impl.execchain.MainClientExec  - Target auth state: UNCHALLENGED
2024-02-27 10:50:37,959 DEBUG [CaldavConnection-38744] org.apache.http.impl.execchain.MainClientExec  - Proxy auth state: UNCHALLENGED
2024-02-27 10:50:37,960 DEBUG [CaldavConnection-38744] org.apache.http.headers  - http-outgoing-1 >> POST /ews/exchange.asmx HTTP/1.1
2024-02-27 10:50:37,960 DEBUG [CaldavConnection-38744] org.apache.http.headers  - http-outgoing-1 >> Content-Length: 798
2024-02-27 10:50:37,960 DEBUG [CaldavConnection-38744] org.apache.http.headers  - http-outgoing-1 >> Content-Type: text/xml; charset=UTF-8
2024-02-27 10:50:37,960 DEBUG [CaldavConnection-38744] org.apache.http.headers  - http-outgoing-1 >> Host: ***MAIL_SERVER_ADDRESS***
2024-02-27 10:50:37,960 DEBUG [CaldavConnection-38744] org.apache.http.headers  - http-outgoing-1 >> Connection: Keep-Alive
2024-02-27 10:50:37,960 DEBUG [CaldavConnection-38744] org.apache.http.headers  - http-outgoing-1 >> User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.93 Safari/537.36 Edg/90.0.818.49
2024-02-27 10:50:37,960 DEBUG [CaldavConnection-38744] org.apache.http.headers  - http-outgoing-1 >> Cookie: ClientId=***CLIENT_ID***; X-BackEndCookie=***USER_UUID***=***USER_TOKEN***J; exchangecookie=***EXCHANGE_COOKIE***
2024-02-27 10:50:37,960 DEBUG [CaldavConnection-38744] org.apache.http.headers  - http-outgoing-1 >> Accept-Encoding: gzip,deflate
2024-02-27 10:50:37,960 DEBUG [CaldavConnection-38744] org.apache.http.wire  - http-outgoing-1 >> "POST /ews/exchange.asmx HTTP/1.1[\r][\n]"
2024-02-27 10:50:37,960 DEBUG [CaldavConnection-38744] org.apache.http.wire  - http-outgoing-1 >> "Content-Length: 798[\r][\n]"
2024-02-27 10:50:37,960 DEBUG [CaldavConnection-38744] org.apache.http.wire  - http-outgoing-1 >> "Content-Type: text/xml; charset=UTF-8[\r][\n]"
2024-02-27 10:50:37,960 DEBUG [CaldavConnection-38744] org.apache.http.wire  - http-outgoing-1 >> "Host: ***MAIL_SERVER_ADDRESS***[\r][\n]"
2024-02-27 10:50:37,960 DEBUG [CaldavConnection-38744] org.apache.http.wire  - http-outgoing-1 >> "Connection: Keep-Alive[\r][\n]"
2024-02-27 10:50:37,960 DEBUG [CaldavConnection-38744] org.apache.http.wire  - http-outgoing-1 >> "User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.93 Safari/537.36 Edg/90.0.818.49[\r][\n]"
2024-02-27 10:50:37,960 DEBUG [CaldavConnection-38744] org.apache.http.wire  - http-outgoing-1 >> "Cookie: ClientId=***CLIENT_ID***; X-BackEndCookie=***USER_UUID***=***USER_TOKEN***J; exchangecookie=***EXCHANGE_COOKIE***[\r][\n]"
2024-02-27 10:50:37,960 DEBUG [CaldavConnection-38744] org.apache.http.wire  - http-outgoing-1 >> "Accept-Encoding: gzip,deflate[\r][\n]"
2024-02-27 10:50:37,960 DEBUG [CaldavConnection-38744] org.apache.http.wire  - http-outgoing-1 >> "[\r][\n]"
2024-02-27 10:50:37,960 DEBUG [CaldavConnection-38744] org.apache.http.wire  - http-outgoing-1 >> "<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types" xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages"><soap:Header><t:RequestServerVersion Version="Exchange2013"/></soap:Header><soap:Body><m:CreateItem MessageDisposition="SendAndSaveCopy" SendMeetingInvitations="SendToAllAndSaveCopy"><m:SavedItemFolderId><t:DistinguishedFolderId Id="sentitems"/></m:SavedItemFolderId><m:Items><t:AcceptItem><t:ReferenceItemId Id="***ITEM_ID***==" ChangeKey="***CHANGE_KEY***"/></t:AcceptItem></m:Items></m:CreateItem></soap:Body></soap:Envelope>"
2024-02-27 10:50:38,018 DEBUG [CaldavConnection-38744] org.apache.http.wire  - http-outgoing-1 << "HTTP/1.1 200 OK[\r][\n]"
2024-02-27 10:50:38,018 DEBUG [CaldavConnection-38744] org.apache.http.wire  - http-outgoing-1 << "Cache-Control: private[\r][\n]"
2024-02-27 10:50:38,018 DEBUG [CaldavConnection-38744] org.apache.http.wire  - http-outgoing-1 << "Transfer-Encoding: chunked[\r][\n]"
2024-02-27 10:50:38,018 DEBUG [CaldavConnection-38744] org.apache.http.wire  - http-outgoing-1 << "Content-Type: text/xml; charset=utf-8[\r][\n]"
2024-02-27 10:50:38,018 DEBUG [CaldavConnection-38744] org.apache.http.wire  - http-outgoing-1 << "Content-Encoding: gzip[\r][\n]"
2024-02-27 10:50:38,018 DEBUG [CaldavConnection-38744] org.apache.http.wire  - http-outgoing-1 << "Vary: Accept-Encoding[\r][\n]"
2024-02-27 10:50:38,018 DEBUG [CaldavConnection-38744] org.apache.http.wire  - http-outgoing-1 << "Server: Microsoft-IIS/8.0[\r][\n]"
2024-02-27 10:50:38,018 DEBUG [CaldavConnection-38744] org.apache.http.wire  - http-outgoing-1 << "request-id: ***REQUEST_ID***[\r][\n]"
2024-02-27 10:50:38,018 DEBUG [CaldavConnection-38744] org.apache.http.wire  - http-outgoing-1 << "X-CalculatedBETarget: hms.havi.local[\r][\n]"
2024-02-27 10:50:38,018 DEBUG [CaldavConnection-38744] org.apache.http.wire  - http-outgoing-1 << "X-DiagInfo: HMS[\r][\n]"
2024-02-27 10:50:38,018 DEBUG [CaldavConnection-38744] org.apache.http.wire  - http-outgoing-1 << "X-BEServer: HMS[\r][\n]"
2024-02-27 10:50:38,018 DEBUG [CaldavConnection-38744] org.apache.http.wire  - http-outgoing-1 << "X-AspNet-Version: 4.0.30319[\r][\n]"
2024-02-27 10:50:38,018 DEBUG [CaldavConnection-38744] org.apache.http.wire  - http-outgoing-1 << "Set-Cookie: exchangecookie=***EXCHANGE_COOKIE***; path=/[\r][\n]"
2024-02-27 10:50:38,018 DEBUG [CaldavConnection-38744] org.apache.http.wire  - http-outgoing-1 << "Set-Cookie: X-BackEndCookie=***USER_UUID***=***USER_TOKEN***H; expires=Thu, 28-Mar-2024 09:50:38 GMT; path=/ews; secure; HttpOnly[\r][\n]"
2024-02-27 10:50:38,018 DEBUG [CaldavConnection-38744] org.apache.http.wire  - http-outgoing-1 << "X-Powered-By: ASP.NET[\r][\n]"
2024-02-27 10:50:38,018 DEBUG [CaldavConnection-38744] org.apache.http.wire  - http-outgoing-1 << "X-FEServer: HMS[\r][\n]"
2024-02-27 10:50:38,018 DEBUG [CaldavConnection-38744] org.apache.http.wire  - http-outgoing-1 << "Date: Tue, 27 Feb 2024 09:50:38 GMT[\r][\n]"
2024-02-27 10:50:38,018 DEBUG [CaldavConnection-38744] org.apache.http.wire  - http-outgoing-1 << "[\r][\n]"
2024-02-27 10:50:38,018 DEBUG [CaldavConnection-38744] org.apache.http.wire  - http-outgoing-1 << "206[\r][\n]"
2024-02-27 10:50:38,018 DEBUG [CaldavConnection-38744] org.apache.http.wire  - http-outgoing-1 << "***HEX_ENCODED_TEXT***"
2024-02-27 10:50:38,018 DEBUG [CaldavConnection-38744] org.apache.http.headers  - http-outgoing-1 << HTTP/1.1 200 OK
2024-02-27 10:50:38,018 DEBUG [CaldavConnection-38744] org.apache.http.headers  - http-outgoing-1 << Cache-Control: private
2024-02-27 10:50:38,018 DEBUG [CaldavConnection-38744] org.apache.http.headers  - http-outgoing-1 << Transfer-Encoding: chunked
2024-02-27 10:50:38,018 DEBUG [CaldavConnection-38744] org.apache.http.headers  - http-outgoing-1 << Content-Type: text/xml; charset=utf-8
2024-02-27 10:50:38,018 DEBUG [CaldavConnection-38744] org.apache.http.headers  - http-outgoing-1 << Content-Encoding: gzip
2024-02-27 10:50:38,018 DEBUG [CaldavConnection-38744] org.apache.http.headers  - http-outgoing-1 << Vary: Accept-Encoding
2024-02-27 10:50:38,018 DEBUG [CaldavConnection-38744] org.apache.http.headers  - http-outgoing-1 << Server: Microsoft-IIS/8.0
2024-02-27 10:50:38,018 DEBUG [CaldavConnection-38744] org.apache.http.headers  - http-outgoing-1 << request-id: ***REQUEST_ID***
2024-02-27 10:50:38,018 DEBUG [CaldavConnection-38744] org.apache.http.headers  - http-outgoing-1 << X-CalculatedBETarget: hms.havi.local
2024-02-27 10:50:38,018 DEBUG [CaldavConnection-38744] org.apache.http.headers  - http-outgoing-1 << X-DiagInfo: HMS
2024-02-27 10:50:38,018 DEBUG [CaldavConnection-38744] org.apache.http.headers  - http-outgoing-1 << X-BEServer: HMS
2024-02-27 10:50:38,018 DEBUG [CaldavConnection-38744] org.apache.http.headers  - http-outgoing-1 << X-AspNet-Version: 4.0.30319
2024-02-27 10:50:38,018 DEBUG [CaldavConnection-38744] org.apache.http.headers  - http-outgoing-1 << Set-Cookie: exchangecookie=***EXCHANGE_COOKIE***; path=/
2024-02-27 10:50:38,018 DEBUG [CaldavConnection-38744] org.apache.http.headers  - http-outgoing-1 << Set-Cookie: X-BackEndCookie=***USER_UUID***=***USER_TOKEN***H; expires=Thu, 28-Mar-2024 09:50:38 GMT; path=/ews; secure; HttpOnly
2024-02-27 10:50:38,018 DEBUG [CaldavConnection-38744] org.apache.http.headers  - http-outgoing-1 << X-Powered-By: ASP.NET
2024-02-27 10:50:38,018 DEBUG [CaldavConnection-38744] org.apache.http.headers  - http-outgoing-1 << X-FEServer: HMS
2024-02-27 10:50:38,018 DEBUG [CaldavConnection-38744] org.apache.http.headers  - http-outgoing-1 << Date: Tue, 27 Feb 2024 09:50:38 GMT
2024-02-27 10:50:38,018 DEBUG [CaldavConnection-38744] org.apache.http.impl.execchain.MainClientExec  - Connection can be kept alive indefinitely
2024-02-27 10:50:38,018 DEBUG [CaldavConnection-38744] org.apache.http.client.protocol.ResponseProcessCookies  - Cookie accepted [exchangecookie="***EXCHANGE_COOKIE***", version:0, domain:***MAIL_SERVER_ADDRESS***, path:/, expiry:null]
2024-02-27 10:50:38,019 DEBUG [CaldavConnection-38744] org.apache.http.client.protocol.ResponseProcessCookies  - Cookie accepted [X-BackEndCookie="***USER_UUID***=u56Lnp2ejJqBys+ZypvOyZvSy5zIntLLyMrN0sfMyMnSyc3PyprOx8...", version:0, domain:***MAIL_SERVER_ADDRESS***, path:/ews, expiry:Thu Mar 28 10:50:38 CET 2024]
2024-02-27 10:50:38,019 DEBUG [CaldavConnection-38744] org.apache.http.wire  - http-outgoing-1 << "a[\r][\n]"
2024-02-27 10:50:38,019 DEBUG [CaldavConnection-38744] org.apache.http.wire  - http-outgoing-1 << "[0xe5][0x8][0x9c][0x4][0xfe]a[0x96]2[0xd2]�[\r][\n]"
2024-02-27 10:50:38,019 DEBUG [CaldavConnection-38744] org.apache.http.wire  - http-outgoing-1 << "b[\r][\n]"
2024-02-27 10:50:38,019 DEBUG [CaldavConnection-38744] org.apache.http.wire  - http-outgoing-1 << "[0xf4][0xff][0x0][0xb5][0xd1][0xa5][0xe6]0[0x4][0x0][0x0][\r][\n]"
2024-02-27 10:50:38,020 DEBUG [CaldavConnection-38744] org.apache.http.wire  - http-outgoing-1 << "0[\r][\n]"
2024-02-27 10:50:38,020 DEBUG [CaldavConnection-38744] org.apache.http.wire  - http-outgoing-1 << "[\r][\n]"
2024-02-27 10:50:38,020 DEBUG [CaldavConnection-38744] org.apache.http.impl.conn.PoolingHttpClientConnectionManager  - Connection [id: 0][route: {s}->https://***MAIL_SERVER_ADDRESS***:443] can be kept alive indefinitely
2024-02-27 10:50:38,020 DEBUG [CaldavConnection-38744] org.apache.http.impl.conn.DefaultManagedHttpClientConnection  - http-outgoing-1: set socket timeout to 0
2024-02-27 10:50:38,020 DEBUG [CaldavConnection-38744] org.apache.http.impl.conn.PoolingHttpClientConnectionManager  - Connection released: [id: 0][route: {s}->https://***MAIL_SERVER_ADDRESS***:443][total kept alive: 1; route allocated: 1 of 5; total allocated: 1 of 20]
2024-02-27 10:50:38,020 ERROR [CaldavConnection-38744] davmail  - ErrorCorruptData Die Daten sind fehlerhaft. 
 request: <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types" xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages"><soap:Header><t:RequestServerVersion Version="Exchange2013"/></soap:Header><soap:Body><m:CreateItem MessageDisposition="SendAndSaveCopy" SendMeetingInvitations="SendToAllAndSaveCopy"><m:SavedItemFolderId><t:DistinguishedFolderId Id="sentitems"/></m:SavedItemFolderId><m:Items><t:AcceptItem><t:ReferenceItemId Id="***ITEM_ID***==" ChangeKey="***CHANGE_KEY***"/></t:AcceptItem></m:Items></m:CreateItem></soap:Body></soap:Envelope>
davmail.exchange.ews.EWSException: ErrorCorruptData Die Daten sind fehlerhaft. 
 request: <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types" xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages"><soap:Header><t:RequestServerVersion Version="Exchange2013"/></soap:Header><soap:Body><m:CreateItem MessageDisposition="SendAndSaveCopy" SendMeetingInvitations="SendToAllAndSaveCopy"><m:SavedItemFolderId><t:DistinguishedFolderId Id="sentitems"/></m:SavedItemFolderId><m:Items><t:AcceptItem><t:ReferenceItemId Id="***ITEM_ID***==" ChangeKey="***CHANGE_KEY***"/></t:AcceptItem></m:Items></m:CreateItem></soap:Body></soap:Envelope>
	at davmail.exchange.ews.EWSMethod.checkSuccess(EWSMethod.java:801)
	at davmail.exchange.ews.EwsExchangeSession.internalExecuteMethod(EwsExchangeSession.java:2939)
	at davmail.exchange.ews.EwsExchangeSession.executeMethod(EwsExchangeSession.java:2905)
	at davmail.exchange.ews.EwsExchangeSession$Event.createOrUpdate(EwsExchangeSession.java:2033)
	at davmail.exchange.ews.EwsExchangeSession.internalCreateOrUpdateEvent(EwsExchangeSession.java:2625)
	at davmail.exchange.ExchangeSession.createOrUpdateItem(ExchangeSession.java:2658)
	at davmail.caldav.CaldavConnection.handleFolderOrItem(CaldavConnection.java:299)
	at davmail.caldav.CaldavConnection.handleRequest(CaldavConnection.java:237)
	at davmail.caldav.CaldavConnection.run(CaldavConnection.java:180)
2024-02-27 10:50:39,021 INFO  [CaldavConnection-38744] davmail.connection  - DISCONNECT - 127.0.0.1:38744 
@Yamakuzure
Copy link
Author

The constant popup about sending the "Accepted" reply is still there... I have no idea how to get rid of it.

@Yamakuzure
Copy link
Author

I had to remove the caldav resource in akonadi and re-add it. Now the popup is gone. Seems like the notification got stuck in the resource which went offline each time davmail caught said exception, and then retried after 5 minutes.

@Yamakuzure
Copy link
Author

This error is still there and happens whenever someone moves an appointment. Accepting the new date makes davmail go bye-bye.

At least I found a workaround:
Accept the new date, click on "send" in the davmail popup twice (It does NOT send anything) and then:

  • Open akonadiconsole
  • restart the caldav agent
  • right click on it and select "Abort all actions" as fast and often as possible
  • click away the davmail popups, the agent breaks after that
  • repeat with restarting the agent.

After 3-8 rounds davmail is no longer breaking everything and keeps quiet.
The appointment is then not synced with anything, of course, but at least it is in my local calendar.

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

1 participant