Streams unreliable for collecting tweets from slow tweeting accounts
See original GitHub issuePrerequisites
- Put an X between the brackets on this line if you have done all of the
following:
- Checked that your issue isn’t already filed: [open issues][open-issues]
- Checked the [bug report guidelines][bug-report-guidelines]
Description
The streams part of twitter-v2 is unreliable. I’ve set it to monitor five twitter accounts that tweet about once every six hours.
Steps to Reproduce
- Watch several accounts in a filtered stream that don’t post that often.
- Start streaming tweets
- Streams randomly quit within 30-45 minutes or less.
Expected behaviour:
Should be able to run indefinitely. twitter-v2 should not disconnect the stream just because it thinks the stream is unresponsive. The sample code by Twitter themselves does not have this behaviour.
Actual behaviour:
Streams randomly hit this._closeWithError
.
at Timeout.<anonymous> (/home/rctgamer3/project/node_modules/twitter-v2/src/TwitterStream.js:50:30)
at listOnTimeout (internal/timers.js:554:17)
at processTimers (internal/timers.js:497:7)
Stream timeout’s, and throws a TwitterError that the stream is unresponsive. Reproduces how often: Always, the only variable is the time until it closes the stream.
Versions
1.0.8
Additional Information
If you need any further information to triage things, let me know.
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (1 by maintainers)
Top Results From Across the Web
Sampled stream - Handling disconnections - Twitter Developer
Every streaming connection is backed by a queue of messages to be sent to the client. If this queue grows too large over...
Read more >Twitter's Broken Its Copyright Strike System, Users ... - Forbes
Last night, it became apparent that Twitter's automated copyright strike/takedown system was no longer functional.
Read more >Twitter Sentiment Analysis: A tale of Stream Processing
Create a Twitter Developer account to access the API. In order to start collecting all those tweets, we will need a Twitter Developer ......
Read more >Exclusive: Twitter is losing its most active users, internal ...
These "heavy tweeters" account for less than 10% of monthly overall users but generate 90% of all tweets and half of global revenue....
Read more >13 Should We Use the Sample? Analyzing Datasets Sampled ...
Meanwhile, we gather the tweets of these users returned by the Twitter stream API at the same time period with two different access...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
This is code to reproduce:
And this is results:
First json when I posted tweet:
https://twitter.com/PreciseLabPL/status/1407654882488823808
Next error some minutes after my tweet and next error some minutes after.
There is connected topic:
https://twittercommunity.com/t/filtered-stream-disconnects-every-5-minutes-on-nodejs/153866/7
My rules:
There is connected issue:
https://github.com/twitterdev/Twitter-API-v2-sample-code/issues/34
I finally suggest write in README that this package can be used ONLY with
node 12
until mentioned issue will be solved and that twitter developers are aware of this bug and works to fix it.I confirming that
fixed problem.