1

I'm sorry to report that there is an error in Extension Amazon SNS 2.0.0 after upgrading to CiviCRM 5.69.2. Unfortunately I can't get an error log but Wordpress gives me an error page when I want to access to the extension administration page. The only way is to rename the extension folder, but then I can't disable it.

With the php error log:

[18-Jan-2024 09:53:33 Europe/Rome] PHP Fatal error:  Uncaught Error: Undefined constant GuzzleHttp\ClientInterface::MAJOR_VERSION in /home/public_html/wp-content/plugins/civicrm/civicrm/vendor/guzzlehttp/guzzle/src/Utils.php:116
Stack trace:
#0 /home/public_html/wp-content/plugins/civicrm/civicrm/vendor/guzzlehttp/guzzle/src/functions.php(71): GuzzleHttp\Utils::defaultUserAgent()
#1 /home/public_html/wp-content/uploads/civicrm/ext/civicrm-aws-sns-sms-2.0.0/vendor/guzzlehttp/guzzle/src/Client.php(194): GuzzleHttp\default_user_agent()
#2 /home/public_html/wp-content/uploads/civicrm/ext/civicrm-aws-sns-sms-2.0.0/vendor/guzzlehttp/guzzle/src/Client.php(75): GuzzleHttp\Client->configureDefaults()
#3 /home/public_html/wp-content/plugins/civicrm/civicrm/CRM/Extension/Browser.php(61): GuzzleHttp\Client->__construct()
#4 /home/public_html/wp-content/plugins/civicrm/civicrm/CRM/Extension/Browser.php(216): CRM_Extension_Browser->getGuzzleClient()
#5 /home/public_html/wp-content/plugins/civicrm/civicrm/CRM/Extension/Browser.php(194): CRM_Extension_Browser->grabRemoteJson()
#6 /home/public_html/wp-content/plugins/civicrm/civicrm/CRM/Extension/Browser.php(173): CRM_Extension_Browser->grabCachedJson()
#7 /home/public_html/wp-content/plugins/civicrm/civicrm/CRM/Extension/Browser.php(138): CRM_Extension_Browser->_discoverRemote()
#8 /home/public_html/wp-content/plugins/civicrm/civicrm/CRM/Admin/Page/Extensions.php(239): CRM_Extension_Browser->getExtensions()
#9 /home/public_html/wp-content/plugins/civicrm/civicrm/CRM/Admin/Form/Extensions.php(43): CRM_Admin_Page_Extensions->formatRemoteExtensionRows()
#10 /home/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Form.php(719): CRM_Admin_Form_Extensions->preProcess()
#11 /home/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/QuickForm/Action/Display.php(76): CRM_Core_Form->buildForm()
#12 /home/public_html/wp-content/plugins/civicrm/civicrm/packages/HTML/QuickForm/Controller.php(203): CRM_Core_QuickForm_Action_Display->perform()
#13 /home/public_html/wp-content/plugins/civicrm/civicrm/packages/HTML/QuickForm/Page.php(103): HTML_QuickForm_Controller->handle()
#14 /home/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Controller.php(355): HTML_QuickForm_Page->handle()
#15 /home/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Page/Basic.php(364): CRM_Core_Controller->run()
#16 /home/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Page/Basic.php(170): CRM_Core_Page_Basic->edit()
#17 /home/public_html/wp-content/plugins/civicrm/civicrm/CRM/Admin/Page/Extensions.php(110): CRM_Core_Page_Basic->run()
#18 /home/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(322): CRM_Admin_Page_Extensions->run()
#19 /home/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(69): CRM_Core_Invoke::runItem()
#20 /home/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(36): CRM_Core_Invoke::_invoke()
#21 /home/public_html/wp-content/plugins/civicrm/civicrm.php(1231): CRM_Core_Invoke::invoke()
#22 /home/public_html/wp-includes/class-wp-hook.php(324): CiviCRM_For_WordPress->invoke()
#23 /home/public_html/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters()
#24 /home/public_html/wp-includes/plugin.php(517): WP_Hook->do_action()
#25 /home/public_html/wp-admin/admin.php(259): do_action()
#26 {main}
  thrown in /home/public_html/wp-content/plugins/civicrm/civicrm/vendor/guzzlehttp/guzzle/src/Utils.php on line 116
[18-Jan-2024 09:53:38 Europe/Rome] PHP Fatal error:  Uncaught Error: Undefined constant GuzzleHttp\ClientInterface::MAJOR_VERSION in /home/public_html/wp-content/plugins/civicrm/civicrm/vendor/guzzlehttp/guzzle/src/Utils.php:116
Stack trace:
#0 /home/public_html/wp-content/plugins/civicrm/civicrm/vendor/guzzlehttp/guzzle/src/functions.php(71): GuzzleHttp\Utils::defaultUserAgent()
#1 /home/public_html/wp-content/uploads/civicrm/ext/civicrm-aws-sns-sms-2.0.0/vendor/guzzlehttp/guzzle/src/Client.php(194): GuzzleHttp\default_user_agent()
#2 /home/public_html/wp-content/uploads/civicrm/ext/civicrm-aws-sns-sms-2.0.0/vendor/guzzlehttp/guzzle/src/Client.php(75): GuzzleHttp\Client->configureDefaults()
#3 /home/public_html/wp-content/plugins/civicrm/civicrm/CRM/Extension/Browser.php(61): GuzzleHttp\Client->__construct()
#4 /home/public_html/wp-content/plugins/civicrm/civicrm/CRM/Extension/Browser.php(216): CRM_Extension_Browser->getGuzzleClient()
#5 /home/public_html/wp-content/plugins/civicrm/civicrm/CRM/Extension/Browser.php(194): CRM_Extension_Browser->grabRemoteJson()
#6 /home/public_html/wp-content/plugins/civicrm/civicrm/CRM/Extension/Browser.php(173): CRM_Extension_Browser->grabCachedJson()
#7 /home/public_html/wp-content/plugins/civicrm/civicrm/CRM/Extension/Browser.php(138): CRM_Extension_Browser->_discoverRemote()
#8 /home/public_html/wp-content/plugins/civicrm/civicrm/CRM/Admin/Page/Extensions.php(239): CRM_Extension_Browser->getExtensions()
#9 /home/public_html/wp-content/plugins/civicrm/civicrm/CRM/Admin/Page/Extensions.php(138): CRM_Admin_Page_Extensions->formatRemoteExtensionRows()
#10 /home/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Page/Basic.php(174): CRM_Admin_Page_Extensions->browse()
#11 /home/public_html/wp-content/plugins/civicrm/civicrm/CRM/Admin/Page/Extensions.php(110): CRM_Core_Page_Basic->run()
#12 /home/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(322): CRM_Admin_Page_Extensions->run()
#13 /home/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(69): CRM_Core_Invoke::runItem()
#14 /home/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(36): CRM_Core_Invoke::_invoke()
#15 /home/public_html/wp-content/plugins/civicrm/civicrm.php(1231): CRM_Core_Invoke::invoke()
#16 /home/public_html/wp-includes/class-wp-hook.php(324): CiviCRM_For_WordPress->invoke()
#17 /home/public_html/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters()
#18 /home/public_html/wp-includes/plugin.php(517): WP_Hook->do_action()
#19 /home/public_html/wp-admin/admin.php(259): do_action()
#20 {main}
  thrown in /home/public_html/wp-content/plugins/civicrm/civicrm/vendor/guzzlehttp/guzzle/src/Utils.php on line 116

I tried with composer install in the extension folder and there are nothing to install, update or remove

1

1 Answer 1

1

Without the exact text of the error message, it's difficult to know the exact cause. You may want to check your PHP logs (on a Debian server, this would be /var/log/php8.1.log for PHP 8.1).

However, you can most likely resolve the problem by running composer install inside the extension folder. Amazon SNS requires the Guzzle library, and was packaged with Guzzle 6. However, you very likely have a plugin that was packaged with Guzzle 7. If you run composer update then Amazon SNS should get Guzzle 7 and the problem should go away.

UPDATE First - I meant composer update, not composer install - hopefully that fixes your problem!

But if not - your logs make clear that you have multiple Guzzles on different versions.

Find your Guzzles: Search for a CHANGELOG.md file in a guzzle folder. Open each changelog and check the version. At least one will be version 6, at least one will be version 7.

Fix the Guzzle 6 versions: If you're lucky, the ones with version 6 will have a composer.json and you can run composer update. If not, you will probably need to open an issue with the author of that plugin/extension/etc.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.