Amazon Polly Conflict

  • cadcobrachicken
    Participant
    1 year, 7 months ago #30617

    With version 22.3 of WPSOLR PRO I get an error from the Amazon Polly admin interface (Dashboard > AWS > text-to-speech):

    Fatal error: Uncaught Error: Call to undefined method GuzzleHttp\Psr7\Utils::tryGetContents() in /nas/content/live/hilltimes/wp-content/plugins/wpsolr-pro/wpsolr/core/vendor/guzzlehttp/psr7/src/Stream.php:103 Stack trace: #0 /nas/content/live/hilltimes/wp-content/plugins/wpsolr-pro/wpsolr/core/vendor/guzzlehttp/psr7/src/Stream.php(83): GuzzleHttp\Psr7\Stream->getContents() #1 [internal function]: GuzzleHttp\Psr7\Stream->__toString() #2 /nas/content/live/hilltimes/wp-content/plugins/amazon-polly/vendor/aws/aws-sdk-php/src/Api/Parser/PayloadParserTrait.php(18): json_decode(Object(GuzzleHttp\Psr7\Stream), true) #3 /nas/content/live/hilltimes/wp-content/plugins/amazon-polly/vendor/aws/aws-sdk-php/src/Api/Parser/RestJsonParser.php(31): Aws\Api\Parser\RestJsonParser->parseJson(Object(GuzzleHttp\Psr7\Stream), Object(GuzzleHttp\Psr7\Response)) #4 /nas/content/live/hilltimes/wp-content/plugins/amazon-polly/vendor/aws/aws-sdk-php/src/Api/Parser/AbstractRestParser.php(63): Aws\Api\Parser\RestJsonParser->payload(Object(GuzzleHttp\Psr in /nas/content/live/hilltimes/wp-content/plugins/wpsolr-pro/wpsolr/core/vendor/guzzlehttp/psr7/src/Stream.php on line 103
    There has been a critical error on this website. Please check your site admin email inbox for instructions.
    
    Learn more about troubleshooting WordPress.

    Any suggestions on how to resolve this error? The error was not present when version 22.2 WPSOLR-PRO was installed.

    Thank you

    wpsolr
    Keymaster
    1 year, 7 months ago #30618

    Both AWS for WordPress and WPSOLR plugins use the Guzzle library through composer dependencies, but not with the same version, which appears to cause the conflict.
    (WPSOLR’s Guzzle version is more recent as it has been updated with the recent 22.3 release, while AWS for WordPress has not been updated for a year at least).

    A solution could be to somehow update the /wpsolr-pro/wpsolr/core/composer.json to force the same Guzzle version as AWS for WordPress. And do so on each new WPSOLR release.
    Or update the AWS for WordPress’s aws/aws-sdk-php to the latest version.
    Or better, ask the AWS for WordPress support to update their plugin’s dependencies.

    • This reply was modified 1 year, 7 months ago by wpsolr.
    • This reply was modified 1 year, 7 months ago by wpsolr.
    • This reply was modified 1 year, 7 months ago by wpsolr.
    cadcobrachicken
    Participant
    1 year, 7 months ago #30622

    Thank you for the reply. Could you please be a bit more specific? What line/library/version should I be changing in the composer.json file?

    cadcobrachicken
    Participant
    1 year, 7 months ago #30623

    Also, I am using the latest version of AWS for WordPress v 4.3.2.

    wpsolr
    Keymaster
    1 year, 7 months ago #30624

    You could execute a command like composer update --no-dev in the /amazon-polly folder. It should update the vendor libraries to the same level as WPSOLR’s libraries.

    I strongly advise to do it in a test environment first !

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.