Giter Club home page Giter Club logo

Comments (4)

Jokler avatar Jokler commented on September 26, 2024

@TheGreatestJannet wrote in #56:

Describe the bug
When I poke the bot it crashes trying to spawn the musicbot

To Reproduce
Make the bot join the server.
Poke the bot

Expected behavior
The bot should spawn and not crash.

Additional context

Started TeamSpeak 3 Music Bot.
Jul 24 10:09:39 raspberrypiserver pokebot[6209]: 10:09:39.747 INFO main[3070009376] src/main.rs:137 - Starting PokeBot!
Jul 24 10:09:39 raspberrypiserver pokebot[6209]: 10:09:39.748 DEBUG main[3070009376] src/main.rs:138 - Received CLI arguments: Args { inner: ["/home/username/pokebot/pokebot"] }
Jul 24 10:09:39 raspberrypiserver pokebot[6209]: 10:09:39.750 INFO tokio-runtime-worker-0[3055541920] src/bot/master.rs:38 - Starting in TeamSpeak mode
Jul 24 10:09:39 raspberrypiserver pokebot[6209]: Jul 24 10:09:39.752 INFO TsClientlib, tsproto-version: 0.1.0+50 (7d8237408 2020-01-12) dirty 1 modification, profile: Release, version: 0.1.0+50 (7d8237408 2020-01-12) dirty 1 modification
Jul 24 10:09:39 raspberrypiserver pokebot[6209]: addr: 192.168.3.3
Jul 24 10:09:39 raspberrypiserver pokebot[6209]:  module: resolver
Jul 24 10:09:39 raspberrypiserver pokebot[6209]:   Jul 24 10:09:39.753 DEBG Starting resolve, address: 192.168.3.3
Jul 24 10:09:39 raspberrypiserver pokebot[6209]:  Jul 24 10:09:39.753 DEBG Listening, local_addr: 0.0.0.0:54003
Jul 24 10:09:39 raspberrypiserver pokebot[6209]:  Jul 24 10:09:39.753 DEBG Connecting, address: 192.168.3.3:9987
Jul 24 10:09:39 raspberrypiserver pokebot[6209]:  addr: 192.168.3.3:9987
Jul 24 10:09:39 raspberrypiserver pokebot[6209]:   Jul 24 10:09:39.793 INFO Solve RSA puzzle, y: 1144494165867687186743094000330247603842065019998206928774300524137695298330303472265629055831987549644659990717122229185824117993898517904395585259214629, n: 10549065343402011594114806496421449442441372594177463479587369570102294413871928351537841505745047525467253161775247626451355751803352453425587161514780663, x: 123528265829957324860187199024705815682340119636384652041713945973297860306033058855941401621106248731739379411381639251505508911989051492204210781820454, level: 10000
Jul 24 10:09:39 raspberrypiserver pokebot[6209]:   name: Solve RSA puzzle
Jul 24 10:09:39 raspberrypiserver pokebot[6209]:    Jul 24 10:09:39.793 INFO time report, : 0.03566937
Jul 24 10:09:39 raspberrypiserver pokebot[6209]:   Jul 24 10:09:39.793 INFO Solve RSA puzzle, level: 10000
Jul 24 10:09:40 raspberrypiserver pokebot[6209]:  Jul 24 10:09:40.804 WARN Resend, threshold: 2020-07-24 09:09:39.804028676 UTC, rto: PT1S, srtt_dev: PT1.347960763S, srtt: PT2.932378478S, to: S, last: 2020-07-24 09:09:40.804028676 UTC, tries: 2, p_id: 0, p_type: Command
Jul 24 10:09:40 raspberrypiserver pokebot[6209]:   Jul 24 10:09:40.838 INFO Changed state, new: Normal, old: Connecting
Jul 24 10:09:40 raspberrypiserver pokebot[6209]: Unknown message channellistfinished
Jul 24 10:09:40 raspberrypiserver pokebot[6209]: Unknown message notifychannelgrouplist
Jul 24 10:09:40 raspberrypiserver pokebot[6209]: Unknown message notifyclientneededpermissions
Jul 24 10:09:40 raspberrypiserver pokebot[6209]: 10:09:40.879 INFO unnamed[3036667552] /home/username/.cargo/registry/src/github.com-1ecc6299db9ec823/actix-server-1.0.1/src/builder.rs:263 - Starting 4 workers
Jul 24 10:09:40 raspberrypiserver pokebot[6209]: 10:09:40.880 INFO unnamed[3036667552] /home/username/.cargo/registry/src/github.com-1ecc6299db9ec823/actix-server-1.0.1/src/builder.rs:275 - Starting "actix-web-service-127.0.0.1:45538" service on 127.0.0.1:45538
Jul 24 10:09:40 raspberrypiserver pokebot[6209]: 10:09:40.881 TRACE actix-rt:worker:2[3019865760] /home/username/.cargo/registry/src/github.com-1ecc6299db9ec823/actix-web-2.0.0/src/middleware/logger.rs:296 - Access log format: %a "%r" %s %b "%{Referer}i" "%{User-Agent}i" %T
Jul 24 10:09:40 raspberrypiserver pokebot[6209]: 10:09:40.886 TRACE actix-rt:worker:3[3017764512] /home/username/.cargo/registry/src/github.com-1ecc6299db9ec823/actix-web-2.0.0/src/middleware/logger.rs:296 - Access log format: %a "%r" %s %b "%{Referer}i" "%{User-Agent}i" %T
Jul 24 10:09:40 raspberrypiserver pokebot[6209]: 10:09:40.888 TRACE actix-rt:worker:1[3021967008] /home/username/.cargo/registry/src/github.com-1ecc6299db9ec823/actix-web-2.0.0/src/middleware/logger.rs:296 - Access log format: %a "%r" %s %b "%{Referer}i" "%{User-Agent}i" %T
Jul 24 10:09:40 raspberrypiserver pokebot[6209]: 10:09:40.890 TRACE actix-rt:worker:0[3024068256] /home/username/.cargo/registry/src/github.com-1ecc6299db9ec823/actix-web-2.0.0/src/middleware/logger.rs:296 - Access log format: %a "%r" %s %b "%{Referer}i" "%{User-Agent}i" %T
Jul 24 10:09:49 raspberrypiserver pokebot[6209]: 10:09:49.001 INFO tokio-runtime-worker-3[3042950816] src/bot/master.rs:208 - Poked by 10, creating bot for their channel
Jul 24 10:09:49 raspberrypiserver pokebot[6209]: thread 'tokio-runtime-worker-3' panicked at 'Can find poke sender', src/bot/master.rs:104:23
Jul 24 10:09:49 raspberrypiserver pokebot[6209]: note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Jul 24 10:09:49 raspberrypiserver pokebot[6209]: thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Canceled', /home/username/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-0.1.22/src/runtime/threadpool/mod.rs:269:9
Jul 24 10:09:49 raspberrypiserver pokebot[6209]: thread 'tokio-runtime-worker-0' panicked at 'called `Result::unwrap()` on an `Err` value: SpawnError { is_shutdown: true }', /home/username/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-executor-0.1.9/src/global.rs:172:5

and

It seems that if it can't subscribe to the channel you are in and thus can't see you it crashes the bot.

from pokebot.

Jokler avatar Jokler commented on September 26, 2024

It looks like there are 2 problems:

  1. The bot does not automatically subscribe to channels that are created
  2. It panics if it can't find the user

Considering I completely forgot that you had to subscribe to channels to see users before, the second point is worse than I thought.

I'll get to fixing it.

from pokebot.

Jokler avatar Jokler commented on September 26, 2024

I am just waiting for @fkaa to come online and have a quick look at what I wrote in #57 now.

cc @TheGreatestJannet

from pokebot.

zealsprince avatar zealsprince commented on September 26, 2024

Closing the issue since it's fixed. Should add a stage for selectively subscribing to channels instead of the current .subscribe_all(); implementation.

from pokebot.

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.