Site Streams connection issues

Showing 1-1 of 1 messages
Site Streams connection issues Mike Champion 3/25/14 12:07 PM
We use Twitter Site Streams with twitter4j 3.0.5 and in the past few days (I believe beginning last week around March 19th) started seeing exceptions when twitter4j was reading messages off the stream.

I confirmed with TwitterDev that they did deploy server-side changes that it appears twitter4j isn't handling well.


The type of exceptions I was seeing were like:

TwitterException{exceptionCode=[f3d9862d-00072225 f3d9862d-000721b3], statusCode=-1, message=null, code=-1, retryAfter=-1, rateLimitStatus=null, version=3.0.5}
  at twitter4j.StatusStreamBase.handleNextElement(StatusStreamBase.java:199)
  at twitter4j.SiteStreamsImpl.next(SiteStreamsImpl.java:256)
  at twitter4j.TwitterStreamImpl$TwitterStreamConsumer.run(TwitterStreamImpl.java:478)
Caused by: java.util.zip.ZipException: invalid distance code
  at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:147)
  at java.util.zip.GZIPInputStream.read(GZIPInputStream.java:90)
  at sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:264)
  at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:306)
  at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:158)
  at java.io.InputStreamReader.read(InputStreamReader.java:167)
  at java.io.BufferedReader.fill(BufferedReader.java:136)
  at java.io.BufferedReader.readLine(BufferedReader.java:299)
  at java.io.BufferedReader.readLine(BufferedReader.java:362)
  at twitter4j.StatusStreamBase.handleNextElement(StatusStreamBase.java:85)
  ... 2 more


The workaround has been to disable Gzip in the configuration builder ("setGZIPEnabled") and that appeared to fix the parsing issues. I briefly tried the 4.0 build to see if that would fix it but it appeared to have the same problem.

I haven't gotten clarification on what exactly changed in the messages coming from twitter. 

I wanted to post here to let others know as it might impact UserStreams as well as Site Streams. Please let me know if there is other information I can provide to help clarify the issue.

Thanks,

-mike