Known Bots

Known Bots 6.1.0

No permission to download
@Sim Server error log

Code:
Error: Call to undefined method XF\Mail\Mail::getMessageObject() src/addons/Hampel/KnownBots/Service/UserAgentMailer.php:34

Generated by: Unknown account Jul 17, 2024 at 8:15 AM

Stack trace

#0 src/addons/Hampel/KnownBots/Cron/SendAgents.php(85): Hampel\KnownBots\Service\UserAgentMailer->mailUserAgents()
#1 src/addons/Hampel/KnownBots/Cron/SendAgents.php(53): Hampel\KnownBots\Cron\SendAgents::sendEmail(Array)
#2 src/XF/Job/Cron.php(42): Hampel\KnownBots\Cron\SendAgents::send(Object(XF\Entity\CronEntry))
#3 src/XF/Job/Manager.php(275): XF\Job\Cron->run(7.98519)
#4 src/XF/Job/Manager.php(205): XF\Job\Manager->runJobInternal(Array, 7.98519)
#5 src/XF/Job/Manager.php(89): XF\Job\Manager->runJobEntry(Array, 7.98519)
#6 job.php(46): XF\Job\Manager->runQueue(false, 8)
#7 {main}

Request state

array(4) {
  ["url"] => string(8) "/job.php"
  ["referrer"] => string(58) "threads/ma.99762/"
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(0) {
  }
}
 
  • Like
Reactions: Sim
yes this will be one of the things that changed with 2.3 that I missed - I'm out of the office this week - I will take a look when I get back in a couple of days
 
@Sim Server error log

Code:
Error: Call to undefined method XF\Mail\Mail::getMessageObject() src/addons/Hampel/KnownBots/Service/UserAgentMailer.php:34

Generated by: Unknown account Jul 17, 2024 at 8:15 AM

Stack trace

#0 src/addons/Hampel/KnownBots/Cron/SendAgents.php(85): Hampel\KnownBots\Service\UserAgentMailer->mailUserAgents()
#1 src/addons/Hampel/KnownBots/Cron/SendAgents.php(53): Hampel\KnownBots\Cron\SendAgents::sendEmail(Array)
#2 src/XF/Job/Cron.php(42): Hampel\KnownBots\Cron\SendAgents::send(Object(XF\Entity\CronEntry))
#3 src/XF/Job/Manager.php(275): XF\Job\Cron->run(7.98519)
#4 src/XF/Job/Manager.php(205): XF\Job\Manager->runJobInternal(Array, 7.98519)
#5 src/XF/Job/Manager.php(89): XF\Job\Manager->runJobEntry(Array, 7.98519)
#6 job.php(46): XF\Job\Manager->runQueue(false, 8)
#7 {main}

Request state

array(4) {
  ["url"] => string(8) "/job.php"
  ["referrer"] => string(58) "threads/ma.99762/"
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(0) {
  }
}

This has been fixed in v6.0.5 - thanks for bringing it to my attention.
 
I got some server errors related to this add on, then completely de-installed it, downloaded the new version and when trying to install got this:
 

Attachments

  • Clipboard01.webp
    Clipboard01.webp
    18.5 KB · Views: 8
this is the server error log


Server error log



  • InvalidArgumentException: Batch install error: Container key 'knownbots.api' was not found
  • src/XF/Container.php:48

  • Generated by: sam2019
  • Jul 21, 2024 at 3:39 AM


Stack trace​



#0 src/XF/App.php(2814): XF\Container->offsetGet('knownbots.api')
#1 src/addons/Hampel/KnownBots/Setup.php(188): XF\App->offsetGet('knownbots.api')
#2 src/addons/Hampel/KnownBots/Setup.php(110): Hampel\KnownBots\Setup->getApi()
#3 src/addons/Hampel/KnownBots/Setup.php(34): Hampel\KnownBots\Setup->loadBots()
#4 src/XF/AddOn/AddOn.php(575): Hampel\KnownBots\Setup->postInstall(Array)
#5 src/XF/Job/AddOnInstallBatch.php(389): XF\AddOn\AddOn->postInstall(Array)
#6 src/XF/Job/AddOnInstallBatch.php(103): XF\Job\AddOnInstallBatch->stepFinalize(Object(XF\Timer))
#7 src/XF/Job/Manager.php(275): XF\Job\AddOnInstallBatch->run(8)
#8 src/XF/Job/Manager.php(205): XF\Job\Manager->runJobInternal(Array, 8)
#9 src/XF/Job/Manager.php(121): XF\Job\Manager->runJobEntry(Array, 8)
#10 src/XF/Admin/Controller/ToolsController.php(146): XF\Job\Manager->runByIds(Array, 8)
#11 src/XF/Mvc/Dispatcher.php(362): XF\Admin\Controller\ToolsController->actionRunJob(Object(XF\Mvc\ParameterBag))
#12 src/XF/Mvc/Dispatcher.php(264): XF\Mvc\Dispatcher->dispatchClass('XF:Tools', 'RunJob', Object(XF\Mvc\RouteMatch), Object(XF\Admin\Controller\ToolsController), NULL)
#13 src/XF/Mvc/Dispatcher.php(121): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(XF\Admin\Controller\ToolsController), NULL)
#14 src/XF/Mvc/Dispatcher.php(63): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#15 src/XF/App.php(2777): XF\Mvc\Dispatcher->run()
#16 src/XF.php(798): XF\App->run()
#17 admin.php(15): XF::runApp('XF\\Admin\\App')
#18 {main}


Request state​



array(4) {
["url"] => string(24) "/admin.php?tools/run-job"
["referrer"] => string(57) "https://forum.himalayan-tools.com/admin.php?tools/run-job"
["_GET"] => array(1) {
["tools/run-job"] => string(0) ""
}
["_POST"] => array(3) {
["_xfRedirect"] => string(92) "https://forum.himalayan-tools.com/admin.php?add-ons/install-from-archive-complete&batch_id=4"
["_xfToken"] => string(8) "********"
["only_ids"] => string(4) "6045"
}
}
 
your add-on seems to have developed into a veritable land mine, disabling my forum entirely

I have now completely de installed it but still get this error:

Exception: Could not find class Hampel\KnownBots\XF\Repository\SessionActivity when attempting to extend XF\Repository\SessionActivityRepository in src/XF/Extension.php at line 217

XF\Extension->extendClass() in src/XF/Mvc/Entity/Manager.php at line 295
XF\Mvc\Entity\Manager->getRepository() in src/XF/Mvc/Controller.php at line 1051
XF\Mvc\Controller->repository() in src/XF/Admin/Controller/IndexController.php at line 43
XF\Admin\Controller\IndexController->actionIndex() in src/XF/Mvc/Dispatcher.php at line 362
XF\Mvc\Dispatcher->dispatchClass() in src/XF/Mvc/Dispatcher.php at line 264
XF\Mvc\Dispatcher->dispatchFromMatch() in src/XF/Mvc/Dispatcher.php at line 121
XF\Mvc\Dispatcher->dispatchLoop() in src/XF/Mvc/Dispatcher.php at line 63
XF\Mvc\Dispatcher->run() in src/XF/App.php at line 2777
XF\App->run() in src/XF.php at line 798
XF::runApp() in admin.php at line 15
 

Attachments

  • Clipboard01.webp
    Clipboard01.webp
    130.7 KB · Views: 5
After I re-installed a freshly downloaded version it seems to work but I would have a look at the de-install routine. it seems to not work as it should.
 
I got some server errors related to this add on, then completely de-installed it, downloaded the new version and when trying to install got this:

I just tried to install the addon on a brand new XF2.3 installation and it succeeded with no errors.

I suspect something went wrong with your XF 2.3 upgrade?
 
After I re-installed a freshly downloaded version it seems to work but I would have a look at the de-install routine. it seems to not work as it should.

Were there any errors logged in relation to uninstalling the addon?
 
this is the server error log


Server error log



  • InvalidArgumentException: Batch install error: Container key 'knownbots.api' was not found
  • src/XF/Container.php:48

  • Generated by: sam2019
  • Jul 21, 2024 at 3:39 AM


Stack trace​



#0 src/XF/App.php(2814): XF\Container->offsetGet('knownbots.api')
#1 src/addons/Hampel/KnownBots/Setup.php(188): XF\App->offsetGet('knownbots.api')
#2 src/addons/Hampel/KnownBots/Setup.php(110): Hampel\KnownBots\Setup->getApi()
#3 src/addons/Hampel/KnownBots/Setup.php(34): Hampel\KnownBots\Setup->loadBots()
#4 src/XF/AddOn/AddOn.php(575): Hampel\KnownBots\Setup->postInstall(Array)
#5 src/XF/Job/AddOnInstallBatch.php(389): XF\AddOn\AddOn->postInstall(Array)
#6 src/XF/Job/AddOnInstallBatch.php(103): XF\Job\AddOnInstallBatch->stepFinalize(Object(XF\Timer))
#7 src/XF/Job/Manager.php(275): XF\Job\AddOnInstallBatch->run(8)
#8 src/XF/Job/Manager.php(205): XF\Job\Manager->runJobInternal(Array, 8)
#9 src/XF/Job/Manager.php(121): XF\Job\Manager->runJobEntry(Array, 8)
#10 src/XF/Admin/Controller/ToolsController.php(146): XF\Job\Manager->runByIds(Array, 8)
#11 src/XF/Mvc/Dispatcher.php(362): XF\Admin\Controller\ToolsController->actionRunJob(Object(XF\Mvc\ParameterBag))
#12 src/XF/Mvc/Dispatcher.php(264): XF\Mvc\Dispatcher->dispatchClass('XF:Tools', 'RunJob', Object(XF\Mvc\RouteMatch), Object(XF\Admin\Controller\ToolsController), NULL)
#13 src/XF/Mvc/Dispatcher.php(121): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(XF\Admin\Controller\ToolsController), NULL)
#14 src/XF/Mvc/Dispatcher.php(63): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#15 src/XF/App.php(2777): XF\Mvc\Dispatcher->run()
#16 src/XF.php(798): XF\App->run()
#17 admin.php(15): XF::runApp('XF\\Admin\\App')
#18 {main}


Request state​



array(4) {
["url"] => string(24) "/admin.php?tools/run-job"
["referrer"] => string(57) "https://forum.himalayan-tools.com/admin.php?tools/run-job"
["_GET"] => array(1) {
["tools/run-job"] => string(0) ""
}
["_POST"] => array(3) {
["_xfRedirect"] => string(92) "https://forum.himalayan-tools.com/admin.php?add-ons/install-from-archive-complete&batch_id=4"
["_xfToken"] => string(8) "********"
["only_ids"] => string(4) "6045"
}
}

Attempting to install the addon with listeners disabled via $config['enableListeners'] = false; will cause the error you found.

Enable listeners first and then re-install the addon.
 
Attempting to install the addon with listeners disabled via $config['enableListeners'] = false; will cause the error you found.

Enable listeners first and then re-install the addon.
not true, I re-installed it FIRST, then checked for errors, got none, THEN enabled listeners again, and it still worked.

I would not risk to be kicked out of the forum (which had happened before when I had listeners enabled)

also: before the robots would always count zero - but now they count the actual robots again, so something changed :cool:
 
not true, I re-installed it FIRST, then checked for errors, got none, THEN enabled listeners again, and it still worked.

The installation routine actually relies on listeners being enabled - it won't work without them enabled. I have tested this and received exactly the same error you first reported.

If you didn't receive the error, then either listeners weren't disabled, or what you did wasn't actually running the "install" routine - for example, re-installing over the top of the existing installed addon without performing a fresh install or an upgrade, won't trigger the error.

I suspect you have some kind of caching going on where you aren't necessarily getting the config settings you think you are.
 
A little bit of product feedback: I've been using this addon since October last year. Had an excessive and constantly growing list of bots in the log. Went through the list of bots regularly, checked which I considered to be ok and which I considered to be useless or harmful (AI-bots, SEO-Companies, Job-listing-platforms, ...) and added the user agents of the latter to my robots.txt regularly. While for quite some time this seemed to have only little effect with many of them, especially some of the AI bots (as little that I considered blocking those via .htaccess) I discovered today when looking at the logfile that almost all of them are gone. My list of recently visiting bots is waaaaay shorter than it used to be - down to 20 bots now - and apart from one all are ok and welcome, judging from a quick look at it. The one exception is "ZoomBot" by an Italian SEO-company which claims to respect robots.txt but does not seem to do so. Not a harmful bot but a useless one for me.

In theory it could be the case that KnownBots for some reason would all of a sudden fail to identify the bots correctly (there are some really strange useragents listed in the user-agents list below the bots list) or that some of the bots are taking a summer holiday, but I am notoriously optimistic and think it does a very good job and the efforts finally showed effect. :)

So an incredibly useful tool and furthermore interesting to see which bots float around there. Thanks for the good work @Sim ! (y)
 
Last edited:
Back
Top Bottom