Sign in to Magento Marketplace => "Invalid response line returned from server: HTTP/2 200"

13 views
Skip to first unread message

Sana Rajput

unread,
Dec 17, 2018, 2:38:41 AM12/17/18
to Shopping

Sign in to Magento Marketplace => "Invalid response line returned from server: HTTP/2 200"

When attempting to sign in to receive updates (sync my Magento Marketplace purchases), making sure that form is filled with valid credentials, when clicking "Save config" to submit, the message "Invalid response line returned from server: HTTP/2 200" is returned on screen.

 

My browser Developer Tools show a POST request to /setup/index.php/marketplace/save-auth-json.

 

The request response, as shown in Developer Tools, is {"success":false,"message":"Invalid response line returned from server: HTTP\/2 200 \r\n"}

 

On my console I initiated a command to monitor connections to repo.magento.com to verify that a connection is actually opened to the correct host (Confirmed that).

 

I am stuck here with a fresh install, trying to solve this for the past day; any help would be appreciated.

akshita...@gmail.com

unread,
Dec 17, 2018, 3:48:00 AM12/17/18
to Shopping

Hi Sana,


Seems magento has a problem with HTTP/2 and does not validates SSL when try to connect to marketplace. A quick debug i made shows that the connections opens and closed immediately before user / pass validation.

A solution that worked for me is to replace the following code at lib/internal/Magento/Framework/HTTP/Client/Curl.php or vendor/magento/framework/HTTP/Client/Curl.php

 

class Curl implements \Magento\Framework\HTTP\ClientInterface


protected function parseHeaders($ch, $data)
{
if ($this->_headerCount == 0) {
$line = explode(" ", trim($data), 3);
// if (count($line) != 3) {
+ if (count($line) < 2) {
$this->doError("Invalid response line returned from server: " . $data);
}
$this->_responseStatus = intval($line[1]);


If you still need help regarding Magento Migration Services feel free to contact me.

Reply all
Reply to author
Forward
0 new messages