mneumann / postgres-pr

A pure-Ruby (pr) library for accessing PostgreSQL databases
http://rubyforge.org/projects/postgres-pr
43 stars 13 forks source link

Unknown method `auth_type` #11

Open postmodern opened 9 months ago

postmodern commented 9 months ago

Ran into this bug while testing postgres-pr based on the example in the README.

Steps To Reproduce

require 'postgres-pr/connection'

PostgresPR::Connection.new('db', 'admin', 'password1234', 'tcp://localhost:5432')

Expected Result

Connects

Actual Result

/data/home/postmodern/code/ronin-rb/vendor/bundle/ruby/3.1.0/gems/postgres-pr-0.7.0/lib/postgres-pr/message.rb:139:in `block in parse': undefined method `auth_type' for #<PostgresPR::UnknownAuthType:0x00007fac685d7cf0> (NoMethodError)

      raise ParseError unless auth_t == self.auth_type
                                            ^^^^^^^^^^
    from /data/home/postmodern/code/ronin-rb/vendor/bundle/ruby/3.1.0/gems/postgres-pr-0.7.0/lib/postgres-pr/message.rb:82:in `parse'
    from /data/home/postmodern/code/ronin-rb/vendor/bundle/ruby/3.1.0/gems/postgres-pr-0.7.0/lib/postgres-pr/message.rb:137:in `parse'
    from /data/home/postmodern/code/ronin-rb/vendor/bundle/ruby/3.1.0/gems/postgres-pr-0.7.0/lib/postgres-pr/message.rb:116:in `create'
    from /data/home/postmodern/code/ronin-rb/vendor/bundle/ruby/3.1.0/gems/postgres-pr-0.7.0/lib/postgres-pr/message.rb:58:in `read'
    from /data/home/postmodern/code/ronin-rb/vendor/bundle/ruby/3.1.0/gems/postgres-pr-0.7.0/lib/postgres-pr/connection.rb:59:in `block in initialize'
    from /data/home/postmodern/code/ronin-rb/vendor/bundle/ruby/3.1.0/gems/postgres-pr-0.7.0/lib/postgres-pr/connection.rb:58:in `loop'
    from /data/home/postmodern/code/ronin-rb/vendor/bundle/ruby/3.1.0/gems/postgres-pr-0.7.0/lib/postgres-pr/connection.rb:58:in `initialize'
    from (irb):6:in `new'
    from (irb):6:in `<main>'

Version Information

malcolm-pro commented 5 months ago

We are seeing exactly the same issue. I wonder if it's related to #10 somehow. I see you started some discussion in jeremyevans/sequel-postgres-pr#3, but with a different error (ftr we have seen that error previously and are seeing this error now), I'm going to post over there and see what @jeremyevans thinks about it