question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Download fails in Drive.Sample

See original GitHub issue
What steps will reproduce the problem?
1. Download the latest of GoogleApisSamples
2. Enable Drive API and configure ClientID and Client Secret
3. Run the Drive.Sample project after setting the UploadFileName and 
DownloadDirectoryName constants

What is the expected output? 
The file is uploaded to Google Drive
The file is downloaded from Google Drive
The file is removed from Google Drive

What do you see instead?
The file is uploaded to Google Drive
The program fails while attempting to download the file from Google Drive
The file is removed from Google Drive

What version of the product are you using? Hg clone from 8/23/2013
What is your operating system? Win 7 x64
What is your IDE? Visual Studio 2012
What is the .NET framework version? .NET Framework 4

Additional information:
The app uploads an image to Google Drive first. When it attempts the download 
it fails in the MediaDownloader.cs file, inside the DownloadCore method. This 
is after I have provided the ClientID and Client Secret.

When running it in the debugger. the response comes back as:
{StatusCode: 302, ReasonPhrase: 'Moved Temporarily'

We can see a bunch of redirects are taking place in the log file too and it 
reports Abnormal response at the end (query strings omitted for brevity):

013-08-23 16:19:18,950 [13] DEBUG Google.Apis.Http.ConfigurableMessageHandler 
(null) - Redirect response was handled successfully. Redirect to 
https://docs.google.com/a/...

2013-08-23 16:19:19,173 [13] DEBUG Google.Apis.Http.ConfigurableMessageHandler 
(null) - Redirect response was handled successfully. Redirect to 
https://doc-0s-1g-docs.googleusercontent.com/docs/securesc/...

2013-08-23 16:19:19,175 [13] DEBUG Google.Apis.Http.ConfigurableMessageHandler 
(null) - Abnormal response is being returned. Status Code is Redirect

A fix or suggestions/pointers on how to debug this kind of issue will be 
greatly appreciated.

Original issue reported on code.google.com by u...@ftitech.mygbiz.com on 23 Aug 2013 at 3:46

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:17

github_iconTop GitHub Comments

1reaction
GoogleCodeExportercommented, Apr 14, 2015
Thanks for the update, Peleyal. Your changes look fine and we will get the 
latest. Returning to my second question, I didn't see anything in the code that 
indicates how you are specifically handling Google Docs that must be exported 
to some format, such as Doc or PDF prior to being downloaded. It appears that 
the only way to do that is to use the deprecated Google Docs API, as shown in 
the download code on this page: 
https://developers.google.com/google-apps/documents-list/#downloading_documents_
and_files. 

Original comment by ethanwil...@gmail.com on 19 Sep 2013 at 3:53

0reactions
GoogleCodeExportercommented, Apr 14, 2015

Original comment by pele...@google.com on 16 Oct 2013 at 10:05

  • Changed state: Fixed
Read more comments on GitHub >

github_iconTop Results From Across the Web

Solved: Cannot Download Files from Google Drive (5 Fixes)
How to fix the 'cannot download the file from Google Drive' issue? This article shows methods of fixing Google Drive cannot download on...
Read more >
Fixed: Cannot Download Files From Google Drive
Having trouble downloading files from Google Drive? There are many reasons your download fails. In most cases, you can resolve your problem ...
Read more >
How to fix Google Drive not downloading files
As you can see, the Google Drive not downloading problem has lots of potential solutions. First, try a few options of downloading the...
Read more >
Issue with Downloading Large Files
The Google Drive download failed network error may be caused by the antivirus software, or the unwanted software blocking the installation. Here ...
Read more >
Can't Download The File Try Enabling Third Party Cookies
Google Drive ERROR SOLVED: Can't Download The File Try Enabling Third Party Cookies ✓ · Comments56.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found