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

M2.2.1 Unable to open Address book after account creation #12180

Closed
tig-dennisvanderhammen opened this issue Nov 10, 2017 · 15 comments
Closed

M2.2.1 Unable to open Address book after account creation #12180

tig-dennisvanderhammen opened this issue Nov 10, 2017 · 15 comments
Labels
Fixed in 2.2.x The issue has been fixed in 2.2 release line Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed

Comments

@tig-dennisvanderhammen
Copy link

Preconditions

  1. Magento version 2.2.1
  2. PHP version 7.0.7

Steps to reproduce

  1. Set up a Magento v2.2.1 environment.
  2. Create an account as a customer.
  3. Immediately after creating your customer, try to open your address book.

Expected result

  1. Your address book opens up, where you can insert your address details.

Actual result

A 500 error pops up in my screen.
The following logs are generated:
2017/11/10 17:12:21 [error] 2807#2807: *27047 FastCGI sent in stderr: "PHP message: PHP Fatal error: Cannot use Magento\Framework\App\Helper\Context as Context because the name is already in use in /public/vendor/magento/module-customer/Model/AttributeChecker.php on line 11" while reading response header from upstream, client: 81.30.47.209, server: example.com, request: "GET /customer/address/new/ HTTP/1.1", upstream: "fastcgi://unix:/var/run/php7-fpm.sock:", host: "example.com"

@magento-engcom-team magento-engcom-team added the Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed label Nov 10, 2017
@mrkhoa99
Copy link
Contributor

@tig-dennisvanderhammen Are you using a fresh Magento install?

@tig-dennisvanderhammen
Copy link
Author

tig-dennisvanderhammen commented Nov 13, 2017

Yes, I get this error on a clean Magento installation.

@magento-engcom-team
Copy link
Contributor

@tig-dennisvanderhammen, thank you for your report.
We were not able to reproduce this issue by following the steps you provided. If you'd like to update it, please reopen the issue.
We tested the issue on 2.3.0-dev, 2.1.10, 2.2.1

@chris-pook
Copy link
Contributor

I was able to reproduce this error with the same steps as above in 2.2.1.

Site was running in production mode and I had run composer dump-autoload -o. The issue is related to an unnecessary use operator in a Customer module Model.

PR added here: #12220

@orlangur
Copy link
Contributor

@magento-engcom-team this should be reproduced for sure due to https://github.com/magento/magento2/blob/2.2-develop/app/code/Magento/Customer/Model/Context.php class existence. Maybe app/code/Magento/Customer/Model/AttributeChecker.php is not involved in some circumstances with the steps provided though.

@orlangur orlangur reopened this Nov 23, 2017
@orlangur orlangur removed the Issue: Cannot Reproduce Cannot reproduce the issue on the latest `2.4-develop` branch label Nov 23, 2017
@okorshenko
Copy link
Contributor

Hi @tig-dennisvanderhammen
The issue has been fixed and delivered in 2.2-develop branch. Will be available with upcoming patch release.

@okorshenko okorshenko added the Fixed in 2.2.x The issue has been fixed in 2.2 release line label Dec 11, 2017
@tig-dennisvanderhammen
Copy link
Author

Thank you for your time!

@ratnajain
Copy link

ratnajain commented Mar 13, 2018

Hello,
I'm new to magento..and i'm trying to install magento-2 setup in Windows..but i'm getting error as following:
Fatal error: Cannot use Magento\Payment\Gateway\ConfigInterface as ConfigInterface because the name is already in use in D:\wamp\www\magento2\app\code\Magento\Payment\Model\Method\Logger.php on line 8

@orlangur
Copy link
Contributor

Hi @ratnajain, this is already fixed in a7d4180

Please don't use Windows, it is not supported and there could be some issues.

@EliasKotlyar
Copy link
Contributor

Encountered same result with M2.2.4 and PHP 7.0.8. Used a7d4180 for fixxing the error.

@purnagattu
Copy link

Got The Error while installing in Xampp "PHP Fatal error: Cannot use Magento\Payment\Gateway\ConfigInterface as ConfigInterface because the name is already in use in C:\xampp\htdocs\dreamkart\vendor\magento\module-payment\Model\Method\Logger.php on line 8"

@EliasKotlyar
Copy link
Contributor

Encountered a similar issue in the "Vertex_Tax" Module. There are some classes which are breaking down on PHP7.0 when using setup:upgrade:
Vertex\Tax\Model\Request

They are using the same
"use Magento\Quote\Model\Quote\Address;" statements

@hostep
Copy link
Contributor

hostep commented Jun 23, 2018

@EliasKotlyar: Do you run PHP 7.0.12 or lower?
There was a bug in those versions which is very similar to what you explain here, and this was fixed in PHP 7.0.13: https://bugs.php.net/bug.php?id=66862 & http://php.net/ChangeLog-7.php#7.0.13

Magento is requiring minimum PHP 7.0.13 since this commit: 55657e1 (although this commit is not yet released in an official new Magento version)

@EliasKotlyar
Copy link
Contributor

Hello hostep,

Indeed, i have used PHP7.0.8. I know its a bit outdated, but there should be at least a documentation hint. We are planning to update our project soon to PHP 7.2 as soon as M2.3 gets out.

Greatings
Elias

@navarr
Copy link
Member

navarr commented Jun 27, 2018

@EliasKotlyar The issue mentioned does not appear to be present in the latest versions of Vertex.

You should be able to run composer update vertex/module-tax to get the latest version - or if you're not using it you can follow the instructions in the ticket you linked to remove it from your installation.

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

No branches or pull requests