Z-Push-contrib icon indicating copy to clipboard operation
Z-Push-contrib copied to clipboard

Invalid input XML: not a mobilesync responseschema.

Open jkaberg opened this issue 10 years ago • 12 comments

I'm getting this everytime I try to connect to z-push/ActiveSync (from Outlook 2013),

19/08/2014 16:18:44 [ 3677] [INFO] AuthenticationRequiredException: Unauthorized - code: 0 19/08/2014 16:18:44 [ 3677] [WARN] /usr/local/lib/z-push/autodiscover/autodiscover.php:115 Undefined variable: incomingXml (8) 19/08/2014 16:18:44 [ 3677] [WARN] /usr/local/lib/z-push/autodiscover/autodiscover.php:115 Trying to get property of non-object (8) 19/08/2014 16:18:44 [ 3677] [WARN] /usr/local/lib/z-push/autodiscover/autodiscover.php:115 Trying to get property of non-object (8) 19/08/2014 16:18:44 [ 3677] [ERROR] Unable to complete autodiscover because login failed for user with email '' 19/08/2014 16:18:44 [ 3677] [FATAL] FatalException: Invalid input XML: not a mobilesync responseschema. - code: 0 19/08/2014 16:18:44 [ 3677] [ERROR] Unable to complete autodiscover because of ZPushException. Error: Invalid input XML: not a mobilesync responseschema.

Obviously becasue the schema can't be found;

http://schemas.microsoft.com/exchange/autodiscover/mobilesync/responseschema/2006

Any suggestions @fmbiete ?

jkaberg avatar Aug 19 '14 14:08 jkaberg

If you have an office365 or outlook.com account you can view the (same) output here (as z-push would've pushed out) https://autodiscover-s.outlook.com/autodiscover/autodiscover.xml

jkaberg avatar Aug 19 '14 14:08 jkaberg

Hi @jkaberg I fixed the undefined message and @JoshData pull request should resolve your previous error. If you can test again and let me know, that would be great :+1:

fmbiete avatar Aug 20 '14 16:08 fmbiete

Thanks for looking into this @fmbiete

Still errors tho;

20/08/2014 18:46:00 [20728] [ERROR] Unable to complete autodiscover because login failed for user. Error: Unauthorized 20/08/2014 18:46:00 [20728] [FATAL] FatalException: Invalid input XML: not a mobilesync responseschema. - code: 0 20/08/2014 18:46:00 [20728] [ERROR] Unable to complete autodiscover because of ZPushException. Error: Invalid input XML: not a mobilesync responseschema.

Login details is correct, so IDK why that error msg (outlook 2013 setup wizard successfully logins via imap)

autodiscover.php can't fetch schema as it doesn't exist:

http://schemas.microsoft.com/exchange/autodiscover/mobilesync/responseschema/2006

jkaberg avatar Aug 20 '14 16:08 jkaberg

Hi, since I don't have a outlook.com account. Could you post the autodiscover response? the log must be in WBXML level and use the code with the last commit, please.

What I think is happening is the response from outlook.com comes with a schema like this:

http://schemas.microsoft.com/exchange/autodiscover/mobilesync/responseschema/2006a

And we are comparing with the string http://schemas.microsoft.com/exchange/autodiscover/mobilesync/responseschema/2006

fmbiete avatar Aug 21 '14 09:08 fmbiete

I changed the response scheme to http://schemas.microsoft.com/exchange/autodiscover/responseschema/2006 and autodiscover works fine on iOS 7.1.2

redhell avatar Aug 21 '14 09:08 redhell

Hi @redhell Could you post the autodiscover response? Thanks

fmbiete avatar Aug 21 '14 09:08 fmbiete

<?xml version="1.0" encoding="utf-8"?>
<Autodiscover xmlns="http://schemas.microsoft.com/exchange/autodiscover/responseschema/2006">
<Response>
<Culture>en:us</Culture>
<User>
<DisplayName>[email protected]</DisplayName>
<EMailAddress>[email protected]</EMailAddress>
</User>
<Action>
<Settings>
<Server>
<Type>MobileSync</Type>
<Url>https://domain.tld/Microsoft-Server-ActiveSync</Url>
<Name>https://domain.tld/Microsoft-Server-ActiveSync</Name>
</Server>
</Settings>
</Action>
</Response>
</Autodiscover>

redhell avatar Aug 21 '14 09:08 redhell

@redhell Tried that, still errors in /var/log/z-push/autodiscover-error.log

21/08/2014 11:50:43 [27009] [FATAL] FatalException: Invalid input XML: not a mobilesync responseschema. - code: 0 21/08/2014 11:50:43 [27009] [ERROR] Unable to complete autodiscover because of ZPushException. Error: Invalid input XML: not a mobilesync responseschema.

(latest z-push from @fmbiete master branch)

jkaberg avatar Aug 21 '14 09:08 jkaberg

@jkaberg in the response.xml

<?xml version="1.0" encoding="utf-8"?>
<Autodiscover xmlns="http://schemas.microsoft.com/exchange/autodiscover/responseschema/2006">
<Response>
<Culture>en:us</Culture>
<User>
<DisplayName></DisplayName>
<EMailAddress></EMailAddress>
</User>
<Action>
<Settings>
<Server>
<Type>MobileSync</Type>
<Url></Url>
<Name></Name>
</Server>
</Settings>
</Action>
</Response>
</Autodiscover>

redhell avatar Aug 21 '14 09:08 redhell

@redhell Samme error still

It's trying to download the http://schemas.microsoft.com/exchange/autodiscover/responseschema/2006 and I'm pretty sure thats why autodiscover.php errors

And just for the record, same error with this one aswell http://schemas.microsoft.com/exchange/autodiscover/mobilesync/responseschema/2006

Note: this only seems to happend with Outlook 2013. Haven't seen it with my android device

jkaberg avatar Aug 21 '14 09:08 jkaberg

@jkaberg the schema is not downloaded when parsing a XML, it doesn't need to exists. But the code checks the schema URI against a hardcoded string. So if you autodiscover returns a different uri, will fail. The same was happening to @redhell, so look into your autodiscovery response to catch the URI, and we will think about a flexible solution for various uri

fmbiete avatar Aug 21 '14 10:08 fmbiete

There is the same issue with linux if we try to configure an account with Gnome Online Accounts

11/12/2015 19:54:30 [20838] [WBXML] ZPushAutodiscover->getIncomingXml() incoming XML data:
<?xml version="1.0"?>
<Autodiscover xmlns="http://schemas.microsoft.com/exchange/autodiscover/outlook/requestschema/2006">
  <Request>
    <EMailAddress>[email protected]</EMailAddress>
    <AcceptableResponseSchema>http://schemas.microsoft.com/exchange/autodiscover/outlook/responseschema/2006a</AcceptableResponseSchema>
  </Request>
</Autodiscover>

11/12/2015 19:54:30 [20838] [FATAL] FatalException: Invalid input XML: not a mobilesync responseschema. - code: 0

tigre-bleu avatar Dec 11 '15 18:12 tigre-bleu