[sync] Error in Cmd=GetAttachment

Michael J Rubinsky mrubinsk at horde.org
Sat Jan 19 21:49:07 UTC 2013


Quoting "Jens-U. Mozdzen" <jmozdzen at nde.ag>:

> Hi Mike,
>
> Zitat von Michael J Rubinsky <mrubinsk at horde.org>:
>
>> Quoting "Jens-U. Mozdzen" <jmozdzen at nde.ag>:
>>
>>> Hi Mike,
>>>
>>> Zitat von mrubinsk at horde.org:
>>>> Quoting "Jens-U. Mozdzen" <jmozdzen at nde.ag>> Hello Mike,
>>>>>
>>>>> I just upgraded to the latest PEAR version of Horde_ActiveSync  
>>>>> (2.1.2), but that problem may have been present before:
>>>>>
>>>>> On my remote device, I selected to open an email attachment,  
>>>>> which started a "POST  
>>>>> /Microsoft-Server-ActiveSync?Cmd=GetAttachment" request. In  
>>>>> Apache's error log, I receive an error message "PHP Fatal error:  
>>>>>  Call to a member function getType() on a non-object in  
>>>>> /usr/share/php5/PEAR/Horde/Core/ActiveSync/Driver.php" and of  
>>>>> course the attachment isn't available on the remote device.
>>>>>
>>>>> When I switch on ActiveSync trace, not much more is shown:
>>>>> --- cut here ---
>>>>> 2013-01-15T18:39:10+00:00 INFO: [19997]  
>>>>> Horde_Core_ActiveSync_Driver::authenticate() attempt for myuser
>>>>> 2013-01-15T18:39:11+00:00 DEBUG:  
>>>>> [PALM71e4c550ad065147ed4336******] GETATTACHMENT request  
>>>>> received for user myuser
>>>>> 2013-01-15T18:39:11+00:00 DEBUG:  
>>>>> [PALM71e4c550ad065147ed4336******] loadDeviceInfo: myuser
>>>>> 2013-01-15T18:39:11+00:00 INFO: Request being handled for  
>>>>> device: PALM71e4c550ad065147ed4336****** Supporting protocol  
>>>>> version: 12.1
>>>>> 2013-01-15T18:39:11+00:00 INFO:  
>>>>> [PALM71e4c550ad065147ed4336******] Handling GETATTACHMENT command.
>>>>> 2013-01-15T18:39:11+00:00 DEBUG:  
>>>>> [PALM71e4c550ad065147ed4336******] Fetching attachement:  
>>>>> INBOX:25799:1.3
>>>>> --- cut here ---
>> [...]
>>> "Call to a member function getType() on a non-object in  
>>> /usr/share/php5/PEAR/Horde/Core/ActiveSync/Driver.php on line 790"
>>
>> I don't see any code path that would lead to $atc not being a  
>> Horde_Mime_Part object. Can you place a:
>>
>> Horde::debug($atc);
>>
>> right before the return statement on line 789? It will output the  
>> results to a file named horde_debug.txt on your system's temporary  
>> directory.
>
> we're getting closer... I'm unable to reproduce the problem in the  
> original state - and maybe I mis-interpreted the original, after all:
>
> Today I couldn't find any mail in my remote inbox where this problem  
> is recreatable... *if* the message actually still exists in my inbox.
>
> But my remote shows now several messages I have deleted since days,  
> and the error always happens there. While of course there's some  
> other "base problem" beneath this, an error 500 isn't the best  
> reaction to it, so I've included the corresponding debug log from  
> the statement, as you have asked for:

 From MS-ASCMD (the protocol documentation):

"If the GetAttachment command is used to retrieve an attachment that  
has been deleted on the server, a 500 status code is returned in the  
HTTP POST response."


> --- cut here ---
> 2013-01-19T15:39:03+00:00 DEBUG: Backtrace:
> 1. Horde_Rpc_ActiveSync->getResponse()  
> /srv/www/htdocs.www.nde.ag.ssl/horde/rpc.php:157
> 2. Horde_ActiveSync->handleRequest()  
> /usr/share/php5/PEAR/Horde/Rpc/ActiveSync.php:145
> 3. Horde_ActiveSync_Request_Base->handle()  
> /usr/share/php5/PEAR/Horde/ActiveSync.php:639
> 4. Horde_ActiveSync_Request_GetAttachment->_handle()  
> /usr/share/php5/PEAR/Horde/ActiveSync/Request/Base.php:218
> 5. Horde_Core_ActiveSync_Driver->getAttachment()  
> /usr/share/php5/PEAR/Horde/ActiveSync/Request/GetAttachment.php:61
> 6. Horde::debug() /usr/share/php5/PEAR/Horde/Core/ActiveSync/Driver.php:789
> --- cut here ---
>
> I'll try to work out why messages won't get deleted on the remote  
> once they're deleted in the inbox, which is a completely different  
> case. (And they're definitely deleted: I've set up Horde to move  
> messages to the trash folder, rather than just setting the "deleted"  
> flag, in order to circumvent this situation in the first place :/)
>
> To sum it up: Trying to open an attachment via ActiveSync of a  
> message that is already deleted at the server side delivers a PHP  
> error and an according 500 code from the web server.

See above regarding the HTTP 500 response. Not sure why your getting  
the PHP error though, it should be throwing an exception - which is  
what triggers the 500 response to be sent.

-- 
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: 6062 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://lists.horde.org/archives/sync/attachments/20130119/dac6d4da/attachment.bin>


More information about the sync mailing list