Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upgetting -sometimes- Twitter::Error::ClientError: end of file reached #370
Comments
This comment has been minimized.
This comment has been minimized.
veesahni
commented
Mar 20, 2013
This comment has been minimized.
This comment has been minimized.
dewski
commented
Mar 20, 2013
|
I've had an app in production using the Twitter gem for a little over 6 months now with no issues, and all of a sudden yesterday I started noticing we're getting We have multiple tokens we rotate through and build new Using the suggestions in #354 yield these results (tokens hidden for security): Using HTTPStoken = {:token=>"xx", :secret=>"xx"}
c = Twitter::Client.new(
:oauth_token => token[:token],
:oauth_token_secret => token[:secret]
)
=> #<Twitter::Client:0x007f8fc79b4098 @consumer_key="consumer_key", @consumer_secret="consumer_secret", @oauth_token="xx", @oauth_token_secret="xx", @endpoint="https://api.twitter.com", @connection_options={:headers=>{:accept=>"application/json", :user_agent=>"Twitter Ruby Gem 4.6.2"}, :request=>{:open_timeout=>5, :timeout=>10}, :ssl=>{:verify=>false}}, @identity_map=false, @middleware=#<Faraday::Builder:0x007f8fc2f160b8 @handlers=[Twitter::Request::MultipartWithFile, Faraday::Request::Multipart, Faraday::Request::UrlEncoded, Twitter::Response::RaiseError, FaradayMiddleware::Instrumentation, Twitter::Response::ParseJson, Twitter::Response::RaiseError, Faraday::Adapter::NetHttp, Faraday::Adapter::Excon]>>
c.user 'github'
Twitter::Error::ClientError: end of file reached
from /opt/boxen/rbenv/versions/1.9.3-p231-tcs-github-1.0.11/lib/ruby/1.9.1/openssl/buffering.rb:174:in `sysread_nonblock'
from /opt/boxen/rbenv/versions/1.9.3-p231-tcs-github-1.0.11/lib/ruby/1.9.1/openssl/buffering.rb:174:in `read_nonblock'
from /opt/boxen/rbenv/versions/1.9.3-p231-tcs-github-1.0.11/lib/ruby/1.9.1/net/protocol.rb:141:in `rbuf_fill'
from /opt/boxen/rbenv/versions/1.9.3-p231-tcs-github-1.0.11/lib/ruby/1.9.1/net/protocol.rb:122:in `readuntil'
from /opt/boxen/rbenv/versions/1.9.3-p231-tcs-github-1.0.11/lib/ruby/1.9.1/net/protocol.rb:132:in `readline'
from /opt/boxen/rbenv/versions/1.9.3-p231-tcs-github-1.0.11/lib/ruby/1.9.1/net/http.rb:2770:in `read_chunked'
from /opt/boxen/rbenv/versions/1.9.3-p231-tcs-github-1.0.11/lib/ruby/1.9.1/net/http.rb:2750:in `read_body_0'
from /opt/boxen/rbenv/versions/1.9.3-p231-tcs-github-1.0.11/lib/ruby/1.9.1/net/http.rb:2710:in `read_body'
from /opt/boxen/rbenv/versions/1.9.3-p231-tcs-github-1.0.11/lib/ruby/1.9.1/net/http.rb:1029:in `block in get'
from /opt/boxen/rbenv/versions/1.9.3-p231-tcs-github-1.0.11/lib/ruby/1.9.1/net/http.rb:1322:in `block (2 levels) in transport_request'
from /opt/boxen/rbenv/versions/1.9.3-p231-tcs-github-1.0.11/lib/ruby/1.9.1/net/http.rb:2671:in `reading_body'
from /opt/boxen/rbenv/versions/1.9.3-p231-tcs-github-1.0.11/lib/ruby/1.9.1/net/http.rb:1321:in `block in transport_request'
from /opt/boxen/rbenv/versions/1.9.3-p231-tcs-github-1.0.11/lib/ruby/1.9.1/net/http.rb:1316:in `catch'
from /opt/boxen/rbenv/versions/1.9.3-p231-tcs-github-1.0.11/lib/ruby/1.9.1/net/http.rb:1316:in `transport_request'
from /opt/boxen/rbenv/versions/1.9.3-p231-tcs-github-1.0.11/lib/ruby/1.9.1/net/http.rb:1293:in `request'
from /Users/dewski/github/xx/vendor/gems/ruby/1.9.1/gems/rest-client-1.6.7/lib/restclient/net_http_ext.rb:51:in `request'
... 14 levels...
from /Users/dewski/github/xx/vendor/gems/ruby/1.9.1/gems/faraday-0.8.6/lib/faraday/response.rb:8:in `call'
from /Users/dewski/github/xx/vendor/gems/ruby/1.9.1/gems/faraday-0.8.6/lib/faraday/request/url_encoded.rb:14:in `call'
from /Users/dewski/github/xx/vendor/gems/ruby/1.9.1/gems/faraday-0.8.6/lib/faraday/request/multipart.rb:13:in `call'
from /Users/dewski/github/xx/vendor/gems/ruby/1.9.1/gems/twitter-4.6.2/lib/twitter/request/multipart_with_file.rb:14:in `call'
from /Users/dewski/github/xx/vendor/gems/ruby/1.9.1/gems/faraday-0.8.6/lib/faraday/connection.rb:247:in `run_request'
from /Users/dewski/github/xx/vendor/gems/ruby/1.9.1/gems/faraday-0.8.6/lib/faraday/connection.rb:100:in `get'
from /Users/dewski/github/xx/vendor/gems/ruby/1.9.1/gems/twitter-4.6.2/lib/twitter/client.rb:81:in `request'
from /Users/dewski/github/xx/vendor/gems/ruby/1.9.1/gems/twitter-4.6.2/lib/twitter/client.rb:64:in `get'
from /Users/dewski/github/xx/vendor/gems/ruby/1.9.1/gems/twitter-4.6.2/lib/twitter/api/utils.rb:82:in `object_from_response'
from /Users/dewski/github/xx/vendor/gems/ruby/1.9.1/gems/twitter-4.6.2/lib/twitter/api/users.rb:291:in `user'
from (irb):19
from /Users/dewski/github/xx/vendor/gems/ruby/1.9.1/gems/railties-3.2.13/lib/rails/commands/console.rb:47:in `start'
from /Users/dewski/github/xx/vendor/gems/ruby/1.9.1/gems/railties-3.2.13/lib/rails/commands/console.rb:8:in `start'
from /Users/dewski/github/xx/vendor/gems/ruby/1.9.1/gems/railties-3.2.13/lib/rails/commands.rb:41:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'>Using HTTPtoken = {:token=>"xx", :secret=>"xx"}
c = Twitter::Client.new(
:oauth_token => token[:token],
:oauth_token_secret => token[:secret],
:endpoint => "http://api.twitter.com"
)
=> #<Twitter::Client:0x007f8fc272ae08 @consumer_key="consumer_key", @consumer_secret="consumer_secret", @oauth_token="xx", @oauth_token_secret="xx", @endpoint="http://api.twitter.com", @connection_options={:headers=>{:accept=>"application/json", :user_agent=>"Twitter Ruby Gem 4.6.2"}, :request=>{:open_timeout=>5, :timeout=>10}, :ssl=>{:verify=>false}}, @identity_map=false, @middleware=#<Faraday::Builder:0x007f8fc2f160b8 @handlers=[Twitter::Request::MultipartWithFile, Faraday::Request::Multipart, Faraday::Request::UrlEncoded, Twitter::Response::RaiseError, FaradayMiddleware::Instrumentation, Twitter::Response::ParseJson, Twitter::Response::RaiseError, Faraday::Adapter::NetHttp, Faraday::Adapter::Excon]>>
c.user 'github'
Twitter::Error::ClientError: end of file reached
from /opt/boxen/rbenv/versions/1.9.3-p231-tcs-github-1.0.11/lib/ruby/1.9.1/net/protocol.rb:141:in `read_nonblock'
from /opt/boxen/rbenv/versions/1.9.3-p231-tcs-github-1.0.11/lib/ruby/1.9.1/net/protocol.rb:141:in `rbuf_fill'
from /opt/boxen/rbenv/versions/1.9.3-p231-tcs-github-1.0.11/lib/ruby/1.9.1/net/protocol.rb:122:in `readuntil'
from /opt/boxen/rbenv/versions/1.9.3-p231-tcs-github-1.0.11/lib/ruby/1.9.1/net/protocol.rb:132:in `readline'
from /opt/boxen/rbenv/versions/1.9.3-p231-tcs-github-1.0.11/lib/ruby/1.9.1/net/http.rb:2770:in `read_chunked'
from /opt/boxen/rbenv/versions/1.9.3-p231-tcs-github-1.0.11/lib/ruby/1.9.1/net/http.rb:2750:in `read_body_0'
from /opt/boxen/rbenv/versions/1.9.3-p231-tcs-github-1.0.11/lib/ruby/1.9.1/net/http.rb:2710:in `read_body'
from /opt/boxen/rbenv/versions/1.9.3-p231-tcs-github-1.0.11/lib/ruby/1.9.1/net/http.rb:1029:in `block in get'
from /opt/boxen/rbenv/versions/1.9.3-p231-tcs-github-1.0.11/lib/ruby/1.9.1/net/http.rb:1322:in `block (2 levels) in transport_request'
from /opt/boxen/rbenv/versions/1.9.3-p231-tcs-github-1.0.11/lib/ruby/1.9.1/net/http.rb:2671:in `reading_body'
from /opt/boxen/rbenv/versions/1.9.3-p231-tcs-github-1.0.11/lib/ruby/1.9.1/net/http.rb:1321:in `block in transport_request'
from /opt/boxen/rbenv/versions/1.9.3-p231-tcs-github-1.0.11/lib/ruby/1.9.1/net/http.rb:1316:in `catch'
from /opt/boxen/rbenv/versions/1.9.3-p231-tcs-github-1.0.11/lib/ruby/1.9.1/net/http.rb:1316:in `transport_request'
from /opt/boxen/rbenv/versions/1.9.3-p231-tcs-github-1.0.11/lib/ruby/1.9.1/net/http.rb:1293:in `request'
from /Users/dewski/github/xx/vendor/gems/ruby/1.9.1/gems/rest-client-1.6.7/lib/restclient/net_http_ext.rb:51:in `request'
from /opt/boxen/rbenv/versions/1.9.3-p231-tcs-github-1.0.11/lib/ruby/1.9.1/net/http.rb:1286:in `block in request'
... 13 levels...
from /Users/dewski/github/xx/vendor/gems/ruby/1.9.1/gems/faraday-0.8.6/lib/faraday/response.rb:8:in `call'
from /Users/dewski/github/xx/vendor/gems/ruby/1.9.1/gems/faraday-0.8.6/lib/faraday/request/url_encoded.rb:14:in `call'
from /Users/dewski/github/xx/vendor/gems/ruby/1.9.1/gems/faraday-0.8.6/lib/faraday/request/multipart.rb:13:in `call'
from /Users/dewski/github/xx/vendor/gems/ruby/1.9.1/gems/twitter-4.6.2/lib/twitter/request/multipart_with_file.rb:14:in `call'
from /Users/dewski/github/xx/vendor/gems/ruby/1.9.1/gems/faraday-0.8.6/lib/faraday/connection.rb:247:in `run_request'
from /Users/dewski/github/xx/vendor/gems/ruby/1.9.1/gems/faraday-0.8.6/lib/faraday/connection.rb:100:in `get'
from /Users/dewski/github/xx/vendor/gems/ruby/1.9.1/gems/twitter-4.6.2/lib/twitter/client.rb:81:in `request'
from /Users/dewski/github/xx/vendor/gems/ruby/1.9.1/gems/twitter-4.6.2/lib/twitter/client.rb:64:in `get'
from /Users/dewski/github/xx/vendor/gems/ruby/1.9.1/gems/twitter-4.6.2/lib/twitter/api/utils.rb:82:in `object_from_response'
from /Users/dewski/github/xx/vendor/gems/ruby/1.9.1/gems/twitter-4.6.2/lib/twitter/api/users.rb:291:in `user'
from (irb):13
from /Users/dewski/github/xx/vendor/gems/ruby/1.9.1/gems/railties-3.2.13/lib/rails/commands/console.rb:47:in `start'
from /Users/dewski/github/xx/vendor/gems/ruby/1.9.1/gems/railties-3.2.13/lib/rails/commands/console.rb:8:in `start'
from /Users/dewski/github/xx/vendor/gems/ruby/1.9.1/gems/railties-3.2.13/lib/rails/commands.rb:41:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'Rotating the token usedtoken = {:token=>"first_token", :secret=>"first_token"}
connection = Twitter::Client.new(
:oauth_token => token[:token],
:oauth_token_secret => token[:secret]
)
=> #<Twitter::Client:0x007f8fc272ae08 @consumer_key="consumer_key", @consumer_secret="consumer_secret", @oauth_token="first_token", @oauth_token_secret="first_token", @endpoint="http://api.twitter.com", @connection_options={:headers=>{:accept=>"application/json", :user_agent=>"Twitter Ruby Gem 4.6.2"}, :request=>{:open_timeout=>5, :timeout=>10}, :ssl=>{:verify=>false}}, @identity_map=false, @middleware=#<Faraday::Builder:0x007f8fc2f160b8 @handlers=[Twitter::Request::MultipartWithFile, Faraday::Request::Multipart, Faraday::Request::UrlEncoded, Twitter::Response::RaiseError, FaradayMiddleware::Instrumentation, Twitter::Response::ParseJson, Twitter::Response::RaiseError, Faraday::Adapter::NetHttp, Faraday::Adapter::Excon]>>
connection.user 'github'
Twitter::Error::ClientError: end of file reached
TokenPool.refresh # => {:token=>"second_token", :secret=>"second_token"}
token = TokenPool.get # => {:token=>"second_token", :secret=>"second_token"}
connection = Twitter::Client.new(
:oauth_token => token[:token],
:oauth_token_secret => token[:secret]
)
=> #<Twitter::Client:0x00000004e65880 @consumer_key="consumer_key", @consumer_secret="consumer_secret", @oauth_token="second_token", @oauth_token_secret="second_token", @endpoint="https://api.twitter.com", @connection_options={:headers=>{:accept=>"application/json", :user_agent=>"Twitter Ruby Gem 4.6.2"}, :request=>{:open_timeout=>5, :timeout=>10}, :ssl=>{:verify=>false}}, @identity_map=false, @middleware=#<Faraday::Builder:0x00000001f55518 @handlers=[Twitter::Request::MultipartWithFile, Faraday::Request::Multipart, Faraday::Request::UrlEncoded, Twitter::Response::RaiseError, FaradayMiddleware::Instrumentation, Twitter::Response::ParseJson, Twitter::Response::RaiseError, Faraday::Adapter::NetHttp]>>
begin
connection.user('github')
rescue ::Twitter::Error::ClientError => exception
p exception.wrapped_exception
p exception.rate_limit
end
=> #<Twitter::User:0x00000004eb5290>
TokenPool.lock 'first_token' # => true
token = TokenPool.get # => {:token=>"first_token", :secret=>"first_token"}
connection = Twitter::Client.new(
:oauth_token => token[:token],
:oauth_token_secret => token[:secret]
)
=> #<Twitter::Client:0x00000005158420 @consumer_key="consumer_key", @consumer_secret="consumer_secret", @oauth_token="first_token", @oauth_token_secret="first_token", @endpoint="https://api.twitter.com", @connection_options={:headers=>{:accept=>"application/json", :user_agent=>"Twitter Ruby Gem 4.6.2"}, :request=>{:open_timeout=>5, :timeout=>10}, :ssl=>{:verify=>false}}, @identity_map=false, @middleware=#<Faraday::Builder:0x00000001f55518 @handlers=[Twitter::Request::MultipartWithFile, Faraday::Request::Multipart, Faraday::Request::UrlEncoded, Twitter::Response::RaiseError, FaradayMiddleware::Instrumentation, Twitter::Response::ParseJson, Twitter::Response::RaiseError, Faraday::Adapter::NetHttp]>>
begin
connection.user('github')
rescue ::Twitter::Error::ClientError => exception
p exception.wrapped_exception
p exception.rate_limit
end
=> #<Twitter::User:0x00000005d50a98>Catching the errorUsing both HTTPS and HTTP endpoints yield: begin
c.user('github')
rescue Twitter::Error::ClientError => exception
p exception.wrapped_exception # => #<Faraday::Error::ConnectionFailed>
p exception.rate_limit # => #<Twitter::RateLimit:0x00000004e27e18 @attrs={}>
endSeems odd all of this would work for months then all of a sudden break, could this actually be something on Twitter's side? When logging into dev.twitter.com you'll see that they're testing their blackouts of 1.0:
|
This comment has been minimized.
This comment has been minimized.
veesahni
commented
Mar 20, 2013
|
I had implemented an exponential backoff (with notification only after a certain threshold of sequential failures) which did hide the errors for the last few weeks until last night. Given updates in #369, #370 and #354, it seems a number of people have been experiencing the same error since last night. |
This comment has been minimized.
This comment has been minimized.
BobWalsh
commented
Mar 20, 2013
|
dewski, thanks for the code - may have to implement my own "pool". Have reported it to Twitter here: https://dev.twitter.com/issues/927 (unreviewed, so you might not see it, so here it is again): Please have a look at: and Various solutions (disable HTTPS, change default HTTP adaptor via setting a custom middleware stack, using gem 'faraday', '0.9.0.pre' [https://github.com//issues/354#issuecomment-14140759], and switching between tokens [https://github.com//issues/370#issuecomment-15191639] have been tried. They sometimes work. As I am writing up this issue, here's the identical results I'm getting on two different macs (a imac 2009, os upgraded repeatedly and a MBP Retina, bought 2 months ago): thetweets = Twitter.search('git', :count => 10, :lang => "en", :result_type => "recent") -- works thetweets = Twitter.search('1git', :count => 10, :lang => "en", :result_type => "recent") -- Twitter::Error::ClientError: end of file reached Ran the same on other similar terms - "got" worked, "1got" did not. BTW, All searches returned results in twitter.com in browser. I can't see how, especially when switching tokens and repeating the request worked that this can be some sort of error out here. ---> [https://github.com//issues/370#issuecomment-15191639] Regards, |
This comment has been minimized.
This comment has been minimized.
This error is occurring on both API v1.0 and v1.1. Also, it’s currently 1 PM PDT, so I don’t believe this is related to the blackout. |
This comment has been minimized.
This comment has been minimized.
asanderson15
commented
Mar 20, 2013
|
Am relatively new to using this gem, but I am having the same issue. Today is the first time I have seen this error. It seems like it is only happening when I add parameters (in my case geocode) beyond just the search query term. I haven't been able to duplicate the issue with only query terms and no params, but maybe the gem (or Twitter) is treating those searches differently. |
This comment has been minimized.
This comment has been minimized.
|
@BobWalsh @dewski @veesahni @asanderson15 @timhaines @stuliston @jfredson @joekain (CCing everyone from #354 and #369): I believe I've discovered the root cause of this issue. It appears to be caused by using a version of Ruby that was built against an older version of OpenSSL. I discovered this while trying to reproduce this bug in different Ruby environments. I was able to successfully reproduce the issue on
However, Ruby
Can someone else please verify this hypothesis? Either try reproducing the problem on Ruby 2.0.0 (which requires a modern OpenSSL version) or manually build an earlier version of Ruby with the |
This comment has been minimized.
This comment has been minimized.
dewski
commented
Mar 20, 2013
|
I am unable to test this out on the production/staging environment where this is happening as that is on Heroku, but I'll try to recompile locally and get back with any results. |
This comment has been minimized.
This comment has been minimized.
|
@dewski You can check what version of OpenSSL is installed on Heroku with the command:
As of February 24, Heroku officially supports Ruby |
This comment has been minimized.
This comment has been minimized.
dewski
commented
Mar 21, 2013
|
This comment has been minimized.
This comment has been minimized.
dewski
commented
Mar 21, 2013
|
@sferik what's the end command you're running to compile ruby? I'm not having any luck with straight |
This comment has been minimized.
This comment has been minimized.
skyshard
commented
Mar 21, 2013
|
In a heroku dyno running ruby 2.0.0p0:
looks like a custom buildpack might be needed for new heroku rubies? |
This comment has been minimized.
This comment has been minimized.
|
Apparently I was wrong about Ruby 2.0.0 requiring a recent OpenSSL version. For those who were able to upgrade Ruby 2.0.0, did that solve the problem or are you still seeing the error? @dewski I’m installing Ruby via |
This comment has been minimized.
This comment has been minimized.
skyshard
commented
Mar 21, 2013
|
Upgrading to 2.0.0 (with the old openssl) didn't solve the problem for me- still consistently getting the error. Will try rebuilding next |
This comment has been minimized.
This comment has been minimized.
iko
commented
Mar 21, 2013
|
I am able to reproduce this only when querying non-existent users. Using |
This comment has been minimized.
This comment has been minimized.
yasuoza
commented
Mar 21, 2013
|
Me too... $ ruby -v
ruby 2.0.0p0 (2013-02-24 revision 39474) [x86_64-darwin12.2.1][1] pry(main)> OpenSSL::OPENSSL_VERSION
=> "OpenSSL 1.0.1e 11 Feb 2013"
[2] pry(main)> Twitter.search('1git', :count => 10, :lang => "en", :result_type => "recent")
Twitter::Error::ClientError: end of file reached
from /Users/Yasu/.rbenv/versions/2.0.0-p0/lib/ruby/2.0.0/openssl/buffering.rb:174:in `sysread_nonblock' |
This comment has been minimized.
This comment has been minimized.
asanderson15
commented
Mar 21, 2013
|
I recompiled 1.9.3-p392 with OpenSSL 1.0.1e and confirmed the right version was running in the rails console, but still having the same problem where some terms return results while others consistently get the EOF error. It doesn't seem to be entirely intermittent. Some terms consistently work (eg git, foo), while others consistently don't (eg, 1git, 'foo bar'). And I am only able to reproduce the issue when including params like :geocode. |
This comment has been minimized.
This comment has been minimized.
|
Thanks for rebuilding your Ruby and confirming the bug, everyone. I’m not sure why it’s working for me on Ruby 2.0.0 with the latest version of OpenSSL. I’ve opened an issue with Twitter to look into the problem on their end. I’ll keep investigating on my end too. In the mean time, please use one of the workarounds described in #354. |
sferik
referenced this issue
Mar 21, 2013
Closed
Got "Faraday::Error::ConnectionFailed: end of file reached" instead of Twitter::Error::NotFound #373
This comment has been minimized.
This comment has been minimized.
dangerp
commented
Mar 21, 2013
|
Looks like a twitter dev has suggested a few options here: https://dev.twitter.com/discussions/15989 |
This comment has been minimized.
This comment has been minimized.
waynepan
commented
Mar 22, 2013
|
Posted a comment to @dangerp's link (waiting approval)... to me it might a Twitter issue? Faraday sends "Connection: close" header by default.
Any way to do the following w/o monkey patching? https://gist.github.com/waynepan/5218264 |
This comment has been minimized.
This comment has been minimized.
johnbarratt
commented
Mar 22, 2013
|
I've just added an updated post to the Twitter discussion, this appears to be a bug on Twitter's side from what I can see. Essentially for chunked responses they are not sending the final '0' chunk, and so ruby is raising an EOF error because of that. I have posted a full explaination and work around on the thread : https://dev.twitter.com/discussions/15989 Not sure if ruby should be made to be tolerant of this, perhaps depends how many rouge servers there are out there, and if there are any potential serious side effects, such as blindly accepting a partial transfer, thinking it is a full transfer. |
This comment has been minimized.
This comment has been minimized.
dewski
commented
Mar 22, 2013
|
@johnbarratt great job digging deep down into it. Looking forward to the response on Twitter's side! |
This comment has been minimized.
This comment has been minimized.
awvidmer
commented
Mar 23, 2013
|
+1 dewski re @johnbarratt : not doing a thing until Twitter responds. Hoping to have Twitter on our sites magically start working again.... :) |
This comment has been minimized.
This comment has been minimized.
mikestanley
commented
Mar 25, 2013
|
Man I'm glad others have run into this same issue. Kudos @johnbarratt for the diligence. that saved me some work. I couldn't get the Net HTTP patch to work, but I was able to utilize the Accept Encoding trick. For what it's worth, I did this without a patch.
same difference in the end. I really wish this was resolved though. I found that if the results from a search are <= 1 than this END OF FILE error is hit. otherwise it seems to work. To test this I simply add :count=>1 to the search opts and could reproduce the error every time. |
This comment has been minimized.
This comment has been minimized.
shayonj
commented
Mar 26, 2013
|
With so much information being exchanged all over the place, I am a little confused. I tried the HTTP patch but it didnt work for me. UPDATE: If the hashtag or the content you are looking for hasnt yet syndicated with twitter api yet, it gives the EOL error. At least for me it does :) |
This comment has been minimized.
This comment has been minimized.
johnbarratt
commented
Mar 26, 2013
|
@shayonj Are you using ruby 1.9.3, and adding it in after the twitter gem loads, but before your code calls it? In terms of what is happening, I just tried to follow up again on the thread on Twiter's forums (https://dev.twitter.com/discussions/15989) , but my latgest post has been moderated for some reason :( . There is a further example from @Waynep using curl, and a follow up from myself from yesterday that further seems to indicate the problem is on Twitter's side, though they haven't been able to verify it from their end as yet. Hopefully we will hear from them again before the day is out in SF. |
This comment has been minimized.
This comment has been minimized.
shayonj
commented
Mar 26, 2013
|
@johnbarratt yep i am using 1.9.3 and i tried changing the order but nothing happens. Well I really hope they figure it out :). Thanks for taking of care of it. On a side note if I run a query for client.search("#holi", :lang => "en", :result_type => "recent")It returns fine. but if I do client.search("#shayon", :lang => "en", :result_type => "recent")Which apparently only has 3 tweets in total. It returns the EOL error. Not sure why. |
This comment has been minimized.
This comment has been minimized.
johnbarratt
commented
Mar 26, 2013
|
@shayonj : If you don't care about the response being gzip encoded, you could try the workaround from @mikestanley from above:
This turns off gzip compression for the response, and works around the bug. |
This comment has been minimized.
This comment has been minimized.
shayonj
commented
Mar 26, 2013
|
@johnbarratt yep I used to test couple of things out. But gotta need a fix along with gzip compression :) |
This comment has been minimized.
This comment has been minimized.
johnbarratt
commented
Mar 26, 2013
|
FYI, Twitter can now see the error happening internally, and confirm something is broken there (see latest from @kurrik on https://dev.twitter.com/discussions/15989), so hopefully there will be a fix soon! :) |
This comment has been minimized.
This comment has been minimized.
waynepan
commented
Mar 26, 2013
|
Not sure if this is better, but this also fixes it. It retains gzip (less data) AFAIK.
|
stve
referenced this issue
Mar 27, 2013
Closed
Twitter::Error::ClientError: end of file reached #378
This comment has been minimized.
This comment has been minimized.
DavidHuie
commented
Mar 29, 2013
|
The developers at Twitter claim this issue has been fixed: https://dev.twitter.com/discussions/15989 |
This comment has been minimized.
This comment has been minimized.
rymai
commented
Mar 30, 2013
|
I confirm that it's fixed for me (and some others on the Twitter's thread)! |
This comment has been minimized.
This comment has been minimized.
shayonj
commented
Mar 30, 2013
|
same here. |
BobWalsh commentedMar 20, 2013
in a
rails csession in an app with the Twitter gem configured with my keysbut a nearly identical request gets very different results:
What is Twitter::Error::ClientError: end of file reached?