nicolas2k / google-glass-api

Automatically exported from code.google.com/p/google-glass-api
1 stars 0 forks source link

Zero Byte Video Attachments #356

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
1. Share a video with a contact capable of accepting video/mp4 content.
2. When endpoint is called, check the isProcessing flag to determine if the 
video is ready to be download.
3. When isProcessing evaluated to false use authenticatedRequest to download 
the attachment from the attachment url.
4. Check the size of the attachment download.
5. Sometimes the attachment is 0 bytes.

This is happening sporadically and seems to be a race condition where 
isProcessing is false and the file isn't ready yet, even though I am getting a 
200 response back from the authenticatedRequest call to download the attachment.

I'm checking the size of the return and retrying download if it's 0 bytes and 
that seems to work, but this seems like a bug on the Google server end.

Original issue reported on code.google.com by tim.fl...@gmail.com on 10 Jan 2014 at 9:37

GoogleCodeExporter commented 8 years ago
Update:  Seems as though every once in a while the attachment NEVER gets bytes:

This is multiple attempts to download the same video.  Also to note, this only 
happens on new videos for which this is the first timeline item they are 
attached to (fresh uploads, not ones that have already been upload to Google 
and are being shared a second time).

Binary Length: 0
Sleeping for 15 before retrying download for media id 629
Binary Length: 0
Sleeping for 15 before retrying download for media id 629
Binary Length: 0
Sleeping for 15 before retrying download for media id 629
Binary Length: 0
Sleeping for 15 before retrying download for media id 629

Original comment by tim.fl...@gmail.com on 11 Jan 2014 at 12:18

GoogleCodeExporter commented 8 years ago
Hello,

Thanks for the report! Could you share timeline item IDs that have this issue? 
That would help us track the issue down.

Thanks!
Alain

Original comment by ala...@google.com on 14 Jan 2014 at 12:19

GoogleCodeExporter commented 8 years ago
Hi Alain,

It's hit and miss, some if you wait for a while (greater than a few minutes) 
and regrab the whole timeline object before getting the attachment start 
returning.

613d3482-2fcf-48bf-a8cd-6c39d13c1a66 is one that always comes back with 0 
bytes. 745b97cd-3bbe-4a1c-a485-42ced2ec718a returned 0 bytes in the first pass 
(a pass being 3 attempts in 15 second intervals to get the attachment after 
isProcessing evaluations to false).

Original comment by tim.fl...@gmail.com on 14 Jan 2014 at 1:37

GoogleCodeExporter commented 8 years ago

Original comment by ala...@google.com on 14 Jan 2014 at 4:53