"Connecting to iCloud failed"

Setup is eM Client on Windows XP (I know, I know, but I’m just the support guy). Cannot connect to iCloud account for Contacts or Calendar. Have tried both Version 6 and Version 7 beta. No joy. Strange thing is, Version 6 seemed to work the first time the iCloud account was configured, and pulled down all Contact and Calendar data, but never again. Have tried deleting account and re-adding, turning off firewall and antivirus, rebooting, etc, no luck. Works fine on Windows 10 (of course).

Screenshot and logs (have removed name and email addresses) below, can you please help?
Thanks.

 

CalDAV.log:

12:17:28.318|011|   C: PropfindCommand https://caldav.icloud.com/164952968/principal/12:17:28.865|011|   <?xml version="1.0" encoding="utf-8"?>http://icewarp.com/ns/"; />http://icewarp.com/ns/"; />http://icewarp.com/ns/"; />
12:17:29.287|011|   S: PROPFIND https://caldav.icloud.com/164952968/principal/
12:17:29.287|011|   207 Multi-Status
12:17:29.287|011|   Response, stream length: 
-1, 1684
12:17:29.287|011|   Content: 

<?xml version='1.0' encoding='UTF-8'?>

12:17:29.287|011|  
12:17:29.287|011|
12:17:29.287|011| /164952968/principal/
12:17:29.287|011|
12:17:29.287|011|
12:17:29.287|011| XXXXXX
12:17:29.287|011|
12:17:29.287|011| /164952968/calendars/inbox/
12:17:29.287|011|
12:17:29.287|011|
12:17:29.287|011| /164952968/calendars/outbox/
12:17:29.287|011|
12:17:29.287|011|
12:17:29.287|011| mailto:XXXXXX@icloud.com
12:17:29.287|011| /164952968/principal/
12:17:29.287|011| /aMTY0OTUyOTY4MTY0OTUyOVuwiJs9EuCjtXJ4xmCCtfk60xTWUpZYNabg4CBMvYt5/principal/
12:17:29.287|011| urn:uuid:164952968
12:17:29.287|011| mailto:XXXXXX@gmail.com
12:17:29.287|011|
12:17:29.287|011|
12:17:29.287|011| https://p04-caldav.icloud.com:443/164952968/calendars/;
12:17:29.287|011|
12:17:29.287|011|
12:17:29.287|011| HTTP/1.1 200 OK
12:17:29.287|011|
12:17:29.287|011|
12:17:29.287|011|
12:17:29.287|011| " rel=“nofollow” target="_blank">http://icewarp.com/ns/’/>;
12:17:29.287|011| " rel=“nofollow” target="_blank" title=“Link http//icewarpcom/ns//”>http://icewarp.com/ns/’/>;
12:17:29.287|011| " rel=“nofollow” target="_blank" title=“Link http//icewarpcom/ns//”>http://icewarp.com/ns/’/>;
12:17:29.287|011|
12:17:29.287|011|
12:17:29.287|011| HTTP/1.1 404 Not Found
12:17:29.287|011|
12:17:29.287|011|
12:17:29.287|011|
12:17:29.287|011|   C: OptionsCommand https://p04-caldav.icloud.com:443/164952968/calendars/

CardDAV.log:

12:17:28.303|014|   C: PropfindCommand https://contacts.icloud.com/164952968/principal/12:17:28.834|014|   <?xml version="1.0" encoding="utf-8"?>http://icewarp.com/ns/"; />http://icewarp.com/ns/"; />http://icewarp.com/ns/"; />
12:17:29.271|014|   S: PROPFIND https://contacts.icloud.com/164952968/principal/
12:17:29.271|014|   207 Multi-Status
12:17:29.271|014|   Response, stream length: 
-1, 1832
12:17:29.271|014|   Content: 

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>



/164952968/principal/





XXXXXX



https://p04-contacts.icloud.com:443/164952968/carddavhome/;



HTTP/1.1 200 OK


















" rel=“nofollow” target="_blank">http://icewarp.com/ns/"/>;



" rel=“nofollow” target="_blank">http://icewarp.com/ns/"/>;



" rel=“nofollow” target="_blank" title=“Link http//icewarpcom/ns//”>http://icewarp.com/ns/"/>;







HTTP/1.1 404 Not Found



12:17:29.271|014|   C: OptionsCommand https://p04-contacts.icloud.com:443/164952968/carddavhome/

Hi,

Can you please also paste the third “log” tab of the operations window when this error occurs? Thank you.

Regards,
Dave

Hi, thanks for reply.
Here is the operations window log. Fyi I configured eM Client Version 6 on another PC, same setup, Win XP SP3, but in a completely different location to remove any firewall issues etc. and it also fails to connect to iCloud. Also tried 2 different iCloud accounts, same problem.
Happy to try other configs, send more logs etc.

If this is not likely to be a quick fix could you let please me know, and we will change to Google for contacts/calendar for the moment.
Graeme

7:49:36 a.m. iCloud [CardDAV]  MailExceptions.ConnectionException: The underlying connection was closed: An unexpected error occurred on a send. —> System.Net.WebException: The underlying connection was closed: An unexpected error occurred on a send. —> System.IO.IOException: Received an unexpected EOF or 0 bytes from the transport stream.7:49:36 a.m.    at System.Net.TlsStream.EndWrite(IAsyncResult asyncResult)
7:49:36 a.m.    at System.Net.PooledStream.EndWrite(IAsyncResult asyncResult)
7:49:36 a.m.    at System.Net.ConnectStream.WriteHeadersCallback(IAsyncResult ar)
7:49:36 a.m.    — End of inner exception stack trace —
7:49:36 a.m.    at System.Net.HttpWebRequest.EndGetRequestStream(IAsyncResult asyncResult, TransportContext& context)
7:49:36 a.m.    at System.Net.HttpWebRequest.EndGetRequestStream(IAsyncResult asyncResult)
7:49:36 a.m.    at MailClient.CalDav.ProtocolCommands.RequestCommand.Execute(HttpWebRequest httpRequest, CancellationToken cancellationToken, Action1 logBody) 7:49:36 a.m. &nbsp; &nbsp;at MailClient.CalDav.ProtocolCommands.Connector.RunCommand(CalDavAccount account, ICommand command, CancellationToken cancellationToken) 7:49:36 a.m. &nbsp; &nbsp;--- End of inner exception stack trace --- 7:49:36 a.m. &nbsp; &nbsp;at MailClient.CalDav.ProtocolCommands.Connector.RunCommand(CalDavAccount account, ICommand command, CancellationToken cancellationToken) 7:49:36 a.m. &nbsp; &nbsp;at MailClient.CalDav.Synchronizer.BootstrapCommand.UpdateOptions(Uri[] baseUris) 7:49:36 a.m. &nbsp; &nbsp;at MailClient.CalDav.Synchronizer.BootstrapCommand.Execute(WorkerStatus status) 7:49:36 a.m. &nbsp; &nbsp;at MailClient.Commands.Command.Process(WorkerStatus status) 7:49:37 a.m. iCloud [CalDAV] &nbsp;MailExceptions.ConnectionException: The underlying connection was closed: An unexpected error occurred on a send. ---\> System.Net.WebException: The underlying connection was closed: An unexpected error occurred on a send. ---\> System.IO.IOException: Received an unexpected EOF or 0 bytes from the transport stream. 7:49:37 a.m. &nbsp; &nbsp;at System.Net.TlsStream.EndWrite(IAsyncResult asyncResult) 7:49:37 a.m. &nbsp; &nbsp;at System.Net.PooledStream.EndWrite(IAsyncResult asyncResult) 7:49:37 a.m. &nbsp; &nbsp;at System.Net.ConnectStream.WriteHeadersCallback(IAsyncResult ar) 7:49:37 a.m. &nbsp; &nbsp;--- End of inner exception stack trace --- 7:49:37 a.m. &nbsp; &nbsp;at System.Net.HttpWebRequest.EndGetRequestStream(IAsyncResult asyncResult, TransportContext& context) 7:49:37 a.m. &nbsp; &nbsp;at System.Net.HttpWebRequest.EndGetRequestStream(IAsyncResult asyncResult) 7:49:37 a.m. &nbsp; &nbsp;at MailClient.CalDav.ProtocolCommands.RequestCommand.Execute(HttpWebRequest httpRequest, CancellationToken cancellationToken, Action1 logBody)
7:49:37 a.m.    at MailClient.CalDav.ProtocolCommands.Connector.RunCommand(CalDavAccount account, ICommand command, CancellationToken cancellationToken)
7:49:37 a.m.    — End of inner exception stack trace —
7:49:37 a.m.    at MailClient.CalDav.ProtocolCommands.Connector.RunCommand(CalDavAccount account, ICommand command, CancellationToken cancellationToken)
7:49:37 a.m.    at MailClient.CalDav.Synchronizer.BootstrapCommand.UpdateOptions(Uri[] baseUris)
7:49:37 a.m.    at MailClient.CalDav.Synchronizer.BootstrapCommand.Execute(WorkerStatus status)
7:49:37 a.m.    at MailClient.Commands.Command.Process(WorkerStatus status)

Thought I’d solved it, but not quite.

Set default browser to Internet Explorer. Em Client connects to iCloud, once only, but then not again. Set default browser to Chrome, back to IE, try again, no dice. Restart computer, no change.

This is with Em version 6. Will have a play with V7 later.

Thanks
Graeme

Further testing shows that eM Client V7 beta on Windows XP won’t connect to iCloud Contacts or Calendar either. But on XP, both V6 and V7 WILL happily connect to iCloud IMAP, for the same iCloud account that fails to work with Contacts and Calendar. And on Win10 everything works fine. So this is not an account credentials issue.

Any thoughts?

Well I’ve given up on using iCloud Contacts and Calendar with eM Client on Windows XP. Does anyone have this working?

Have moved Contacts and Calendar to Google, still with eM Client on XP, and it’s working OK.

Hello Graeme,
sorry for the delayed reply. Do you perhaps have 2 factor authentication set up on your iCloud account? A recent iCloud update enabled this authentication, I believe.
If that is the case, please make an application specific password for eM Client and login into it using this password instead of your account password.

Regards,
Olivia