catalyst / moodle-local_aws

A moodle plugin containing Amazon's SDK for PHP.
16 stars 30 forks source link

Exception - Class "AWS\CRT\Auth\StaticCredentialsProvider" not found error #49

Open tallthom opened 2 years ago

tallthom commented 2 years ago

Running with the latest version of moodle-local_aws and also pulled in the newest SDK zip file from AWS. When configuring moodle-tool_objectfs with my S3 configuration, the exception occurs:

"Exception - Class "AWS\CRT\Auth\StaticCredentialsProvider" not found"

Stack trace: line 457 of /local/aws/sdk/Aws/Signature/SignatureV4.php: Error thrown line 41 of /local/aws/sdk/Aws/Signature/S3SignatureV4.php: call to Aws\Signature\SignatureV4->signWithV4a() line 126 of /local/aws/sdk/Aws/Middleware.php: call to Aws\Signature\S3SignatureV4->signRequest() line 41 of /local/aws/sdk/GuzzleHttp/Promise/FulfilledPromise.php: call to Aws\Middleware::Aws{closure}() line 48 of /local/aws/sdk/GuzzleHttp/Promise/TaskQueue.php: call to GuzzleHttp\Promise\FulfilledPromise::GuzzleHttp\Promise{closure}() line 248 of /local/aws/sdk/GuzzleHttp/Promise/Promise.php: call to GuzzleHttp\Promise\TaskQueue->run() line 224 of /local/aws/sdk/GuzzleHttp/Promise/Promise.php: call to GuzzleHttp\Promise\Promise->invokeWaitFn() line 269 of /local/aws/sdk/GuzzleHttp/Promise/Promise.php: call to GuzzleHttp\Promise\Promise->waitIfPending() line 226 of /local/aws/sdk/GuzzleHttp/Promise/Promise.php: call to GuzzleHttp\Promise\Promise->invokeWaitList() line 62 of /local/aws/sdk/GuzzleHttp/Promise/Promise.php: call to GuzzleHttp\Promise\Promise->waitIfPending() line 58 of /local/aws/sdk/Aws/AwsClientTrait.php: call to GuzzleHttp\Promise\Promise->wait() line 86 of /local/aws/sdk/Aws/AwsClientTrait.php: call to Aws\AwsClient->execute() line 260 of /admin/tool/objectfs/classes/local/store/s3/client.php: call to Aws\AwsClient->__call() line 93 of /admin/tool/objectfs/classes/local/store/object_client_base.php: call to tool_objectfs\local\store\s3\client->test_connection() line 397 of /admin/tool/objectfs/classes/local/store/s3/client.php: call to tool_objectfs\local\store\object_client_base->define_client_check() line 139 of /admin/tool/objectfs/settings.php: call to tool_objectfs\local\store\s3\client->define_client_section() line 81 of /lib/classes/plugininfo/tool.php: call to include() line 735 of /admin/settings/plugins.php: call to core\plugininfo\tool->load_settings() line 8927 of /lib/adminlib.php: call to require() line 40 of /var/www/html/moodle/admin/category.php: call to admin_get_root()

tallthom commented 2 years ago

Right before this issue arrived, I completed the recommendation shown in these instructions:

Exception - AWS Common Runtime for PHP is required to use Signature V4A. Please install it using the instructions found at https://github.com/aws/aws-sdk-php/blob/master/CRT_INSTRUCTIONS.md

I was able to install the AWS common runtime for PHP by downloading the source for the module, compiling it, and then enabling it in the PHP settings for the site.

haiksu commented 1 year ago

Happening to me, too. I think the problem exists in the awscrt.so, not in this plugin.