Skip to content
This repository was archived by the owner on Nov 30, 2021. It is now read-only.

Exception thrown when calling #alive #55

Closed
xaviershay opened this issue May 16, 2017 · 2 comments
Closed

Exception thrown when calling #alive #55

xaviershay opened this issue May 16, 2017 · 2 comments

Comments

@xaviershay
Copy link

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.
@jbandhauer
Copy link
Contributor

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
@xaviershay
Copy link
Author

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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants