question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

IOException in TwitterStream app (v5.0.3)

See original GitHub issue

I was trying to let my TwitterStream application run a longer time (overnight, so my Desktop PC switched into some kind of mode where the network connections are cut) while catching TwitterException and handling it. But there was an IOException I did not expect:

System.IO.IOException: The response ended prematurely.
   at Tweetinvi.Streams.StreamTask.RunStreamAsync()
   at Tweetinvi.Streams.StreamTask.StartAsync()
   at Tweetinvi.Streams.Helpers.StreamResultGenerator.StartAsync(Func`2 onJsonReceivedCallback, Func`1 createTwitterRequest)
   at Tweetinvi.Streams.Helpers.StreamResultGenerator.StartAsync(Action`1 onJsonReceivedCallback, Func`1 createTwitterRequest)
   at Tweetinvi.Streams.FilteredStream.StartMatchingAnyConditionAsync()
   at TwitterDotNet.LiveHashtagLogger.Run() in /a/b/c/d.cs:line 36
   at TwitterDotNet.Program.Main(String[] args) in /a/b/c/e.cs:line 27
Unhandled exception. System.IO.IOException: The response ended prematurely.
   at Tweetinvi.Streams.StreamTask.RunStreamAsync()
   at Tweetinvi.Streams.StreamTask.StartAsync()
   at Tweetinvi.Streams.Helpers.StreamResultGenerator.StartAsync(Func`2 onJsonReceivedCallback, Func`1 createTwitterRequest)
   at Tweetinvi.Streams.Helpers.StreamResultGenerator.StartAsync(Action`1 onJsonReceivedCallback, Func`1 createTwitterRequest)
   at Tweetinvi.Streams.FilteredStream.StartMatchingAnyConditionAsync()
   at a.b.Run() in /a/b/c/d.cs:line 36
   at a.Program.Main(String[] args) in /a/b/c/e.cs:line 27
   at a.Program.<Main>(String[] args)

Version Used: 5.0.3

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:1
  • Comments:16 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
linvicommented, Apr 3, 2021

Thank you for that. This is not actually a bug. I will update the documentation to reflect this.

0reactions
devjutsucommented, Jun 27, 2023

Hey, any updates on this? I have the same problem here with 5.0.4 😦

Read more comments on GitHub >

github_iconTop Results From Across the Web

tweetinvi
Tweetinvi is an intuitive .NET C# library to access the Twitter REST and STREAM API. It is a Portable Class Library that can...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found