HenriBierman Posted November 29, 2021 Posted November 29, 2021 Hi All I hope you are doing better than me? I am trying to do an update and need to install the tbupdater, but when I install it, I get an error, and need to delete it in the bank end. Please help me resolve this? ThirtyBeesException Call to undefined method GuzzleHttp\Client::getAsync() in file modules/tbupdater/tbupdater.php at line 288 Source file: modules/tbupdater/tbupdater.php Stack trace 1. modules/tbupdater/tbupdater.php:393 source TbUpdater->checkForUpdates(arguments) 374: 375: return false; 376: } 377: 378: /** 379: * Get the cached info about modules 380: * 381: * @param string|null $locale IETF Locale 382: * If the locale does not exist it will 383: * fall back onto en-us 384: * 385: * @return array|bool|false|mixed 386: * 387: * @since 1.0.0 388: */ 389: public function getCachedModulesInfo($locale = null) 390: { 391: $modules = json_decode(@file_get_contents(__DIR__.'/cache/modules.json'), true); 392: if (!$modules) { 393: $modules = $this->checkForUpdates(true); 394: if (!$modules) { 395: return false; 396: } 397: } 398: 399: if ($locale) { 400: foreach ($modules as &$module) { 401: if (isset($module['displayName'][Tools::strtolower($locale)])) { 402: $module['displayName'] = $module['displayName'][Tools::strtolower($locale)]; 403: } elseif (isset($module['displayName']['en-us'])) { 2. classes/module/Module.php:1069 source TbUpdater->getCachedModulesInfo() 1050: $moduleCursor = $modulesNameToCursor[mb_strtolower($result['name'])]; 1051: $moduleCursor->id = (int) $result['id_module']; 1052: $moduleCursor->active = ($result['total'] == count($list)) ? 1 : 0; 1053: } 1054: } 1055: } 1056: 1057: // Get native and partner modules 1058: /** @var TbUpdater $updater */ 1059: $updater = Module::getInstanceByName('tbupdater'); 1060: $languageCode = str_replace('_', '-', mb_strtolower(Context::getContext()->language->language_code)); 1061: 1062: // This array gets filled with requested module images to download (key = module code, value = guzzle promise) 1063: $imagePromises = []; 1064: $guzzle = new \GuzzleHttp\Client([ 1065: 'verify' => _PS_TOOL_DIR_.'cacert.pem', 1066: 'timeout' => 20, 1067: ]); 1068: 1069: if (Validate::isLoadedObject($updater) && $modules = $updater->getCachedModulesInfo()) { 1070: foreach ($modules as $name => $module) { 1071: if (isset($modulesNameToCursor[mb_strtolower(strval($name))])) { 1072: $moduleFromList = $modulesNameToCursor[mb_strtolower(strval($name))]; 1073: if ($moduleFromList->author 1074: && $moduleFromList->author === $module['author'] 1075: && $moduleFromList->version 1076: && version_compare( 1077: $module['version'], 1078: $moduleFromList->version, 1079: '>' 3. controllers/admin/AdminModulesController.php:334 source ModuleCore::getModulesOnDisk(arguments) 315: ->from('tab_module_preference') 316: ->where('`id_employee` = '.(int) $this->employee) 317: ); 318: 319: foreach ($tabModulesPreferencesTmp as $i => $j) { 320: $tabModulesPreferences[$j['module']][] = $j['id_tab']; 321: } 322: 323: foreach ($modulesPreferencesTmp as $k => $v) { 324: if ($v['interest'] == null) { 325: unset($v['interest']); 326: } 327: if ($v['favorite'] == null) { 328: unset($v['favorite']); 329: } 330: $modulesPreferences[$v['module']] = $v; 331: } 332: 333: // Retrieve Modules List 334: $modules = Module::getModulesOnDisk(true, $this->logged_on_addons, $this->id_employee); 335: $this->initModulesList($modules); 336: $this->nb_modules_total = count($modules); 337: $moduleErrors = []; 338: $moduleSuccess = []; 339: $upgradeAvailable = []; 340: $dontFilter = false; 341: 342: //Add success message for one module update 343: if (Tools::getValue('updated') && Tools::getValue('module_name')) { 344: $moduleNames = (string) Tools::getValue('module_name'); 4. classes/controller/Controller.php:208 source AdminModulesControllerCore->initContent() 189: public function run() 190: { 191: $this->init(); 192: if ($this->checkAccess()) { 193: if (!$this->content_only && ($this->display_header || (isset($this->className) && $this->className))) { 194: $this->setMedia(); 195: } 196: 197: $this->postProcess(); 198: 199: if (!empty($this->redirect_after)) { 200: $this->redirect(); 201: } 202: 203: if (!$this->content_only && ($this->display_header || (isset($this->className) && $this->className))) { 204: $this->initHeader(); 205: } 206: 207: if ($this->viewAccess()) { 208: $this->initContent(); 209: } else { 210: $this->errors[] = Tools::displayError('Access denied.'); 211: } 212: 213: if (!$this->content_only && ($this->display_footer || (isset($this->className) && $this->className))) { 214: $this->initFooter(); 215: } 216: 217: if ($this->ajax) { 218: $action = Tools::toCamelCase(Tools::getValue('action'), true); 5. classes/Dispatcher.php:852 source ControllerCore->run() 833: return; 834: } 835: break; 836: 837: default: 838: throw new PrestaShopException('Bad front controller chosen'); 839: } 840: 841: // Instantiate controller 842: try { 843: // Loading controller 844: $controller = Controller::getController($controllerClass); 845: 846: // Execute hook dispatcher 847: if (isset($paramsHookActionDispatcher)) { 848: Hook::exec('actionDispatcher', $paramsHookActionDispatcher); 849: } 850: 851: // Running controller 852: $controller->run(); 853: } catch (PrestaShopException $e) { 854: $e->displayMessage(); 855: } 856: } 857: 858: /** 859: * Retrieve the controller from url or request uri if routes are activated 860: * 861: * @param int|null $idShop 862: * 6. override/classes/Dispatcher.php:39 source DispatcherCore->dispatch() 20: * International Registered Trademark & Property of ETS-Soft 21: */ 22:class Dispatcher extends DispatcherCore 23:{ 24: /* 25: * module: ets_superspeed 26: * date: 2021-05-06 10:52:51 27: * version: 1.1.8 28: */ 29: public function dispatch() { 30: if(@file_exists(dirname(__FILE__).'/../../modules/ets_superspeed/ets_superspeed.php')) 31: { 32: require_once(dirname(__FILE__).'/../../modules/ets_superspeed/ets_superspeed.php'); 33: if($cache = Ets_superspeed::displayContentCache(true)) 34: { 35: echo $cache; 36: exit; 37: } 38: } 39: parent::dispatch(); 40: } 41:} 7. admin429zfhthp/index.php:63 source Dispatcher->dispatch() 44://small test to clear cache after upgrade 45:if (Configuration::get('PS_UPGRADE_CLEAR_CACHE')) { 46: header('Cache-Control: max-age=0, must-revalidate'); 47: header('Expires: Mon, 06 Jun 1985 06:06:00 GMT+1'); 48: Configuration::updateValue('PS_UPGRADE_CLEAR_CACHE', 0); 49:} 50: 51:// For retrocompatibility with "tab" parameter 52:if (!isset($_GET['controller']) && isset($_GET['tab'])) { 53: $_GET['controller'] = strtolower($_GET['tab']); 54:} 55:if (!isset($_POST['controller']) && isset($_POST['tab'])) { 56: $_POST['controller'] = strtolower($_POST['tab']); 57:} 58:if (!isset($_REQUEST['controller']) && isset($_REQUEST['tab'])) { 59: $_REQUEST['controller'] = strtolower($_REQUEST['tab']); 60:} 61: 62:// Prepare and trigger admin dispatcher 63:Dispatcher::getInstance()->dispatch();
0 datakick Posted November 29, 2021 Posted November 29, 2021 You will have some third party module (not tbupdater) installed that comes with its own version of GuzzleHttp library, and that causes conflicts. You need to figure out what module it is, and disable it/fix it somehow. Look into /modules/<module>/vendor/ directory to see if there is something named *guzzle*
0 HenriBierman Posted November 29, 2021 Author Posted November 29, 2021 Thank you so much, I will check this out. For some reason some modules wont uninstall or install either.
0 HenriBierman Posted November 29, 2021 Author Posted November 29, 2021 9 minutes ago, datakick said: You will have some third party module (not tbupdater) installed that comes with its own version of GuzzleHttp library, and that causes conflicts. You need to figure out what module it is, and disable it/fix it somehow. Look into /modules/<module>/vendor/ directory to see if there is something named *guzzle* I managed to find the module, but now Updater refuse to install. On top it says that it was installed, but it was not.
0 datakick Posted November 29, 2021 Posted November 29, 2021 Looks like your tb installation is broken. Maybe some override, or changes to core files, are getting in the way. I would suggest you to disable all overrides (in Performance menu) manually install core updater module - https://github.com/thirtybees/coreupdater/releases/download/1.4.5/coreupdater-v1.4.5.zip update your store to latest stable or bleeding edge install tbupdater module
Question
HenriBierman
Hi All
I hope you are doing better than me?
I am trying to do an update and need to install the tbupdater, but when I install it, I get an error, and need to delete it in the bank end. Please help me resolve this?
Call to undefined method GuzzleHttp\Client::getAsync()
Source file: modules/tbupdater/tbupdater.php
Stack trace
5 answers to this question
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now