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

RuntimeError: The underlying hash algorithm has not yet been initialized. #10

Closed
twhaples opened this issue Aug 16, 2011 · 4 comments
Closed

Comments

@twhaples
Copy link

I've got a script which looks something like this; it's about as simple as I could come up with.

def shakedown
    conn = Route53::Connection.new(@key, @secret)
    puts conn.get_zones.inspect
end

It results in a backtrace like the following.```
RuntimeError: The underlying hash algorithm has not yet been initialized.
/Users/me/.rvm/gems/ruby-1.9.2-p180@snet/gems/ruby-hmac-0.4.0/lib/hmac.rb:36:incheck_status' /Users/me/.rvm/gems/ruby-1.9.2-p180@snet/gems/ruby-hmac-0.4.0/lib/hmac.rb:68:in update'
/Users/me/.rvm/gems/ruby-1.9.2-p180@snet/gems/route53-0.2.1/lib/route53.rb:41:in`request'
/Users/me/.rvm/gems/ruby-1.9.2-p180@snet/gems/route53-0.2.1/lib/route53.rb:63:in `get_zones'
/Users/me/git/ops/dns.rb:19:in`shakedown'

@noeticpenguin
Copy link

I'm having the exact same issue. -- on OSX: Lion
Using this version of hmac.rb, however, fixes the issue.
http://code.google.com/p/cloudcache-ruby/source/browse/trunk/lib/hmac.rb?r=10

@pcorliss
Copy link
Owner

Sorry for the long-long delay on this. But I'm having trouble reproing your issue. Presumably you've moved onto another problem or solved this one already. Please reopen if you're still encountering the error.

@pcorliss
Copy link
Owner

FYI, I was able to repro this by passing in nil in. Double check that @key and @secret are filled in.

2.0.0-p353 :003 > conn = Route53::Connection.new(nil, nil)
 => #<Route53::Connection:0x00000102323770 @accesskey=nil, @secret=nil, @api="2012-12-12", @endpoint="https://route53.amazonaws.com/", @base_url="https://route53.amazonaws.com/2012-12-12", @verbose=false, @ssl_no_verify=false> 
2.0.0-p353 :004 > conn.get_zones
RuntimeError: The underlying hash algorithm has not yet been initialized.
    from /Users/pcorliss/.rvm/gems/ruby-2.0.0-p353@route53/gems/ruby-hmac-0.4.0/lib/hmac.rb:36:in `check_status'
    from /Users/pcorliss/.rvm/gems/ruby-2.0.0-p353@route53/gems/ruby-hmac-0.4.0/lib/hmac.rb:68:in `update'
    from /Users/pcorliss/git/ruby_route_53/lib/route53/connection.rb:28:in `request'
    from /Users/pcorliss/git/ruby_route_53/lib/route53/connection.rb:50:in `get_zones'
    from (irb):4
    from /Users/pcorliss/.rvm/rubies/ruby-2.0.0-p353/bin/irb:12:in `<main>'

@recurser
Copy link

recurser commented Jan 8, 2015

Thanks @pcorliss - I had the same issue, and it turned out that key and secret were blank.

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

4 participants