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

Google Drive session not fetching files - 404 'Invalid Request' #382

Open
empydoodle opened this issue Aug 3, 2020 · 2 comments
Open

Google Drive session not fetching files - 404 'Invalid Request' #382

empydoodle opened this issue Aug 3, 2020 · 2 comments

Comments

@empydoodle
Copy link

Hi there

I have had this issue with the Google Drive api since early last week, and am unable to fix it myself.
I have tried all means of authentication myself, but with the same issue:

irb(main):001:0> require 'google_drive'
=> true
irb(main):002:0> session = GoogleDrive::Session.from_config("/path/to/oauth.json")
=> #<GoogleDrive::Session:0x3fbb5f4eaee4>
irb(main):003:0> session.files
Google::Apis::ClientError: Invalid request
        from /usr/local/lib/ruby/gems/2.3.0/gems/google-api-client-0.30.10/lib/google/apis/core/http_command.rb:228:in `check_status'
        from /usr/local/lib/ruby/gems/2.3.0/gems/google-api-client-0.30.10/lib/google/apis/core/api_command.rb:117:in `check_status'
        from /usr/local/lib/ruby/gems/2.3.0/gems/google-api-client-0.30.10/lib/google/apis/core/http_command.rb:193:in `process_response'
        from /usr/local/lib/ruby/gems/2.3.0/gems/google-api-client-0.30.10/lib/google/apis/core/http_command.rb:310:in `execute_once'
        from /usr/local/lib/ruby/gems/2.3.0/gems/google-api-client-0.30.10/lib/google/apis/core/http_command.rb:113:in `block (2 levels) in execute'
        from /usr/local/lib/ruby/gems/2.3.0/gems/retriable-3.1.2/lib/retriable.rb:61:in `block in retriable'
        from /usr/local/lib/ruby/gems/2.3.0/gems/retriable-3.1.2/lib/retriable.rb:56:in `times'
        from /usr/local/lib/ruby/gems/2.3.0/gems/retriable-3.1.2/lib/retriable.rb:56:in `retriable'
        from /usr/local/lib/ruby/gems/2.3.0/gems/google-api-client-0.30.10/lib/google/apis/core/http_command.rb:110:in `block in execute'
        from /usr/local/lib/ruby/gems/2.3.0/gems/retriable-3.1.2/lib/retriable.rb:61:in `block in retriable'
        from /usr/local/lib/ruby/gems/2.3.0/gems/retriable-3.1.2/lib/retriable.rb:56:in `times'
        from /usr/local/lib/ruby/gems/2.3.0/gems/retriable-3.1.2/lib/retriable.rb:56:in `retriable'
        from /usr/local/lib/ruby/gems/2.3.0/gems/google-api-client-0.30.10/lib/google/apis/core/http_command.rb:102:in `execute'
        from /usr/local/lib/ruby/gems/2.3.0/gems/google-api-client-0.30.10/lib/google/apis/core/base_service.rb:360:in `execute_or_queue_command'
        from /usr/local/lib/ruby/gems/2.3.0/gems/google-api-client-0.30.10/generated/google/apis/drive_v3/service.rb:1191:in `list_files'
        from /usr/local/lib/ruby/gems/2.3.0/gems/google_drive-3.0.3/lib/google_drive/session.rb:603:in `call'
        from /usr/local/lib/ruby/gems/2.3.0/gems/google_drive-3.0.3/lib/google_drive/session.rb:603:in `execute_paged!'
        from /usr/local/lib/ruby/gems/2.3.0/gems/google_drive-3.0.3/lib/google_drive/session.rb:611:in `execute_paged!'
        from /usr/local/lib/ruby/gems/2.3.0/gems/google_drive-3.0.3/lib/google_drive/session.rb:256:in `files'
        from (irb):3
        from /usr/local/bin/irb:11:in `<main>'
irb(main):004:0> 

Could you shed any light on why this would be refusing to carry out quite a basic task?

@zdavis
Copy link

zdavis commented Aug 23, 2021

Seeing the same issue here.

@zdavis
Copy link

zdavis commented Aug 23, 2021

Fixed by upgrading to v3 of this gem (per feedback on googleapis/google-api-ruby-client#6103)

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