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

Already on GitHub? Sign in to your account

undefined method `query_values' for nil:NilClass #32

unlimit opened this Issue Mar 27, 2013 · 5 comments


None yet
4 participants

unlimit commented Mar 27, 2013

Sometimes I get following error for resumable upload:

undefined method query_values' for nil:NilClass /bundle/ruby/1.9.1/gems/google-api-client-0.6.2/lib/google/api_client/request.rb:143:inuri='
/bundle/ruby/1.9.1/gems/google-api-client-0.6.2/lib/google/api_client/media.rb:49:in initialize' /bundle/ruby/1.9.1/gems/google-api-client-0.6.2/lib/google/api_client/result.rb:61:innew'
/bundle/ruby/1.9.1/gems/google-api-client-0.6.2/lib/google/api_client/result.rb:61:in resumable_upload' /bundle/ruby/1.9.1/gems/google-api-client-0.6.2/lib/google/api_client/request.rb:167:insend'
/bundle/ruby/1.9.1/gems/google-api-client-0.6.2/lib/google/api_client.rb:563:in execute' /bundle/ruby/1.9.1/gems/google-api-client-0.6.2/lib/google/api_client.rb:583:inexecute!'

It seems problem comes from resumable session initializing. By some reasons, server didn't send url for upload in response(headers['location'] is nil).
It would be good to add a special check for resumable session Initializing. And if something went wrong client could retry this step.


sporkmonger commented Mar 31, 2013

@sqrrrl I was going to try to take a look at this by pulling up the 0.6.2 tag, but it doesn't exist. Actually, it looks like none of the releases have been tagged since... a long time ago. When you release a gem, make sure you run rake gem:release VERSION=x.x.x to make sure git tags are being created. And do a git push --tags after you do your gem push to make sure the tags get published to GitHub (otherwise they just stay on your local machine).

It happens in 0.6.3 too. The problem arises around the following lines:

When a request with invalid authorization tokens results 401, APIClient#execute refreshes the token automatically but for resumable uploads an upload process occurs before any attempt to refresh token.


sqrrrl commented Apr 19, 2013

@sporkmonger My bad. Did tag them, just never pushed with --tags. Should be good now.


sporkmonger commented Apr 19, 2013

@sqrrrl Awesome, thanks.


sqrrrl commented Jun 7, 2013

Fixed for 0.7 (soon)

@sqrrrl sqrrrl closed this Jun 7, 2013

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