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

Exception thrown when calling #alive #55

xaviershay opened this issue May 16, 2017 · 2 comments

Exception thrown when calling #alive #55

xaviershay opened this issue May 16, 2017 · 2 comments


Copy link

@xaviershay xaviershay commented May 16, 2017

Using the example in the README, with netrc configuration:

/Users/xavier/.gem/ruby/2.3.1/gems/looker-sdk-0.0.5/lib/looker-sdk/authentication.rb:39:in `[]': no implicit conversion of Symbol into Integer (TypeError)
	from /Users/xavier/.gem/ruby/2.3.1/gems/looker-sdk-0.0.5/lib/looker-sdk/authentication.rb:39:in `set_access_token_from_params'
	from /Users/xavier/.gem/ruby/2.3.1/gems/looker-sdk-0.0.5/lib/looker-sdk/authentication.rb:32:in `block in authenticate'
	from /Users/xavier/.gem/ruby/2.3.1/gems/looker-sdk-0.0.5/lib/looker-sdk/authentication.rb:17:in `without_authentication'
	from /Users/xavier/.gem/ruby/2.3.1/gems/looker-sdk-0.0.5/lib/looker-sdk/authentication.rb:29:in `authenticate'
	from /Users/xavier/.gem/ruby/2.3.1/gems/looker-sdk-0.0.5/lib/looker-sdk/authentication.rb:10:in `ensure_logged_in'
	from /Users/xavier/.gem/ruby/2.3.1/gems/looker-sdk-0.0.5/lib/looker-sdk/client.rb:252:in `request'
	from /Users/xavier/.gem/ruby/2.3.1/gems/looker-sdk-0.0.5/lib/looker-sdk/client.rb:72:in `get'
	from /Users/xavier/.gem/ruby/2.3.1/gems/looker-sdk-0.0.5/lib/looker-sdk/client.rb:193:in `alive'
	from test.rb:9:in `<main>'

This seems weird because:

  • Documentation claims it's not even trying to authenticate, but stack trace looks like it is.
  • I know my supplied credentials are invalid, I'd expect an error message that suggests as much, rather than the inscrutable no implicit conversion error.
Copy link

@jbandhauer jbandhauer commented May 16, 2017

I agree that the code doesn't do what the comments claim. It hasn't for a long time. I think that expectation got broken very early on when the sdk was changed to automatically manage its authentication. I'll make a PR with a fix.

The exact error condition there surprises me. The implication is that the server returned a 200 OK for the /login request but, the result body was not of the form expected. I would not expect that of a real Looker instance.

jbandhauer added a commit that referenced this issue May 24, 2017
fix alive. add alternative. fix #55
Copy link

@xaviershay xaviershay commented May 24, 2017

Thank you! Our looker is behind an in-house proxy authentication service, so possible that's contributing to the weirdness you noticed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.