Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot connect to Magento 2 market place #19127

Closed
terrybakshi opened this issue Nov 9, 2018 · 46 comments
Closed

Cannot connect to Magento 2 market place #19127

terrybakshi opened this issue Nov 9, 2018 · 46 comments
Labels
feature request Fixed in 2.2.x The issue has been fixed in 2.2 release line Fixed in 2.3.x The issue has been fixed in 2.3 release line Issue: Format is not valid Gate 1 Failed. Automatic verification of issue format is failed

Comments

@terrybakshi
Copy link

Preconditions (*)

  1. When going to websetup wizard, enter the private and secret key to login to magento market place to install extension
  2. can't login getting error 200

Actual result (*)

  1. [Screenshots, logs or description]

download

@magento-engcom-team
Copy link
Contributor

Hi @terrybakshi. Thank you for your report.
To help us process this issue please make sure that you provided the following information:

  • Summary of the issue
  • Information on your environment
  • Steps to reproduce
  • Expected and actual results

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?

  • yes
  • no

@magento-engcom-team magento-engcom-team added the Issue: Format is not valid Gate 1 Failed. Automatic verification of issue format is failed label Nov 9, 2018
@terrybakshi
Copy link
Author

terrybakshi commented Nov 9, 2018

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.

@ghost ghost self-assigned this Nov 9, 2018
@magento-engcom-team
Copy link
Contributor

magento-engcom-team commented Nov 9, 2018

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: 👇

  • 1. Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).

    DetailsIf the issue has a valid description, the label Issue: Format is valid will be added to the issue automatically. Please, edit issue description if needed, until label Issue: Format is valid appears.

  • 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 branch

    Details- 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.

@terrybakshi
Copy link
Author

Component: XXXXX label(s) not sure how to do that

@ghost
Copy link

ghost commented Nov 9, 2018

@magento-engcom-team give me 2.2.6 instance

@magento-engcom-team
Copy link
Contributor

Hi @engcom-backlog-nazar. Thank you for your request. I'm working on Magento 2.2.6 instance for you

@magento-engcom-team
Copy link
Contributor

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.

@ghost
Copy link

ghost commented Nov 9, 2018

Hi @terrybakshi i'm not able to reproduce this on clean magento instance. did you use some custom modules ?

@ghost
Copy link

ghost commented Nov 9, 2018

@terrybakshi web_setup

@ghost ghost closed this as completed Nov 9, 2018
@terrybakshi
Copy link
Author

screenshot 66
its not working when clicking on web setup wizard

@ghost
Copy link

ghost commented Nov 9, 2018

@terrybakshi yes on this instances this page not working.

@terrybakshi
Copy link
Author

i have 3 websites running on 2 different servers and all having same issue. no custom modules installed.

@ghost
Copy link

ghost commented Nov 9, 2018

@terrybakshi seems like you have wrong http protocol versions https://developers.google.com/web/fundamentals/performance/http2/

@ghost
Copy link

ghost commented Nov 9, 2018

@terrybakshi your hosting provider uses HTTP/1 instead of HTTP//2

@terrybakshi
Copy link
Author

how do i fix this

@ghost
Copy link

ghost commented Nov 9, 2018

@terrybakshi you should to contact your hosting provider and set to use HTTP/2

@terrybakshi
Copy link
Author

ok i enabled HTTP/2 in apache modules and restarted the server and still getting same error

@ghost
Copy link

ghost commented Nov 9, 2018

@terrybakshi Try do the cache clean, cache flush, and did you try reproduce this on local instance ?

@terrybakshi
Copy link
Author

Ok did that even run the commands to upgrade, cache clean and cache flush still same issue.

@ghost
Copy link

ghost commented Nov 9, 2018

@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

@terrybakshi
Copy link
Author

could it be related to cloudflare cache

@terrybakshi
Copy link
Author

unfortunately no i tired clearing cloudflare cache but still no luck

@terrybakshi
Copy link
Author

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.)

@ghost
Copy link

ghost commented Nov 9, 2018

@terrybakshi this may be relate to your configuration on server side. something with http protocols.

@terrybakshi
Copy link
Author

but how can that be possible i have two servers and they are running 3 different websites and all of them have same issue.

@ghost
Copy link

ghost commented Nov 9, 2018

@terrybakshi did you reinstall instance locally ? they may have the same configuration.

@vovayatsyuk
Copy link
Member

vovayatsyuk commented Nov 9, 2018

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

@vovayatsyuk
Copy link
Member

vovayatsyuk commented Nov 9, 2018

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

@ghost
Copy link

ghost commented Nov 9, 2018

Hi @vovayatsyuk seems like magento not support HTTP/2

@ghost ghost added the feature request label Nov 9, 2018
@ghost
Copy link

ghost commented Nov 9, 2018

@vovayatsyuk this can be a feature request, It will be processed faster if you move this to https://github.com/magento/community-features

@vovayatsyuk
Copy link
Member

vovayatsyuk commented Nov 9, 2018

@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]);

@costastsoukas
Copy link

@vovayatsyuk You rock! Thank you!!

@terrybakshi
Copy link
Author

@vovayatsyuk where should i apply this patch

@vovayatsyuk
Copy link
Member

@terrybakshi the file may be in lib/internal/Magento/Framework/HTTP/Client/Curl.php or vendor/magento/framework/HTTP/Client/Curl.php

@terrybakshi
Copy link
Author

@vovayatsyuk Thanks so much it worked

@terrybakshi
Copy link
Author

i think its better magento team should fix this issue

@magento-engcom-team magento-engcom-team added the Fixed in 2.3.x The issue has been fixed in 2.3 release line label Nov 14, 2018
@magento-engcom-team
Copy link
Contributor

Hi @terrybakshi. Thank you for your report.
The issue has been fixed in #19143 by @vovayatsyuk in 2.3-develop branch
Related commit(s):

The fix will be available with the upcoming 2.3.1 release.

@3615helloworld
Copy link

3615helloworld commented Nov 21, 2018

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...

image

@vovayatsyuk Is there something else to add to make this work?

Thanks!

@magento-engcom-team
Copy link
Contributor

Hi @terrybakshi. Thank you for your report.
The issue has been fixed in #19239 by @gelanivishal in 2.2-develop branch
Related commit(s):

The fix will be available with the upcoming 2.2.8 release.

@magento-engcom-team magento-engcom-team added the Fixed in 2.2.x The issue has been fixed in 2.2 release line label Nov 30, 2018
@terrybakshi
Copy link
Author

This issue still exist in 2.2.7 not fixed in 2.2.7

@terrybakshi
Copy link
Author

@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

@vovayatsyuk
Copy link
Member

@terrybakshi you can try to update Magento via command line interface.

The link to the patch that fixes the issue is mentioned in #19127 (comment).

View patch.

@ghost
Copy link

ghost commented Mar 4, 2019

Magento 2.3 same issue exist in 2.3 not fixed in 2.3

@aaj
Copy link

aaj commented Mar 21, 2019

Fresh install of 2.3 using Softaculous installer from a2 hosting. Same bug.

@vovayatsyuk
Copy link
Member

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.

@adarshkhatri
Copy link
Contributor

I am doing curl connection to third-party API in 2.3 version. And confirm I am getting this error.

And patch does work.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request Fixed in 2.2.x The issue has been fixed in 2.2 release line Fixed in 2.3.x The issue has been fixed in 2.3 release line Issue: Format is not valid Gate 1 Failed. Automatic verification of issue format is failed
Projects
None yet
Development

No branches or pull requests

7 participants