Giter Site home page Giter Site logo

Comments (15)

jlplenio avatar jlplenio commented on June 12, 2024

Thank you for your detailed problem report. I see two options:

  1. We can investigate if it's an issue with my tool, Playwright or Twitch. I suspect that bad javascript code in this event is driving up CPU usage and all instances spike simultaneously. So I could try to prevent it from executing.
  2. We can verify that this issue only occurs when the chat tab is open. In my current implementation, the chat tab must be open to chat. I am thinking about moving away from this method and using IRC directly. This would then work like the GitHub version, probably without spikes and with a separate IRC chat connection per instance. This way we could also have users appearing and participating in chat but not in the viewer count.

Both options would result in the instances not being able to participate in the events. I have no problem with that.

from crude-twitch-viewer-bot.

MarsToyStore avatar MarsToyStore commented on June 12, 2024

Thank you for your prompt reply.

I don't use the version with the chat tab (0.8), the problem predates the existence of chat implementation - 0.7 - (you can reproduce it in 0.6 KoFi).

I don't use token to take part in these Events, so I don't care if they can't participate in them.
Be careful though, when you investigate the problem, it may disable participation in raids (?), not sure but the Event tab looks like poll / prediction / shoutout / hype train Event, when launching a raid.

from crude-twitch-viewer-bot.

jnwright avatar jnwright commented on June 12, 2024

@MarsToyStore interesting! raids stopped working for me recently; maybe this is related?

from crude-twitch-viewer-bot.

jlplenio avatar jlplenio commented on June 12, 2024

@jnwright @MarsToyStore In any CTVBot version that allows token usage, the chat window will be open. This is because in order for the user to appear in the chat list, the chat tab has to be open i.e. a websocket is open to the Twitch IRC chat. So I still see promise in having the chat tab closed, which should prevent the spikes?! and I handle the chat connection directly from the tool to IRC, without the detour through the browser chat window. Should be less resource intensive, we could have low-cost users appearing only in chat, the tool can read the chat more easily, with a stable connection to e.g. have artificial chatters backed by openai in the future.

from crude-twitch-viewer-bot.

MarsToyStore avatar MarsToyStore commented on June 12, 2024

@jlplenio I meant the implementation of the chat tab in CTVBot.
Your IRC solution will prevent users-bots from joining raids. It's not a good solution, isn't it?

We simply need to check and understand why events tabs such as polls or predictions which appear at the top of the chat tab on Twitch cause these spikes. Then fix it, if you have time. I'm not interested in using these bots for chatting, I mainly use them for raids.

from crude-twitch-viewer-bot.

darkstarworks avatar darkstarworks commented on June 12, 2024

from crude-twitch-viewer-bot.

jlplenio avatar jlplenio commented on June 12, 2024

@MarsToyStore So you assume that the spike also happens when the raid initiates and thus the instance are too busy to follow?
I was unaware that raids are that important. I though having light-weight chat solution which lightens the cpu load of each instance would be more favorable.

@darkstarworks Even though my code is far from the best, the greatest challenge is fine-tuning multiple Playwright chrome instances and all eventualities that could cause instability, e.g. ram leakage or javascript usage spikes.

from crude-twitch-viewer-bot.

darkstarworks avatar darkstarworks commented on June 12, 2024

from crude-twitch-viewer-bot.

jlplenio avatar jlplenio commented on June 12, 2024

@darkstarworks Judging by the old repositories on GitHub, there were more efficient ways to create viewers. But AFAIK they were all "fixed" by Twitch. Playwright just automates real browsers, which is super hard to tell. Although resource intensive, this crude solution just works, has worked in the past, and will work in the future. Plus, we can use this technique on many websites.

@MarsToyStore Two question:

  1. Do you know if the raid popup causes spikes?
  2. Do you know if the instances that do not follow the raid are marked as bot-detected?
    257629075-1265d52e-61f3-4bbc-a6dc-3e078d5285e2

from crude-twitch-viewer-bot.

MarsToyStore avatar MarsToyStore commented on June 12, 2024

The issue preventing accounts from joining raids seems recent.
The problem I'm talking about - Event popups causing spikes - is an old one. Also, until a few weeks ago, it was possible for these account to join raid despite this bug. I am sure of that.
So I don't think it's related to your first point.

However, I've noticed that now almost all my instances are "Bot detected" very quickly. It may be related. I don't know.

Nevertheless, I'd be very grateful if you could fix these event spikes as soon as possible.
A such drop of viewer - due to the spikes crashing instances - as soon as there is a poll, a prediction, a shoutout command is really annoying. Raid is just a part of the current issue.

from crude-twitch-viewer-bot.

jlplenio avatar jlplenio commented on June 12, 2024

If bot detected is true, this instance cannot follow or accept chat rules. It would make sense that they wouldn't follow raids, either. This is my best guess — yet. I will troubleshoot it after the holidays by setting up my own stream and starting quizzes?! What's the most reliable way I can recreate the problem? I agree that the focus should be on these spikes first and raid problems second.

from crude-twitch-viewer-bot.

MarsToyStore avatar MarsToyStore commented on June 12, 2024

@jlplenio The procedure seems straightforward to me.
Start a stream with at least 30 blue bots on KoFi version 0.7 or 0.8.
Launch a poll. Write "/poll" with your stream account, and write the question you want, and the answers you want.
Observe.

This also works with predictions, or the /shoutout command, etc.

from crude-twitch-viewer-bot.

jlplenio avatar jlplenio commented on June 12, 2024

Thank you for your patience. I tried my hand in fixing or at least reducing the spikes in the newest version: #235
Thank you for the tutorial @MarsToyStore, I had never streamed before. Additional things I noticed during troubleshooting:

  • instances that were not logged in followed the raids
  • in the new version the spikes are reduced in peak and duration - but raid spikes still seem to last longer

I still suspect that instances, that have the "bot detected" flag set to true in the debug menu, are those that don't follow raids.

from crude-twitch-viewer-bot.

Alexistexas9697 avatar Alexistexas9697 commented on June 12, 2024

It is really important that bots go to another publisher via raid. There is no need to write or follow the chat he goes to. Because I have approximately +200 instant natural viewers, with this bot I increase this number to +300 viewers by adding +100 more viewers. However, since I am using the free version (I am not using tokens for now), a maximum of 200 viewers participate in the raids. For streamers like me, these bots need to participate in raids with determination. In fact, such successful programs are used by streamers like me who have regular viewers. Someone who is new to the streaming business does not use such programs by paying a fee, they generally use intermediary sites. I'm waiting for you to fully handle this "raid" issue. Once you're fully successful, I'll switch to the paid version. You really do your job well, it makes me happy that you are so interested in your job. I hope you never quit this job, because we can boost ourselves by using it :)

Edit: I have one more question, I want to buy this special version for supporters with a subscription from Ko-Fi. When I buy this, I want to add this program to both my own computer and the remote server (since my own system is insufficient, I divide it between 50proxy and 50proxy and thus I can send +100 bots). Do I need to buy 2 different subscriptions for this? If so, paying €20 every month would make me very upset. I live in a country where the Euro is very valuable and it can be very difficult to afford it every month. :(

from crude-twitch-viewer-bot.

jlplenio avatar jlplenio commented on June 12, 2024

I still suspect that instances, that have the "bot detected" flag set to true in the debug menu, are those that don't follow raids.

  1. I can never guarantee that the raids will work as there are too many parts at play that I cannot control (tokens, user-agents,
    proxies) and then the instances will get flagged and won't follow raids. If everyhing is clean and fine, it shoud work.

  2. ko-fi is first and foremost a way to support and motivate me to improve the tool. Once you subscribe, you can download this version of the tool and keep it forever - it is not tied to kofi. It is not a problem if you cancel the subscription immediately if you do not have the resources.

from crude-twitch-viewer-bot.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.