Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Downloading forms from Google Drive fails #3468

Closed
yanokwa opened this issue Nov 22, 2019 · 1 comment · Fixed by #3469
Closed

Downloading forms from Google Drive fails #3468

yanokwa opened this issue Nov 22, 2019 · 1 comment · Fixed by #3469
Assignees
Milestone

Comments

@yanokwa
Copy link
Member

yanokwa commented Nov 22, 2019

At first, I thought the failure was because of the new google-services.json file we are using, so I went back to v1.24 to try to get a working example.

v1.24 works great with the old JSON file. v1.25 fails with that same file.

I’ve narrowed it down to this commit: 2463cfe that puts this error in the logs.

com.google.api.client.googleapis.json.GoogleJsonResponseException: 403 Forbidden
{
  "code" : 403,
  "errors" : [ {
    "domain" : "usageLimits",
    "reason" : "dailyLimitExceededUnreg",
    "message" : "Daily Limit for Unauthenticated Use Exceeded. Continued use requires signup.",
    "extendedHelp" : "https://code.google.com/apis/console"
  } ],
  "message" : "Daily Limit for Unauthenticated Use Exceeded. Continued use requires signup."
}
	at com.google.api.client.googleapis.services.json.AbstractGoogleJsonClientRequest.newExceptionOnError(SourceFile:113)
	at com.google.api.client.googleapis.services.json.AbstractGoogleJsonClientRequest.newExceptionOnError(SourceFile:40)
	at com.google.api.client.googleapis.services.AbstractGoogleClientRequest$1.interceptResponse(SourceFile:443)
	at com.google.api.client.http.HttpRequest.execute(SourceFile:1092)
	at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.executeUnparsed(SourceFile:541)
	at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.executeUnparsed(SourceFile:474)
	at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.execute(SourceFile:591)
	at org.odk.collect.android.utilities.gdrive.DriveHelper$DriveService.getFileId(SourceFile:278)
	at org.odk.collect.android.utilities.gdrive.DriveHelper.getRootFolderId(SourceFile:67)
	at org.odk.collect.android.activities.GoogleDriveActivity$RetrieveDriveFileContentsAsyncTask.doInBackground(SourceFile:647)
	at org.odk.collect.android.activities.GoogleDriveActivity$RetrieveDriveFileContentsAsyncTask.doInBackground(SourceFile:616)
	at android.os.AsyncTask$2.call(AsyncTask.java:304)
	at java.util.concurrent.FutureTask.run(FutureTask.java:237)
	at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:243)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
	at java.lang.Thread.run(Thread.java:761)
Unable to fetch drive contents
@grzesiek2010 grzesiek2010 self-assigned this Nov 23, 2019
@lognaturel lognaturel added this to the v1.25 milestone Nov 25, 2019
@yanokwa
Copy link
Member Author

yanokwa commented Nov 25, 2019

@grzesiek2010 I played around with this on Friday. I believe the problem is that in the google-services.json files we have in the repo, we don't have the oauth_client details either set correctly in the file or set correctly in Google Cloud Console or Firebase.

I'd recommend you start with the v1.25.0-beta tag and see if you can get either the debug or release build working with Google Drive. If you can get that working, it should be easy to do it for the odkrelease build.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants