Skip to content

OpenSSL::SSL::SSLError #784

Open
Open

Description

@MR-X-junior
irb(main):001:0> require 'httparty'
=> true
irb(main):002:0> HTTParty.get("https://mbasic.facebook.com")
/data/data/com.termux/files/usr/lib/ruby/3.2.0/openssl/buffering.rb:214:in `sysread_nonblock': SSL_read: unexpected eof while reading (OpenSSL::SSL::SSLError)
        from /data/data/com.termux/files/usr/lib/ruby/3.2.0/openssl/buffering.rb:214:in `read_nonblock'
        from /data/data/com.termux/files/usr/lib/ruby/3.2.0/net/protocol.rb:218:in `rbuf_fill'
        from /data/data/com.termux/files/usr/lib/ruby/3.2.0/net/protocol.rb:185:in `read_all'
        from /data/data/com.termux/files/usr/lib/ruby/3.2.0/net/http/response.rb:712:in `read_all'
        from /data/data/com.termux/files/usr/lib/ruby/3.2.0/net/http/response.rb:591:in `block in read_body_0'
        from /data/data/com.termux/files/usr/lib/ruby/3.2.0/net/http/response.rb:550:in `inflater'
        from /data/data/com.termux/files/usr/lib/ruby/3.2.0/net/http/response.rb:573:in `read_body_0'
        from /data/data/com.termux/files/usr/lib/ruby/3.2.0/net/http/response.rb:344:in `read_body'
        from /data/data/com.termux/files/usr/lib/ruby/3.2.0/net/http/response.rb:380:in `body'
        from /data/data/com.termux/files/usr/lib/ruby/3.2.0/net/http/response.rb:302:in `reading_body'
        from /data/data/com.termux/files/usr/lib/ruby/3.2.0/net/http.rb:1872:in `transport_request'
        from /data/data/com.termux/files/usr/lib/ruby/3.2.0/net/http.rb:1826:in `request'
        from /data/data/com.termux/files/usr/lib/ruby/3.2.0/net/http.rb:1819:in `block in request'
        from /data/data/com.termux/files/usr/lib/ruby/3.2.0/net/http.rb:1238:in `start'
        from /data/data/com.termux/files/usr/lib/ruby/3.2.0/net/http.rb:1817:in `request'
        from /data/data/com.termux/files/usr/lib/ruby/gems/3.2.0/gems/httparty-0.21.0/lib/httparty/request.rb:156:in `perform'
        ... 7 levels...

Activity

  1. rgalanakis commented on Jun 10, 2023

    @rgalanakis

    I am hitting this as well (though with a totally different site: https://www.portlandonline.com/shared/cfm/trackit_devicerss.cfm

    I have tried HTTParty.get('https://www.portlandonline.com/shared/cfm/trackit_devicerss.cfm') on my macbook pro (Ventura 13.2), and also from a Heroku dyno.

    verify: false has no effect.

    Using Net::HTTP.get URI('https://www.portlandonline.com/shared/cfm/trackit_devicerss.cfm') (and other Net::HTTP variants directly) works fine.

  2. rgalanakis commented on Jun 10, 2023

    @rgalanakis

    This works: HTTParty.get('https://mbasic.facebook.com', headers: {'Connection' => 'keep-alive'})
    I notice that Net::HTTP does this:

            start {
              req['connection'] ||= 'close'
              return request(req, body, &block)
            }
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions