Skip to content
This repository has been archived by the owner on Jan 11, 2022. It is now read-only.

app not working and log shows Unsupported scope: https://www.googleapis.com/auth/drive #69

Closed
jacobhub opened this issue Jan 15, 2018 · 9 comments

Comments

@jacobhub
Copy link

I am trying to test the drive api, I manage to login but when trying to use drive api app crashes and logcat shows:

01-15 14:03:34.481 3090 3177 E ClientConnectOperation: nzh: Authorization failed: Unsupported scope: https://www.googleapis.com/auth/drive
01-15 14:03:34.481 3090 3177 E ClientConnectOperation: at nzl.a(:com.google.android.gms@11951440:25)
01-15 14:03:34.481 3090 3177 E ClientConnectOperation: at nvy.(:com.google.android.gms@11951440:26)
01-15 14:03:34.481 3090 3177 E ClientConnectOperation: at nxh.a(:com.google.android.gms@11951440:72)
01-15 14:03:34.481 3090 3177 E ClientConnectOperation: at swi.run(:com.google.android.gms@11951440:11)
01-15 14:03:34.481 3090 3177 E ClientConnectOperation: at mvc.run(:com.google.android.gms@11951440:26)
01-15 14:03:34.481 3090 3177 E ClientConnectOperation: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
01-15 14:03:34.481 3090 3177 E ClientConnectOperation: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
01-15 14:03:34.481 3090 3177 E ClientConnectOperation: at nak.run(:com.google.android.gms@11951440)
01-15 14:03:34.481 3090 3177 E ClientConnectOperation: at java.lang.Thread.run(Thread.java:761)

@sgong-pdftron
Copy link

Getting this as well... Anyone found any solution? Thanks!

@grant
Copy link
Contributor

grant commented Mar 27, 2018

Can you be more specific which file/sample?

@sgong-pdftron
Copy link

I tried https://github.com/gsuitedevs/android-samples/blob/master/drive/demos/app/src/main/java/com/google/android/gms/drive/sample/demo/RetrieveMetadataActivity.java, the moment pickTextFile is called, I get "Unsupported scope" error shown in the title.

@sgong-pdftron
Copy link

Not sure if it matters, I was using Google v11.8.0. Tested on Moto G4.

@sgong-pdftron
Copy link

@grant were you able to reproduce or more information is needed? Thanks!

@grant
Copy link
Contributor

grant commented Apr 17, 2018

Thanks for the details and pardon the response.
Is this post related? https://stackoverflow.com/questions/29329863/google-drive-scopes-deprecated

I'm not sure of the issue here. (This sample was imported from a previous author).

CC @asrivas @sqrrrl who might understand this error more.

Pull Requests are welcome if you're able to fix the issue.

@sqrrrl
Copy link
Member

sqrrrl commented Apr 30, 2018

Looking at BaseDemoActivity it only requests the file and appdata scopes. Just ran it myself (on emulator) and worked as expected.

@jacobhub and @sgong-pdftron - Did either of you modify BaseDemoActivity or make any other changes around auth?

@kbboss
Copy link

kbboss commented Jun 27, 2018

@sqrrrl hi , I have some troubles about how to file’s thumnail . How do you use api to get thumnail?

#83

@erickoledadevrel
Copy link
Contributor

It looks like your problems are with the API in general, and not these samples in particular. In that case, please see the support options here:

https://developers.google.com/drive/android/support

In regards to the scope issue, it is by design:

Note: The Google Drive Android API currently only supports drive.file and drive.appfolder authorization scopes. If your application requires additional permissions or features not yet available in the Drive Android API, you must use the Google APIs Java Client.

https://developers.google.com/drive/android/auth#connecting_and_authorizing_the_google_drive_android_api

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

No branches or pull requests

6 participants