plentymarkets / plentymarkets-shopware-connector

plentymarkets shopware connector plugin
http://www.plentymarkets.eu/shopware/
MIT License
30 stars 51 forks source link

Category sync: Files cannot be transferred with HTTP #114

Closed franzlst closed 7 years ago

franzlst commented 7 years ago

I'm not having a valid certificate for my plenty host, which I why we are not using HTTPS but HTTP.

For category files, the connector seems to try to use HTTPS anyway. At least I am getting the following error during sync of categories, when I add an image to a category:

[2017-04-04 06:30:28] plentyconnector.DEBUG: Query received: FetchAllCategoriesQuery {"adapterName":"PlentymarketsAdapter"} 
[2017-04-04 06:30:29] plentyconnector.DEBUG: HTTP request: status: 200 method: POST path: /rest/login  
[2017-04-04 06:30:29] plentyconnector.DEBUG: HTTP request: status: 200 method: GET path: /rest/categories  
PHP Warning:  sha1_file(): Peer certificate CN=`*.plentymarkets-cloud02.com' did not match expected CN=`www.xn--mtzenfrkinder-wobf.de' in /var/www/web1/htdocs/shopware/custom/plugins/PlentyConnector/Adapter/PlentymarketsAdapter/ResponseParser/Media/MediaResponseParser.php on line 47

Warning: sha1_file(): Peer certificate CN=`*.plentymarkets-cloud02.com' did not match expected CN=`www.xn--mtzenfrkinder-wobf.de' in /var/www/web1/htdocs/shopware/custom/plugins/PlentyConnector/Adapter/PlentymarketsAdapter/ResponseParser/Media/MediaResponseParser.php on line 47
PHP Warning:  sha1_file(): Failed to enable crypto in /var/www/web1/htdocs/shopware/custom/plugins/PlentyConnector/Adapter/PlentymarketsAdapter/ResponseParser/Media/MediaResponseParser.php on line 47

Warning: sha1_file(): Failed to enable crypto in /var/www/web1/htdocs/shopware/custom/plugins/PlentyConnector/Adapter/PlentymarketsAdapter/ResponseParser/Media/MediaResponseParser.php on line 47
PHP Warning:  sha1_file(https://www.xn--mtzenfrkinder-wobf.de/documents/29861): failed to open stream: operation failed in /var/www/web1/htdocs/shopware/custom/plugins/PlentyConnector/Adapter/PlentymarketsAdapter/ResponseParser/Media/MediaResponseParser.php on line 47

Warning: sha1_file(https://www.xn--mtzenfrkinder-wobf.de/documents/29861): failed to open stream: operation failed in /var/www/web1/htdocs/shopware/custom/plugins/PlentyConnector/Adapter/PlentymarketsAdapter/ResponseParser/Media/MediaResponseParser.php on line 47
[2017-04-04 06:30:30] plentyconnector.ERROR: Query failed: FetchAllCategoriesQuery {"adapterName":"PlentymarketsAdapter","exception":"[object] (Assert\\InvalidArgumentException(code: 27): Value \"\" is blank, but was expected to contain a value. at /var/www/web1/htdocs/shopware/vendor/beberlei/assert/lib/Assert/Assertion.php:212)"} 
[2017-04-04 06:30:30] plentyconnector.ERROR: Value "" is blank, but was expected to contain a value.  
[2017-04-04 06:30:30] plentyconnector.ERROR: #0 /var/www/web1/htdocs/shopware/vendor/beberlei/assert/lib/Assert/Assertion.php(945): Assert\Assertion::createException('', 'Value "" is bla...', 27, NULL)
...

[For me, this is nothing urgent, I stumbled upon it why trying something. Yet, it might be easy to fix.]

jochenmanz commented 7 years ago

Hallo Franz,

both the connector and the shopware api rely on a correct certificate, please add one to your plenty installation.

best regards, Jochen