Closed runningman84 closed 7 years ago
Entering S3 credentals doesn't help either.
Do you have any solution on this issue? Got the same problem here.
Hi,
hard to tell: Looking into the guzzle class emitting this error (Client.php), I assume the issue might be this line:
$result = $options + $defaults;
The plus operator might trigger this error when e.g. an array and an int are passed. So you might want to debug the $options
and $defaults
array and make sure, that both are actually arrays.
Currently I cannot reproduce this issue on my setup, the plugin was installed and activated properly.
My PHP-Version is 5.6.4, composer installed guzzle 6.0.2, flysytem 1.0.11 and flysystem-aws-s3-v3 1.0.4
Perhaps this helps somewhat?
Hey Daniel,
thank you for your support. After debugging $options and $defaults, the value of $options was
string(95) "1opt/webroot/shopware-demo/htdocs/engine/Shopware/Components/HttpClient/cacert.pem"
This is no array. The only Class in Shopware, who handles the cacert.pem is the Shopware\Components\HttpClient\GuzzleFactory in the same folder as the certificate
public function createClient() { $client = new Client(); $certPath = DIR.'/cacert.pem'; if (is_file($certPath)) { $client->setDefaultOption('verify', $certPath); } return $client; }
and this is used by the Shopware\Bundle\PluginInstallerBundle\Service\AccountManagerService to ping the ApiEndpoint.
We can't find out where the problem exactly is, but if we delete the cacert.pem from filesystem (so the GuzzleFactory doesn't call setDefaultOption), everything works perfect!
After deleting the cacert, the $options looks like this: array(2) { ["headers"]=> array(0) { } ["synchronous"]=> bool(true) }
I think this issue is solved. If not, feel free, to open another one :+1:
I have extracted the plugins to /engine/Shopware/Plugins/Local and installed + activated the SwagMediaS3 plugin. In the plugin manager I get this error message: Fatal error: Unsupported operand types in /data/shopware/engine/Shopware/Plugins/Local/Frontend/SwagMediaS3/vendor/guzzlehttp/guzzle/src/Client.php on line 225 503 Service Unavailable
Right now I haven't configured any S3 credentials yet, if this is that is the reason you should print an appropiate error message.