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

Failed to process EWS request - HTTP code 400 #51

Open
simgunz opened this issue Oct 23, 2019 · 3 comments
Open

Failed to process EWS request - HTTP code 400 #51

simgunz opened this issue Oct 23, 2019 · 3 comments

Comments

@simgunz
Copy link

simgunz commented Oct 23, 2019

When I try to add an EWS resource I get the following error.

Here I have configured the resource using OAtuh. The authentication seems to work but than I get a error 400 without further motivations.

Server autodiscovery fails, so I have used this link: https://myserver.com/ews/exchange.asmx

$ QT_LOGGING_RULE=log_ews_resource_request.debug=true /usr/bin/akonadi_ews_resource --identifier akonadi_ews_resource_0                                                       
Please register the custom scheme 'urn' via QWebEngineUrlScheme::registerScheme() before installing the custom scheme handler.
org.kde.pim.ews.client: Failed to process EWS request - HTTP code 400
ERROR "Failed to process EWS request - HTTP code 400"
org.kde.pim.ews.client: Failed to process EWS request - HTTP code 400
org.kde.pim.ews.client: Failed to process EWS request - HTTP code 400
org.kde.pim.ews.client: Failed to process EWS request - HTTP code 400
org.kde.pim.ews.client: Failed to process EWS request - HTTP code 400
ERROR "Failed to process EWS request - HTTP code 400"
Please register the custom scheme 'urn' via QWebEngineUrlScheme::registerScheme() before installing the custom scheme handler.
org.kde.pim.ews.client: Starting OAuth2 authentication
org.kde.pim.ews.client: Launching browser for authentication
org.kde.pim.ews.client: PKeyAuth certificates not found
js: Error parsing a meta element's content: ';' is not a valid key-value pair separator. Please use ',' instead.
qt.xkb.compose: failed to create compose table
org.kde.pim.ews.client: Authentication succeeded
org.kde.pim.ews.client: Failed to process EWS request - HTTP code 400
@simgunz
Copy link
Author

simgunz commented Oct 30, 2019

Using username/password authentication plus the fix reported in https://bugs.kde.org/show_bug.cgi?id=402780 I managed to login.

@kalmarek
Copy link

kalmarek commented Nov 3, 2022

I can't use the workaround. This is the akonadi log:

[2022-11-03T17:17:19.678Z] akonadi_ews_resource default Please register the custom scheme 'urn' via QWebEngineUrlScheme::registerScheme() before installing the custom scheme handler.
[2022-11-03T17:17:19.678Z] akonadi_ews_resource org.kde.pim.ews.client Starting OAuth2 authentication
[2022-11-03T17:17:19.990Z] akonadi_ews_resource org.kde.pim.ews.client Authentication succeeded
[2022-11-03T17:17:19.998Z] akonadi_ews_resource org.kde.pim.ews.client.proto "<?xml version=\"1.0\"?><soap:Envelope xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:m=\"http://schemas.microsoft.com/exchange/services/2006/messages\" xmlns:t=\"http://schemas.microsoft.com/exchange/services/2006/types\"><soap:Header><t:RequestServerVersion Version=\"Exchange2007_SP1\"/></soap:Header><soap:Body><m:GetFolder><m:FolderShape><t:BaseShape>IdOnly</t:BaseShape></m:FolderShape><m:FolderIds><t:DistinguishedFolderId Id=\"inbox\"/></m:FolderIds></m:GetFolder></soap:Body></soap:Envelope>\n"
[2022-11-03T17:17:19.998Z] akonadi_ews_resource org.kde.pim.ews.client.request Starting GetFolder request (QVector(EwsId(Distinguished: inbox)))
[2022-11-03T17:17:20.122Z] akonadi_ews_resource org.kde.pim.ews.client.proto data KIO::TransferJob(0x5647e253a7e0) "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\"\"http://www.w3.org/TR/html4/strict.dtd\">\r\n<HTML><HEAD><TITLE>Bad Request</TITLE>\r\n<META HTTP-EQUIV=\"Content-Type\" Content=\"text/html; charset=us-ascii\"></HEAD>\r\n<BODY><h2>Bad Request - Invalid Header</h2>\r\n<hr><p>HTTP Error 400. The request has an invalid header name.</p>\r\n</BODY></HTML>\r\n"
[2022-11-03T17:17:20.122Z] akonadi_ews_resource org.kde.pim.ews.client.proto data KIO::TransferJob(0x5647e253a7e0) ""
[2022-11-03T17:17:20.123Z] akonadi_ews_resource org.kde.pim.ews.client.proto response dumped to "/tmp/akonadi-ews-IXJIFPF/ews_xmldump_GaBxIzI.xml"
[2022-11-03T17:17:20.123Z] akonadi_ews_resource org.kde.pim.ews.client Failed to process EWS request - HTTP code 400

@KrissN any change of getting this running?

@tilghman
Copy link

I just had this exact error, and the problem was that there was whitespace at the end of the URL. It was added there when I copied and pasted the URL from an email. Once I deleted the whitespace, the error 400 went away.

Hopefully, that was your problem, and knocking out the whitespace fixes it for you.

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

3 participants