I’m pretty certain this isn’t a bug but it’s driving me nuts. If I do the following I get no responses from the bot:
I can verify that responding to the bot works for new users. There’s no issue there. But for some reason my admin account never triggers a reply from the bot. And I haven’t been able to locate an error anywhere in the console or in
I should also note that I have two other instances that I’ve tested this on and it works flawlessly. I’m simply at a loss for where to look next. Ideas?
I assume you changed the name of the bot.
Try re-name to discobot and try again
Well, that was certainly something I missed trying. But no dice. I changed it back, tried to trigger
display help, and still no response.
Not sure @tgxworld would need to weigh in. Could be the rename but that is supported.
Depending the version of Discourse/Narative Bot you are on, there was at one point a requirement of a rebuild for the rename to take effect. I know that requirement is no longer necessary, but maybe it was a timing thing and doing a rebuild would clear it up now?
stupid question - did you disable public replies?
I was operating on that assumption originally. I didn’t realize until later that it wasn’t required if I was on latest first. So I made the change and then ran a rebuild. It didn’t make any difference.
Good thing to check on for sure. I wish that had been it, but it’s not. Good call, though.
If you did a bot rename on an old version you may have run into a bug; I suggest restarting the docker container to make sure all values are reloaded.
Just tried a
stop app and
start app. No change there. Could there be a rate limiter involved here?
I vaguely remember having had similar issues after renaming the bot and after some time (perhaps after I rebuilt?) it suddenly worked again. That was more than a month ago, though.
There are a couple of things you can check.
What is the locale of the site/your user locale?
Do someone rename the trigger in site settings text customizations?
Locales are both English.
I’ve not touched any text customizations. I’m the only admin on the site.
I did do a bit more digging and found a potential error that’s related. It didn’t seem relevant at the time and it still doesn’t add up to me why failing once would cause it to continue to fail. Either way, here’s the trace:
Job exception: RateLimiter::LimitExceeded
/var/www/discourse/lib/rate_limiter/on_create_record.rb:42:in `block in rate_limit'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.8/lib/active_support/callbacks.rb:446:in `block in make_lambda'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.8/lib/active_support/callbacks.rb:228:in `block in halting_and_conditional'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.8/lib/active_support/callbacks.rb:506:in `block in call'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.8/lib/active_record/callbacks.rb:302:in `block in create_or_update'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.8/lib/active_support/callbacks.rb:555:in `block (2 levels) in compile'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.8/lib/active_record/transactions.rb:286:in `block (2 levels) in save'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.8/lib/active_record/transactions.rb:351:in `block in with_transaction_returning_status'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.8/lib/active_record/transactions.rb:286:in `block in save'
/var/www/discourse/lib/post_creator.rb:143:in `block in create'
/var/www/discourse/lib/post_creator.rb:293:in `block in transaction'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.8/lib/active_record/connection_adapters/abstract/database_statements.rb:213:in `block in transaction'
/var/www/discourse/plugins/discourse-narrative-bot/lib/discourse_narrative_bot/base.rb:49:in `block in input'
/var/www/discourse/plugins/discourse-narrative-bot/lib/discourse_narrative_bot/advanced_user_narrative.rb:375:in `block in synchronize'
/var/www/discourse/plugins/discourse-narrative-bot/jobs/narrative_init.rb:8:in `block in execute'
/var/www/discourse/app/jobs/base.rb:154:in `block (2 levels) in perform'
Thinking about this a bit further, would it make sense to manually trigger the
NarrativeInit job? That seems to be where the beginning of that trace develops.
Just gave it a try. No dice. I’m on 30f275. Is there a log file somewhere I can run through to see what’s going on when the trigger phrase is used? That’s the only thing I can think of right now since there are no errors. I’ve tried numerous ways of reproducing this and can’t get it done.
Hmm can you try to trigger a job manually? Is the site we’re talking about feverbee?
Ok. Here’s what I did.
enter app and ran
Jobs.enqueue(:narrative_init, user_id: 1, klass:DiscourseNarrativeBot::NewUserNarrative.to_s)
- I received the welcome message from the bot but bookmarking the message does nothing.
- I checked all my settings for the bot to make sure I didn’t miss something. Here’s what I have:
- I managed to find the log files on the server but nothing stands out as odd to me.
- No errors in console or /logs.
And the site in question is productivityguild.com
Are you still the only user that is unable to interact with the bot? If not can you ensure that Sidekiq is running?
It’s still just me. I can create a new user and it works fine. Sidekiq is running. That’s how I was able to manually trigger the job.
Ah ha do you have mailing list mode enabled?