[Tickets #12486] Re: Can't download attachments over ActiveSync
noreply at bugs.horde.org
noreply at bugs.horde.org
Thu Jul 25 09:55:17 UTC 2013
DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.
Ticket URL: http://bugs.horde.org/ticket/12486
------------------------------------------------------------------------------
Ticket | 12486
Updated By | simon at simonandkate.net
Summary | Can't download attachments over ActiveSync
Queue | Synchronization
Version | Git master
Type | Bug
State | Not A Bug
Priority | 1. Low
Milestone |
Patch |
Owners |
------------------------------------------------------------------------------
simon at simonandkate.net (2013-07-25 09:55) wrote:
>> This has definitely worked in the past, could it be due to the
>> devices now being on 14.1 instead of 12.1 that they are requested
>> differently?
>
> Not likely, but you can test this yourself by setting the supported
> version level in the config to 12.1.
>
> There was a bug recently fixed that was causing attachments to
> ALWAYS be truncated regardless of what the client requested. It's
> possible you weren't hitting on your issue because the size was
> never larger than 1MB.
>
> Your logs show that a request for the data is successfully received,
> parsed, the server successfully finds the requested data, prepares
> it in the correct format and begins to stream it to the client. It's
> after this last step that your server dies - during the operation
> that reads a chunk of data from the attachment data stream and sends
> it over the php output stream to the client. You can tell this
> because of the "[stream]" value printed as the last successful log
> entry in each request.
>
> What version of PHP are you running?
5.3.3 from CentOS repos. Michael S has already said I should upgrade
it. At the moment though (until now) I have no major functional issues
in Horde running 5.3.3, so have not had to...
I have tried different sizes with pdfs.
* 740KB - succeeds. iOS automatically downloads it when you open the email.
* 785KB - fails. iOS tries to auto download, but it silently fails. No
Apache crash either. It appears to try a couple of times to get it too.
* 1000KB - fails, same as 785KB
* 1100KB - fails as per 1000KB, but added iOS "Cannot download
attachment". No Apache crash.
* 3.5MB - have to manually tap to attempt download on iOS. Apache
crashes, and I get "Cannot download attachment".
One interesting thing:
With the 785KB file, it tries TWICE, and the second one succeeds
according to AS (different PID):
2013-07-25T09:14:06+00:00 INFO: [APPLDLXFT5X3DFJ2] Handling
ITEMOPERATIONS command.
2013-07-25T09:14:06+00:00 DEBUG: [9302] I <ItemOperations:ItemOperations>
2013-07-25T09:14:06+00:00 DEBUG: [9302] I <ItemOperations:Fetch>
2013-07-25T09:14:06+00:00 DEBUG: [9302] I <ItemOperations:Store>
2013-07-25T09:14:06+00:00 DEBUG: [9302] I Mailbox
2013-07-25T09:14:06+00:00 DEBUG: [9302] I </ItemOperations:Store>
2013-07-25T09:14:06+00:00 DEBUG: [9302] I <AirSyncBase:FileReference>
2013-07-25T09:14:06+00:00 DEBUG: [9302] I INBOX:51699:1.2
2013-07-25T09:14:06+00:00 DEBUG: [9302] I </AirSyncBase:FileReference>
2013-07-25T09:14:06+00:00 DEBUG: [9302] I </ItemOperations:Fetch>
2013-07-25T09:14:06+00:00 DEBUG: [9302] I </ItemOperations:ItemOperations>
2013-07-25T09:14:06+00:00 DEBUG: [9302] O <ItemOperations:ItemOperations>
2013-07-25T09:14:06+00:00 DEBUG: [9302] O <ItemOperations:Status>
2013-07-25T09:14:06+00:00 DEBUG: [9302] O 1
2013-07-25T09:14:06+00:00 DEBUG: [9302] O </ItemOperations:Status>
2013-07-25T09:14:06+00:00 DEBUG: [9302] O <ItemOperations:Response>
2013-07-25T09:14:06+00:00 DEBUG: [9302] O <ItemOperations:Fetch>
2013-07-25T09:14:06+00:00 DEBUG: [9302] O <ItemOperations:Status>
2013-07-25T09:14:06+00:00 DEBUG: [9302] O 1
2013-07-25T09:14:06+00:00 DEBUG: [9302] O </ItemOperations:Status>
2013-07-25T09:14:06+00:00 DEBUG: [9302] O <AirSyncBase:FileReference>
2013-07-25T09:14:06+00:00 DEBUG: [9302] O INBOX:51699:1.2
2013-07-25T09:14:06+00:00 DEBUG: [9302] O </AirSyncBase:FileReference>
2013-07-25T09:14:06+00:00 DEBUG: [9302] O <ItemOperations:Properties>
2013-07-25T09:14:06+00:00 DEBUG: [9302] O <AirSyncBase:ContentType>
2013-07-25T09:14:06+00:00 DEBUG: [9302] O application/pdf
2013-07-25T09:14:06+00:00 DEBUG: [9302] O </AirSyncBase:ContentType>
2013-07-25T09:14:06+00:00 DEBUG: [9302] O <ItemOperations:Data>
2013-07-25T09:14:06+00:00 DEBUG: [9302] O [STREAM]
2013-07-25T09:14:06+00:00 INFO: [10216]
Horde_Core_ActiveSync_Driver::authenticate() attempt for simon
2013-07-25T09:14:06+00:00 DEBUG: [10216] ITEMOPERATIONS request
received for user simon
2013-07-25T09:14:06+00:00 INFO: [10216] Device entry exists for
APPLDLXFT5X3DFJ2, updating userAgent and version.
2013-07-25T09:14:06+00:00 INFO: [10216] Request being handled for
device: APPLDLXFT5X3DFJ2 Supporting protocol version: 14.1
2013-07-25T09:14:06+00:00 INFO: [APPLDLXFT5X3DFJ2] Handling
ITEMOPERATIONS command.
2013-07-25T09:14:06+00:00 DEBUG: [10216] I <ItemOperations:ItemOperations>
2013-07-25T09:14:06+00:00 DEBUG: [10216] I <ItemOperations:Fetch>
2013-07-25T09:14:06+00:00 DEBUG: [10216] I <ItemOperations:Store>
2013-07-25T09:14:06+00:00 DEBUG: [10216] I Mailbox
2013-07-25T09:14:06+00:00 DEBUG: [10216] I </ItemOperations:Store>
2013-07-25T09:14:06+00:00 DEBUG: [10216] I <AirSyncBase:FileReference>
2013-07-25T09:14:06+00:00 DEBUG: [10216] I INBOX:51699:1.2
2013-07-25T09:14:06+00:00 DEBUG: [10216] I </AirSyncBase:FileReference>
2013-07-25T09:14:06+00:00 DEBUG: [10216] I </ItemOperations:Fetch>
2013-07-25T09:14:06+00:00 DEBUG: [10216] I </ItemOperations:ItemOperations>
2013-07-25T09:14:06+00:00 DEBUG: [10216] O <ItemOperations:ItemOperations>
2013-07-25T09:14:06+00:00 DEBUG: [10216] O <ItemOperations:Status>
2013-07-25T09:14:06+00:00 DEBUG: [10216] O 1
2013-07-25T09:14:06+00:00 DEBUG: [10216] O </ItemOperations:Status>
2013-07-25T09:14:07+00:00 DEBUG: [10216] O <ItemOperations:Response>
2013-07-25T09:14:07+00:00 DEBUG: [10216] O <ItemOperations:Fetch>
2013-07-25T09:14:07+00:00 DEBUG: [10216] O <ItemOperations:Status>
2013-07-25T09:14:07+00:00 DEBUG: [10216] O 1
2013-07-25T09:14:07+00:00 DEBUG: [10216] O </ItemOperations:Status>
2013-07-25T09:14:07+00:00 DEBUG: [10216] O <AirSyncBase:FileReference>
2013-07-25T09:14:07+00:00 DEBUG: [10216] O INBOX:51699:1.2
2013-07-25T09:14:07+00:00 DEBUG: [10216] O </AirSyncBase:FileReference>
2013-07-25T09:14:07+00:00 DEBUG: [10216] O <ItemOperations:Properties>
2013-07-25T09:14:07+00:00 DEBUG: [10216] O <AirSyncBase:ContentType>
2013-07-25T09:14:07+00:00 DEBUG: [10216] O application/pdf
2013-07-25T09:14:07+00:00 DEBUG: [10216] O </AirSyncBase:ContentType>
2013-07-25T09:14:07+00:00 DEBUG: [10216] O <ItemOperations:Data>
2013-07-25T09:14:07+00:00 DEBUG: [10216] O [STREAM]
2013-07-25T09:14:15+00:00 DEBUG: [10216] O </ItemOperations:Data>
2013-07-25T09:14:15+00:00 DEBUG: [10216] O <ItemOperations:Total>
2013-07-25T09:14:15+00:00 DEBUG: [10216] O 803031
2013-07-25T09:14:15+00:00 DEBUG: [10216] O </ItemOperations:Total>
2013-07-25T09:14:15+00:00 DEBUG: [10216] O <ItemOperations:Range>
2013-07-25T09:14:15+00:00 DEBUG: [10216] O 0-803031
2013-07-25T09:14:15+00:00 DEBUG: [10216] O </ItemOperations:Range>
2013-07-25T09:14:15+00:00 DEBUG: [10216] O </ItemOperations:Properties>
2013-07-25T09:14:15+00:00 DEBUG: [10216] O </ItemOperations:Fetch>
2013-07-25T09:14:15+00:00 DEBUG: [10216] O </ItemOperations:Response>
2013-07-25T09:14:15+00:00 DEBUG: [10216] O </ItemOperations:ItemOperations>
But it appears the iPad is hanging on for the first one that fails.
If I turn php output buffering ON then the iPad instantly appears to
be downloading the attachment when tapped on, but it stops short of
the full size, and the attachment won't open (although it is
displaying as fully downloaded. E.g. AS device log for a 2MB pdf, only
one (apparently successful) STREAM:
2013-07-25T09:49:56+00:00 INFO: [APPLDLXFT5X3DFJ2] Handling
ITEMOPERATIONS command.
2013-07-25T09:49:56+00:00 DEBUG: [8373] I <ItemOperations:ItemOperations>
2013-07-25T09:49:56+00:00 DEBUG: [8373] I <ItemOperations:Fetch>
2013-07-25T09:49:56+00:00 DEBUG: [8373] I <ItemOperations:Store>
2013-07-25T09:49:56+00:00 DEBUG: [8373] I Mailbox
2013-07-25T09:49:56+00:00 DEBUG: [8373] I </ItemOperations:Store>
2013-07-25T09:49:56+00:00 DEBUG: [8373] I <AirSyncBase:FileReference>
2013-07-25T09:49:56+00:00 DEBUG: [8373] I INBOX:51704:1.2
2013-07-25T09:49:56+00:00 DEBUG: [8373] I </AirSyncBase:FileReference>
2013-07-25T09:49:56+00:00 DEBUG: [8373] I </ItemOperations:Fetch>
2013-07-25T09:49:56+00:00 DEBUG: [8373] I </ItemOperations:ItemOperations>
2013-07-25T09:49:56+00:00 DEBUG: [8373] O <ItemOperations:ItemOperations>
2013-07-25T09:49:56+00:00 DEBUG: [8373] O <ItemOperations:Status>
2013-07-25T09:49:56+00:00 DEBUG: [8373] O 1
2013-07-25T09:49:56+00:00 DEBUG: [8373] O </ItemOperations:Status>
2013-07-25T09:49:56+00:00 DEBUG: [8373] O <ItemOperations:Response>
2013-07-25T09:49:56+00:00 DEBUG: [8373] O <ItemOperations:Fetch>
2013-07-25T09:49:56+00:00 DEBUG: [8373] O <ItemOperations:Status>
2013-07-25T09:49:56+00:00 DEBUG: [8373] O 1
2013-07-25T09:49:56+00:00 DEBUG: [8373] O </ItemOperations:Status>
2013-07-25T09:49:56+00:00 DEBUG: [8373] O <AirSyncBase:FileReference>
2013-07-25T09:49:56+00:00 DEBUG: [8373] O INBOX:51704:1.2
2013-07-25T09:49:56+00:00 DEBUG: [8373] O </AirSyncBase:FileReference>
2013-07-25T09:49:56+00:00 DEBUG: [8373] O <ItemOperations:Properties>
2013-07-25T09:49:56+00:00 DEBUG: [8373] O <AirSyncBase:ContentType>
2013-07-25T09:49:56+00:00 DEBUG: [8373] O application/pdf
2013-07-25T09:49:56+00:00 DEBUG: [8373] O </AirSyncBase:ContentType>
2013-07-25T09:49:56+00:00 DEBUG: [8373] O <ItemOperations:Data>
2013-07-25T09:49:56+00:00 DEBUG: [8373] O [STREAM]
2013-07-25T09:49:56+00:00 DEBUG: [8373] O </ItemOperations:Data>
2013-07-25T09:49:56+00:00 DEBUG: [8373] O <ItemOperations:Total>
2013-07-25T09:49:56+00:00 DEBUG: [8373] O 2284370
2013-07-25T09:49:56+00:00 DEBUG: [8373] O </ItemOperations:Total>
2013-07-25T09:49:56+00:00 DEBUG: [8373] O <ItemOperations:Range>
2013-07-25T09:49:56+00:00 DEBUG: [8373] O 0-2284370
2013-07-25T09:49:56+00:00 DEBUG: [8373] O </ItemOperations:Range>
2013-07-25T09:49:56+00:00 DEBUG: [8373] O </ItemOperations:Properties>
2013-07-25T09:49:56+00:00 DEBUG: [8373] O </ItemOperations:Fetch>
2013-07-25T09:49:56+00:00 DEBUG: [8373] O </ItemOperations:Response>
2013-07-25T09:49:56+00:00 DEBUG: [8373] O </ItemOperations:ItemOperations>
Says it's sent it all, but iPad shows this as an unopenable 694KB file.
More information about the bugs
mailing list