
Hi @terrybakshi. Thank you for your report.
To help us process this issue please make sure that you provided the following information:
Please make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, please, add a comment to the issue:
@magento-engcom-team give me $VERSION instance
where $VERSION is version tags (starting from 2.2.0+) or develop branches (for example: 2.3-develop).
For more details, please, review the Magento Contributor Assistant documentation.
@terrybakshi do you confirm that you was able to reproduce the issue on vanilla Magento instance following steps to reproduce?
Summary of the issue
When going to websetup wizard, enter the private and secret key to login to magento market place to install extension can't login getting error 200
Preconditions
Magento 2.2.5
Php 7.1
Mysql 5.7
Environment Information
Magento 2.2.5 and 2.2.6 both on Different servers
Php 7.1
Mysql 5.7
Steps to reproduce
GO to system
Click web setup wizard
Click extension manager
Add Public key and Private Key
Click submit
Getting error Invalid response line returned from server: HTTP/2 200
Expected and actual results
Should login to extension manager to see and install extensions.
Hi @engcom-backlog-nazar. Thank you for working on this issue.
In order to make sure that issue has enough information and ready for development, please read and check the following instruction: :point_down:
Issue: Format is valid will be added to the issue automatically. Please, edit issue description if needed, until label Issue: Format is valid appears.[x] 2. Verify that issue has a meaningful description and provides enough information to reproduce the issue. If the report is valid, add Issue: Clear Description label to the issue by yourself.
[ ] 3. Add Component: XXXXX label(s) to the ticket, indicating the components it may be related to.
[ ] 4. Verify that the issue is reproducible on 2.3-develop branchDetails
- Add the comment @magento-engcom-team give me 2.3-develop instance to deploy test instance on Magento infrastructure.
- If the issue is reproducible on 2.3-develop branch, please, add the label Reproduced on 2.3.x.
- If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and _stop verification process here_!
[ ] 5. Verify that the issue is reproducible on 2.2-develop branch. Details
- Add the comment @magento-engcom-team give me 2.2-develop instance to deploy test instance on Magento infrastructure.
- If the issue is reproducible on 2.2-develop branch, please add the label Reproduced on 2.2.x
[ ] 6. Add label Issue: Confirmed once verification is complete.
[ ] 7. Make sure that automatic system confirms that report has been added to the backlog.
Component: XXXXX label(s) not sure how to do that
@magento-engcom-team give me 2.2.6 instance
Hi @engcom-backlog-nazar. Thank you for your request. I'm working on Magento 2.2.6 instance for you
Hi @engcom-backlog-nazar, here is your Magento instance.
Admin access: http://34.228.235.121/i-19127-2-2-6//admin
Login: admin Password: 123123q
Instance will be terminated in up to 3 hours.
Hi @terrybakshi i'm not able to reproduce this on clean magento instance. did you use some custom modules ?
@terrybakshi 

its not working when clicking on web setup wizard
@terrybakshi yes on this instances this page not working.
i have 3 websites running on 2 different servers and all having same issue. no custom modules installed.
@terrybakshi seems like you have wrong http protocol versions https://developers.google.com/web/fundamentals/performance/http2/
@terrybakshi your hosting provider uses HTTP/1 instead of HTTP//2
how do i fix this
@terrybakshi you should to contact your hosting provider and set to use HTTP/2
ok i enabled HTTP/2 in apache modules and restarted the server and still getting same error
@terrybakshi Try do the cache clean, cache flush, and did you try reproduce this on local instance ?
Ok did that even run the commands to upgrade, cache clean and cache flush still same issue.
@terrybakshi hmm very strange, the error you have about the wrong version of http protocols, magento gives you right reponse HTTP/2 200 OK but you server only understand HTTP/1.1 200 ok
could it be related to cloudflare cache
unfortunately no i tired clearing cloudflare cache but still no luck
another issue i am having is when go to make payment with stripe i get error (error occurred on the server. Please try to place the order again.)
@terrybakshi this may be relate to your configuration on server side. something with http protocols.
but how can that be possible i have two servers and they are running 3 different websites and all of them have same issue.
@terrybakshi did you reinstall instance locally ? they may have the same configuration.
Have the same bug. Looks like for some servers magento returns HTTP/1.1 200 OK and they works fine. But for some I get HTTP/2 200 and it's not working.
@engcom-backlog-nazar can you check the headers? Open lib/internal/Magento/Framework/HTTP/Client/Curl.php (OR vendor/magento/framework/HTTP/Client/Curl.php), and apply this patch:
--- lib/internal/Magento/Framework/HTTP/Client/Curl.php
+++ lib/internal/Magento/Framework/HTTP/Client/Curl.php
@@ -432,6 +432,7 @@
{
if ($this->_headerCount == 0) {
$line = explode(" ", trim($data), 3);
+ \Zend_Debug::dump($data);die;
if (count($line) != 3) {
$this->doError("Invalid response line returned from server: " . $data);
}
Then try to login and check response in Chrome network panel. I bet you'll have HTTP/1.1 200 OK
Additionally, Magento uses Zend_Http_Response in some other places. It's not works too because of the following check:
/vendor/magento/zendframework1/library/Zend/Http/Response.php#517:
preg_match('#^HTTP/\d+(?:\.\d+) [1-5]\d+#', $line)
HTTP/1.1 200 OK - matches this expression
HTTP/2 200 - doesn't match this expression
Hi @vovayatsyuk seems like magento not support HTTP/2
@vovayatsyuk this can be a feature request, It will be processed faster if you move this to https://github.com/magento/community-features
@terrybakshi here is a patch that removes invalid validator:
--- a/lib/internal/Magento/Framework/HTTP/Client/Curl.php
+++ b/lib/internal/Magento/Framework/HTTP/Client/Curl.php
@@ -432,7 +432,7 @@ 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]);
@vovayatsyuk You rock! Thank you!!
@vovayatsyuk where should i apply this patch
@terrybakshi the file may be in lib/internal/Magento/Framework/HTTP/Client/Curl.php or vendor/magento/framework/HTTP/Client/Curl.php
@vovayatsyuk Thanks so much it worked
i think its better magento team should fix this issue
Hi @terrybakshi. Thank you for your report.
The issue has been fixed in magento/magento2#19143 by @vovayatsyuk in 2.3-develop branch
Related commit(s):
The fix will be available with the upcoming 2.3.1 release.
Hi guys!
I have applied the fix but the issue is still here:
the error message is not displayed but the page keeps on loading and never sign in...

@vovayatsyuk Is there something else to add to make this work?
Thanks!
Hi @terrybakshi. Thank you for your report.
The issue has been fixed in magento/magento2#19239 by @gelanivishal in 2.2-develop branch
Related commit(s):
The fix will be available with the upcoming 2.2.8 release.
This issue still exist in 2.2.7 not fixed in 2.2.7
@vovayatsyuk This issue still exist in 2.2.7 not fixed in 2.2.7 is there a patch for this as well, i check they will fix the issue in 2.2.8 but how can we update magento to 2.2.8 if web setup wizard is not working
@terrybakshi you can try to update Magento via command line interface.
The link to the patch that fixes the issue is mentioned in https://github.com/magento/magento2/issues/19127#issuecomment-443242863.
Magento 2.3 same issue exist in 2.3 not fixed in 2.3
Fresh install of 2.3 using Softaculous installer from a2 hosting. Same bug.
Yes, it’s not fixed yet. These badges “fixed in..” are little confusing. They meant that the bug is fixed in develop branch.
As was mentioned above, the fix will be included on the next release.
I am doing curl connection to third-party API in 2.3 version. And confirm I am getting this error.
And patch does work.
Most helpful comment
@terrybakshi here is a patch that removes invalid validator: