edwardspec / mediawiki-aws-s3

Extension:AWS allows MediaWiki to use Amazon S3 (instead of the local directory) to store images.
https://www.mediawiki.org/wiki/Extension:AWS
GNU General Public License v2.0
42 stars 32 forks source link

Guzzle-related error after updating MediaWiki from <1.35 to 1.35 #45

Closed ghost closed 3 years ago

ghost commented 3 years ago

I pulled the new extension as of UTC 0200 3 May 2021. I am receiving these errors before and after the update.

Some discussion regarding Wordpress plugins here

My $wgAWSRegion is set to 'us-west-2'.

I recently updated to bitnami-mediawiki-1.35.1-8-r51-linux-debian-10-x86_64-hvm-ebs-nami-* for my EC2 instance. The AWS extension was working great before my rather clumsy update.


Backtrace:

#0 /bitnami/mediawiki/extensions/AWS/vendor/aws/aws-sdk-php/src/Credentials/InstanceProfileProvider.php(179): GuzzleHttp\Promise\coroutine(Closure)
#1 /bitnami/mediawiki/extensions/AWS/vendor/guzzlehttp/promises/src/Promise.php(203): Aws\Credentials\InstanceProfileProvider->__invoke(Aws\Exception\CredentialsException)
#2 /bitnami/mediawiki/extensions/AWS/vendor/guzzlehttp/promises/src/Promise.php(174): GuzzleHttp\Promise\Promise::callHandler(integer, Aws\Exception\CredentialsException, array)
#3 /bitnami/mediawiki/extensions/AWS/vendor/guzzlehttp/promises/src/RejectedPromise.php(40): GuzzleHttp\Promise\Promise::GuzzleHttp\Promise\{closure}(Aws\Exception\CredentialsException)
#4 /bitnami/mediawiki/extensions/AWS/vendor/guzzlehttp/promises/src/TaskQueue.php(47): GuzzleHttp\Promise\RejectedPromise::GuzzleHttp\Promise\{closure}()
#5 /bitnami/mediawiki/extensions/AWS/vendor/guzzlehttp/promises/src/Promise.php(246): GuzzleHttp\Promise\TaskQueue->run(boolean)
#6 /bitnami/mediawiki/extensions/AWS/vendor/guzzlehttp/promises/src/Promise.php(223): GuzzleHttp\Promise\Promise->invokeWaitFn()
#7 /bitnami/mediawiki/extensions/AWS/vendor/guzzlehttp/promises/src/Promise.php(267): GuzzleHttp\Promise\Promise->waitIfPending()
#8 /bitnami/mediawiki/extensions/AWS/vendor/guzzlehttp/promises/src/Promise.php(225): GuzzleHttp\Promise\Promise->invokeWaitList()
#9 /bitnami/mediawiki/extensions/AWS/vendor/guzzlehttp/promises/src/Promise.php(62): GuzzleHttp\Promise\Promise->waitIfPending()
#10 /bitnami/mediawiki/extensions/AWS/vendor/aws/aws-sdk-php/src/AwsClientTrait.php(58): GuzzleHttp\Promise\Promise->wait()

Cheers, Robert "ChupChup" Earl https://www.chupchup.org/

edwardspec commented 3 years ago

I suspect that two different version of Guzzle can be installed (we had that issue before). I would try running composer update in the directory with MediaWiki.

Also, if you updated from an older version of MediaWiki (before 1.35), it's possible that you don't have composer.local.json (see "Installation" section in README), since it wasn't necessary in 1.34 and ealier. Also please delete the directory extensions/AWS/vendor if it exists (it is no longer needed in 1.35).

ghost commented 3 years ago

I ran composer update with no issues; I found composer.local.json-sample and copied it to composer.local.json.

After removing the vendor directory, the server threw "File not found" errors for it. So I restored it, and I am having the same GuzzleHttp errors again.

edwardspec commented 3 years ago

I found composer.local.json-sample and copied it to composer.local.json

Just copying the example is not enough, see extensions/AWS/README.md for what should be added into it. Then run "composer update" again.

Directory extensions/AWS/vendor is never used if the extension is installed correctly.

ghost commented 3 years ago

Aha, I spotted the difference in composer.local.json and after running composer update -- and fixing all the file permissions that it installed -- it is now working as intended!