Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

after encountering error, try.catch always fires. #211

Open
killedWithFire9001 opened this issue Feb 27, 2017 · 4 comments
Open

after encountering error, try.catch always fires. #211

killedWithFire9001 opened this issue Feb 27, 2017 · 4 comments
Milestone

Comments

@killedWithFire9001
Copy link

killedWithFire9001 commented Feb 27, 2017

this is an odd one for me so i will break it down the best i can

i use this code:

Twitchclient.join(channel).then(m => {
    console.log("Joined: " + m)
}).catch(err => {
    console.log("Unable to join channel: " + channel + " Error: " + err);
});

to join channels in IRC, the issue has arose since the new API update. if a channel does not exist anymore this code will throw Unable to join channel: #<ChannelName> Error: No response from Twitch.

which is expected, however ANY channel joined after will also throw this error despite there being no error, the join is also successful despite the error.

Actual behaviour:
throw error on every channel joined after joining an moved channel

Expected behaviour:
error to only throw on bad channels and not good ones joined after

Server configuration

  • Operating system: ArchLinux
  • Node version: v7.6.0
  • NPM version: 4.3.0
  • tmi.js version: 1.1.2

Server configuration

  • Operating system: CentOS 7.4
  • Node version: v7.6.0
  • NPM version: 4.1.2
  • tmi.js version: 1.1.2
@killedWithFire9001 killedWithFire9001 changed the title after encountering error, .catch always fires. after encountering error, try.catch always fires. Feb 27, 2017
@stachu540
Copy link

Probably Twitch ban your IP for limit exceeding. Reload you IP address or try something different way.
Recommending test Websocket connection into twitch IRC Websocket server from yourself and bot:
https://twitchstuff.3v.fi/chat/

@killedWithFire9001
Copy link
Author

this is nothing todo with IP bans or anything, this is a reproducible error, as i stated the join is also successful despite the error.

@stachu540
Copy link

This thing maybe still buggy like this: #163

@killedWithFire9001
Copy link
Author

yes it does look like it, the event is successful and the error can be dismissed as a false positive however when all promises reject afterwards if you was to encounter a legitimate issue its basically unrecognisable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants