Comments (4)
I randomly get this as well, and I had to downgrade to Tokio 0.2 otherwise I'd get an error related to Tokio's reactor not running. But it seems unpredictable.
from twitchchat.
Update: as a temporary workaround, I use a simple spinloop that tries to connect at most once per second. So if the connection fails, it'll try again one second later, until it (randomly) succeeds.
use tokio::{join, time::delay_for}; //Using the Tokio runtime
...
loop {
println!("connecting to twitch...");
//Avoid spinning like a maniac when an error occurs repeatedly
let minimum_loop_delay = delay_for(Duration::from_millis(1000));
//Join the two futures together so we wait on them both concurrently
match join!(twitch_loop(), minimum_loop_delay) {
(Ok(()), _) => println!("connected to twitch!"),
(Err(e), _) => println!("twitch conn. failed: {:?}", e),
}
}
from twitchchat.
Update2: it turns out if you change your password or enable 2FA, you get this error repeatedly and consistently until you generate a new OAuth2 key. Then it works like 90% of the time, the other 10% I just spinloop until it works, see my code above.
from twitchchat.
The best I was able to reproduce was by passing in a bogus oauth token. The streams looked like so:
> CAP REQ :twitch.tv/membership
> CAP REQ :twitch.tv/tags
> CAP REQ :twitch.tv/commands
> PASS oauth:12345....XYZ
> NICK mrhalzy
< :tmi.twitch.tv CAP * ACK :twitch.tv/membership
< :tmi.twitch.tv CAP * ACK :twitch.tv/tags
< :tmi.twitch.tv CAP * ACK :twitch.tv/commands
< :tmi.twitch.tv NOTICE * :Login authentication failed
I suspect it's the last line that doesn't parse.
from twitchchat.
Related Issues (20)
- The README is out of date. It mentions 0.13 and we're on 0.14
- TLS connectors can panic when DNS resolution fails
- Channel names should be lowercased, even if the user provided another casing. HOT 1
- Make a big note about the commands conversion
- Tracking issue for websockets HOT 1
- Upgrade to tokio 0.3 HOT 5
- Add support for tokio-openssl HOT 1
- Add support for async-net
- Look into caching for the CI
- Add CI steps for rustfmt, clippy, etc
- Crate panics when IRC tag "display-name" contains non valid ascii HOT 1
- Crate panics when IRC Tag contain non ascii characters HOT 7
- Panic caused by an expect call HOT 9
- Privmsg::is_vip() incorrectly returns if the user is the broadcaster. HOT 1
- I'm looking for maintainers for this crate. HOT 4
- user_id type is different in Identity compared with user_id and room_id of messages HOT 1
- there is no reactor running, must be called from the context of a Tokio 0.2.x runtime HOT 2
- Chat commands are being deprecated
- Emote identifiers can be strings HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from twitchchat.