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

"Invalid scope" error on validation url #7

Closed
sgbeal opened this issue May 1, 2012 · 8 comments
Closed

"Invalid scope" error on validation url #7

sgbeal opened this issue May 1, 2012 · 8 comments

Comments

@sgbeal
Copy link

sgbeal commented May 1, 2012

Hi!

[stephan@host:~/cvs/grive/foo]$ ../grive -a

Please go to this URL and get an authenication code:

https://accounts.google.com/o/oauth2/auth?scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.email+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.profile+https%3A%2F%2Fdocs.google.com%2Ffeeds%2F+https%3A%2F%2Fdocs.googleusercontent.com%2F+https%3A%2F%2Fspreadsheets.google.com%2Ffeeds%2F+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fdrive.file%2F&redirect_uri=urn:ietf:wg:oauth:2.0:oob&response_type=code&client_id=22314510474.apps.googleusercontent.com

when visiting the URL i get a 400 (Bad Request) with:

Error: invalid_scope
A native application: grive
You can email the developer of this application at: match065@gmail.com
Some requested scopes were invalid. {valid=[https://www.googleapis.com/auth/userinfo.profile, https://docs.googleusercontent.com/, https://docs.google.com/feeds/, https://www.googleapis.com/auth/userinfo.email, https://spreadsheets.google.com/feeds/], invalid=[https://www.googleapis.com/auth/drive.file/], noncanonical=[https://docs.google.com/feeds/(https://www.googleapis.com/auth/docs), https://spreadsheets.google.com/feeds/(https://www.googleapis.com/auth/spreadsheets), https://docs.googleusercontent.com/(https://www.googleapis.com/auth/docs)]}

Request Details
scope=https://www.googleapis.com/auth/drive.file/ https://www.googleapis.com/auth/userinfo.profile https://docs.googleusercontent.com/ https://docs.google.com/feeds/ https://www.googleapis.com/auth/userinfo.email https://spreadsheets.google.com/feeds/
response_type=code
access_type=offline
redirect_uri=urn:ietf:wg:oauth:2.0:oob
approval_prompt=auto
client_id=22314510474.apps.googleusercontent.com

:-?

Ubuntu 12.04 x64.

@sgbeal
Copy link
Author

sgbeal commented May 1, 2012

PS: i'm running e79ff15.

@match065
Copy link
Member

match065 commented May 1, 2012

Looks like you are running the latest code. I just added the new scope today. Can you comment out the invalid scope "https://www.googleapis.com/auth/drive.file/" from src/protocol/OAuth2.cc and try again?

By the way, you sure have google drive enabled in your account, haven't you? Anyway I guess the "drive.file" scope is not required. I will remove it if it works in your case.

Thanks!!

@sgbeal
Copy link
Author

sgbeal commented May 1, 2012

Hi!

That got me a bit further, and now i've stumbled upon a probably missing feature:

...
Please input the authenication code here
...
downloading ./Docs/Work/Consol/2012-04-XX HTML5-5 Fragen-5 Antworten_ v2.doc
downloading counters/ship-0077.svg
terminate called after throwing an instance of 'std::runtime_error'
what(): cannot open file counters/ship-0077.svg for writing
Aborted (core dumped)
[stephan@host:/cvs/grive/foo]$ ../grive
downloading counters/ship-0077.svg
terminate called after throwing an instance of 'std::runtime_error'
what(): cannot open file counters/ship-0077.svg for writing
Aborted (core dumped)
[stephan@host:
/cvs/grive/foo]$ mkdir counters
[stephan@host:~/cvs/grive/foo]$ ../grive
downloading counters/ship-0077.svg
downloading counters/ship-0076.svg
downloading counters/ships-counters-halfinch.svg
^C

Just FYI (but i'm sure you knew about that already).

Thanks for the code! Very cool!

@sgbeal sgbeal closed this as completed May 1, 2012
@match065
Copy link
Member

match065 commented May 1, 2012

This is something new. I don't know why grive cannot download the file. Does the directory "counter" exist after grive quits?

@sgbeal
Copy link
Author

sgbeal commented May 1, 2012

i had to manually create it, then grive was happy. i have stopped testing for the time being because i ended up (apparently) syncing/uploading an incomplete file which i had broken by ctrl-C'ing grive. During the download i interrupted it, then on the next run grive thought it was newer and (as far as i can tell) uploaded the new 0-byte file. No big deal (they're versioned), but it could have gone badly had i not been paying attention and the revision history had expired (30 days, IIRC). Until GDrive has a linux client i've still got everything in dropbox, anyway.

But to be clear: i understand that this is early in development, so i'm not complaining :). i'm looking forward to what you achieve with your code. A hypothetical libgrive could give cloud storage access to all sorts of apps. i could add a wrapper for libs11n (http://s11n.net) to de/serialize near-arbitrary C++ objects directly from/to GDrive :).

@sgbeal
Copy link
Author

sgbeal commented May 1, 2012

i might have found the difference: grive creates folders for my gdrive folders except in one case: the counters folder is shared. Let me test with another shared folder... nope, that's not it. And it's not synching all folders. i'll ping you off-list with screenshots and details.

@match065
Copy link
Member

match065 commented May 1, 2012

Great!! That is great help! I am going to test it out on my own with some shared folders and get back to you.

@match065
Copy link
Member

match065 commented May 1, 2012

I have open a new issue to track this problem: https://github.com/match065/grive/issues/8

@clamara76 clamara76 mentioned this issue Jun 6, 2012
@ramsiw ramsiw mentioned this issue May 16, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants