[sockbot] I wanted a robot, So I made one
-
@UncleSam the example config i posted in the opening post should get you a bot that runs the summoner plugin using Zoidberg quotes.
Do you get any output on the console when you run your configuration? can you please post the output you have, either here or in a private chat with me?
-
i get this output, but nothing more hapens.
[2016-06-01T13:18:16.637Z] Starting Sockbot 3.1.0 - Beta Badger
[2016-06-01T13:18:16.653Z] Loaded configuration file: example.config.yml
[2016-06-01T13:18:16.654Z] Activating logon: DumDum
[2016-06-01T13:18:16.859Z] Using provider nodebb for DumDum
[2016-06-01T13:18:16.863Z] Loading plugin summoner for DumDum
[2016-06-01T13:18:16.865Z] DumDum ready for login
[2016-06-01T13:18:18.155Z] DumDum login successful
[2016-06-01T13:18:43.193Z] Ping exchanged with 1ms latency
[2016-06-01T13:19:08.200Z] Ping exchanged with 0ms latency
[2016-06-01T13:19:33.208Z] Ping exchanged with 1ms latency
[2016-06-01T13:19:58.230Z] Ping exchanged with 1ms latency
[2016-06-01T13:20:23.235Z] Ping exchanged with 1ms latency -
@UncleSam that looks like a good login output to me.
what happens when you @mention the bot account on the forum to trigger the summon?
if that still fails try sending the following to the bot in a chat:
!help
does the bot reply to that chat with anything?
if not please try starting the bot in debug mode and capturing the output from that by executing:
$> DEBUG=sockbot* sockbot path/to/config.yml
-
Nah nothing happens when i try @mention and !help
in debug mode i get this
[2016-06-01T18:20:16.337Z] Starting Sockbot 3.1.0 - Beta Badger
[2016-06-01T18:20:16.354Z] Loaded configuration file: example.config.yml
[2016-06-01T18:20:16.354Z] Activating logon: DumDum
sockbot requiring providers nodebb as /usr/lib/node_modules/sockbot/lib/../providers/nodebb +0ms
[2016-06-01T18:20:16.559Z] Using provider nodebb for DumDum
[2016-06-01T18:20:16.563Z] Loading plugin summoner for DumDum
sockbot requiring plugins summoner as /usr/lib/node_modules/sockbot/lib/../plugins/summoner +208ms
[2016-06-01T18:20:16.567Z] DumDum ready for login
sockbot:provider:nodebb begin configuration fetch for CSRF token +4ms
sockbot:provider:nodebb completed configuration fetch for CSRF token +47ms
sockbot:provider:nodebb begin post login data +0ms
sockbot:provider:nodebb complete post login data +1s
[2016-06-01T18:20:17.885Z] DumDum login successful
sockbot:provider:nodebb:user retrieving user by login DumDum +94ms
sockbot:provider:nodebb:user retrieving user by login accalia +6ms
[2016-06-01T18:20:42.963Z] Ping exchanged with 2ms latency
[2016-06-01T18:21:07.970Z] Ping exchanged with 1ms latency
[2016-06-01T18:21:32.993Z] Ping exchanged with 1ms latency
[2016-06-01T18:21:57.999Z] Ping exchanged with 0ms latency
[2016-06-01T18:22:23.016Z] Ping exchanged with 0ms latency
[2016-06-01T18:22:48.026Z] Ping exchanged with 1ms latency -
@UncleSam that's........ strange.....
if you manually log into the bot account and view its profile page can you see any existing login sessions under the settings page.
they should show up as
unknown on Linux
orunknown on Windows
depending on what OS the bot is running on (looks like Linux from your logs) -
@UncleSam huh. and did the bot actually receive notifications from the forum in the time period it was online?
if so.... i'm very confused.... but never fear i will figure this out. there's one more piece of debugging available to me!
could you enable Ultra Debug Mode<sup>TM</sup> and send me a link via chat to a pastebin or gist of the file it generates?
There is a possibility of sensitive information being revealed through Ultra Debug Mode<sup>TM</sup> so please make sure the pastebin or gist is private and send the link to me over chat, rather than posting on the forum.
to enable Ultra Debug Mode<sup>TM</sup> run the bot with the following command:
$> DEBUG=* sockbot /path/to/config.yml 2>&1 | tee logfile.txt
then run the bot through it's paces by mentioning it and sending the help command via chat to the bot before sending me
logfile.txt
That should provide me with all the necessary information to determine what's gone wrong.
Thank you for your patience and understanding in this matter.
-
Release v3.1.1 has been released to github and npm
Fixes several bugs in 3.1.10 including (but not limited to)
- Mentions were not being processed correctly, breaking the summoner plugin
Notable updates in this merge:
- update travis and tests for release of nodejs 6.0
- resolve SockDrawer/SockBot#305
- add formatters to format URLs for a forum.
- add quoteText format function. resolves SockDrawer/SockBot#309, enables SockDrawer/sockMafia#66
- add misc format functions resolves SockDrawer/SockBot#311
- change post link format, resolves SockDrawer/SockBot#308
- release version 3.1.1 fixing mention notifications
-
@UncleSam please install the new version and test. it should resolve your issue with the summoner plugin.
-
@accalia tried to run and getting this
sockbot example.config.yml
const path = require('path');
^^^^^
SyntaxError: Use of const in strict mode.
at exports.runInThisContext (vm.js:73:16)
at Module._compile (module.js:443:25)
at Object.Module._extensions..js (module.js:478:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Function.Module.runMain (module.js:501:10)
at startup (node.js:129:16)
at node.js:814:3 -
@exodo said in [sockbot] I wanted a robot, So I made one:
SyntaxError: Use of const in strict mode.
hmm...
let me guess..... node version 0.12?
sockbot unfortunately uses a lot of features of ES6 and thus requires version 4.0 to run.
it may be possible to run in version 0.12 using the
--harmony
command line flag but that configuration is, unfortunately not supported. -
@accalia said in [sockbot] I wanted a robot, So I made one:
@exodo said in [sockbot] I wanted a robot, So I made one:
SyntaxError: Use of const in strict mode.
hmm...
let me guess..... node version 0.12?
sockbot unfortunately uses a lot of features of ES6 and thus requires version 4.0 to run.
it may be possible to run in version 0.12 using the
--harmony
command line flag but that configuration is, unfortunately not supported.i see, my test server doesnt support that new realeases, thank anyways
-
@exodo said in [sockbot] I wanted a robot, So I made one:
i see, my test server doesnt support that new realeases, thank anyways
unless there's a specific reason why the newer versions of nodejs are not supported i have found nvm to work just fine for managing multiple versions of nodsjs.
in fact all development for sockbot is done using nvm installed version of node so as to allow me to quickly switch between versions to test functionality against multiple versions of nodejs.
I'd be happy to help you set up a user account on your test server with nvm so that you can use sockbot on that server without interfering with the already installed applications..... if that's a thing you'd like to do?
I have also confirmed that cloud9 ide fully supports sockbot in its free tier (and comes with nvm preconfigured). Workspaces for the free tier are quickly frozen when idle, so good for testing, not so good for long term use.
-
@accalia said in [sockbot] I wanted a robot, So I made one:
@exodo said in [sockbot] I wanted a robot, So I made one:
i see, my test server doesnt support that new realeases, thank anyways
unless there's a specific reason why the newer versions of nodejs are not supported i have found nvm to work just fine for managing multiple versions of nodsjs.
in fact all development for sockbot is done using nvm installed version of node so as to allow me to quickly switch between versions to test functionality against multiple versions of nodejs.
I'd be happy to help you set up a user account on your test server with nvm so that you can use sockbot on that server without interfering with the already installed applications..... if that's a thing you'd like to do?
I have also confirmed that cloud9 ide fully supports sockbot in its free tier (and comes with nvm preconfigured). Workspaces for the free tier are quickly frozen when idle, so good for testing, not so good for long term use.
thanks for the support, i wil check all that
i work on synology so actually i think its not posible to update it -
@exodo said in [sockbot] I wanted a robot, So I made one:
i work on synology so actually i think its not posible to update it
hmm... interesting. don't think i've worked with them before. I've got a QNAP NAS myself and use an Intel NUC, or a Raspberry Pi, as my test box....
still NVM should work for you, it installs to your home directory so it doesn't interfere with other users or the system.
@exodo said in [sockbot] I wanted a robot, So I made one:
thanks for the support
no worries. it's what i do. let me know if i can do anything more to help.
-
When i install bot ant try to run it i get error
"nodebb A-derp! Fatal Startup Error: Unexpected token < " HELP? -
@Domas-Vileikis interesting error...
could you post the configuration file you are using for the bot (with password redacted for security) so i can take a look at it? most errors like this are simple typos in configuration and should be easy to solve.
-
@julian true, but as this is a startup error it's highly likely to be caused by a misconfiguration in the config file (usually the wrong URL for the forum)