[horde] EMERG: HORDE-BETA Missing required state object [pid 15927 on line 122 of "/usr/share/git-horde5/framework/ActiveSync/lib/Horde/ActiveSync/Driver/Base.php"]

Michael J Rubinsky mrubinsk at horde.org
Mon Jan 6 18:25:50 UTC 2014


Quoting Simon B <simon.buongiorno at gmail.com>:

> On 6 January 2014 17:47, Michael J Rubinsky <mrubinsk at horde.org> wrote:
>>
>> Quoting Michael J Rubinsky <mrubinsk at horde.org>:
>>
>>> Quoting Simon B <simon.buongiorno at gmail.com>:
>>>
>>>>> Horde::debug($variable_name);
>>>>>
>>>>> Will output the contents of said variable to horde_debug.txt in your tmp
>>>>> directory. The call on line 216 is probably the one that you are most
>>>>> interested in.
>>>>
>>>>
>>>>
>>>> Hi Michael
>>>>
>>>> Introducing Horde::debug($username); and Horde::debug($password);
>>>> after line 216 of
>>>>
>>>> "/usr/share/git-horde5/framework/Core/lib/Horde/Core/ActiveSync/Driver.php"
>>>> yields:
>>>>
>>>> ==> /tmp/horde_debug.txt <==
>>>> 2014-01-06T08:59:32+00:00 DEBUG: Variable information:
>>>> string(17) "simon at example.net"
>>>>
>>>> Backtrace:
>>>> 1. Horde_Rpc_ActiveSync->getResponse()
>>>> /usr/share/git-horde5/horde/rpc.php:156
>>>> 2. Horde_ActiveSync->handleRequest()
>>>> /usr/share/git-horde5/framework/Rpc/lib/Horde/Rpc/ActiveSync.php:122
>>>> 3. Horde_ActiveSync->authenticate()
>>>> /usr/share/git-horde5/framework/ActiveSync/lib/Horde/ActiveSync.php:723
>>>> 4. Horde_Core_ActiveSync_Driver->authenticate()
>>>> /usr/share/git-horde5/framework/ActiveSync/lib/Horde/ActiveSync.php:561
>>>> 5. Horde::debug()
>>>>
>>>> /usr/share/git-horde5/framework/Core/lib/Horde/Core/ActiveSync/Driver.php:217
>>>>
>>>> 2014-01-06T08:59:32+00:00 DEBUG: Variable information:
>>>> string(18) "CorrectPassword"
>>>>
>>>> Backtrace:
>>>> 1. Horde_Rpc_ActiveSync->getResponse()
>>>> /usr/share/git-horde5/horde/rpc.php:156
>>>> 2. Horde_ActiveSync->handleRequest()
>>>> /usr/share/git-horde5/framework/Rpc/lib/Horde/Rpc/ActiveSync.php:122
>>>> 3. Horde_ActiveSync->authenticate()
>>>> /usr/share/git-horde5/framework/ActiveSync/lib/Horde/ActiveSync.php:723
>>>> 4. Horde_Core_ActiveSync_Driver->authenticate()
>>>> /usr/share/git-horde5/framework/ActiveSync/lib/Horde/ActiveSync.php:561
>>>> 5. Horde::debug()
>>>>
>>>> /usr/share/git-horde5/framework/Core/lib/Horde/Core/ActiveSync/Driver.php:218
>>>>
>>>> This tells me nothing other than than the variables being entered are
>>>> actually correct (well, at least this wasn't all my fat fingers).  I
>>>> still see no authentication attempt in the IMAP server logs (but then
>>>> should I expect to - I mean I don't see authentication attempts for
>>>> every activesync attempt, so probably not).
>>>
>>>
>>> You *should* see IMAP login for each discreet ActiveSync connection.
>>>
>>>
>>>> In an effort to attempt to look competent, I added
>>>> Horde::debug($result); to
>>>> /usr/share/git-horde5/framework/ActiveSync/lib/Horde/ActiveSync.php:561
>>>> and
>>>> /usr/share/git-horde5/framework/ActiveSync/lib/Horde/ActiveSync.php:723
>>>> but neither of these resulted in extra output in horde_debug.txt
>
>>> It's not clear from your comment exactly where you placed the debug call
>>> in relation to the authenticate calls, but this is probably expected since
>>> it seems that authentication fails in the Core driver.
>
> Hi Michael
>
> In all instances I simply inserted a carriage return and added the
> debug code on a separate line immediately below the line numbers
> listed in the backtrace.
>
>  561         if ($result = $this->_driver->authenticate($user, $pass,
> $domain)) {
> So, $result immediately below it

This won't show anything because the debug line won't be reached when  
auth fails.

>
>  721             return $result;
> So, $result immediately below it

This won't show anything because the code returns before the debug  
line is reached.


> Looking at this after a day's worth of coffee consumption, I think
> might have put it in the wrong place.  If you agree, I can put it
> somewhere else.


Anyway, from what you are telling me authentication is failing in  
Horde, so the ActiveSync library code doesn't matter. Do this to verify:

In Horde_Core_ActiveSync_Driver:: on line 213 (currently blank), right  
before the comment about trying Basic auth, add something like

Horde::debug($conf['activesync']['auth']['type']);

This will output the configured activesync auth type, as well as  
provide a sanity check that the code is reached. Then, between line  
216 and 217 add:

Horde::debug('Authentication failed');

This will show that authentication failed when checking the horde auth  
backend.


For completeness, add this between 231 and 232

Horde::debug('Permission check failed.');

This shows that the device or user was denied access based on  
permission settings.

Then finally on line 235 add Horde::debug('So far so good.');

This shows that up to that point authentication succeeded, and I have  
no idea wtf is going on.


-- 
mike

The Horde Project (www.horde.org)
mrubinsk at horde.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5849 bytes
Desc: S/MIME Signature
URL: <http://lists.horde.org/archives/horde/attachments/20140106/56352efb/attachment.bin>


More information about the horde mailing list