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

Uncaught Error: Interface 'Magento\QuoteGraphQl\Model\Cart\Payment\AdditionalDataProviderInterface' #15

Closed
fballiano opened this issue Sep 21, 2020 · 8 comments

Comments

@fballiano
Copy link

Hi guys, on a vanilla M2.4.0 + your replace-graphql repo I'm getting this error while lunching a setup:di:compile

Repositories code generation... 1/8 [===>------------------------]  12% < 1 sec 77.0 MiBPHP Fatal error:  Uncaught Error: Interface 'Magento\QuoteGraphQl\Model\Cart\Payment\AdditionalDataProviderInterface' not found in /var/www/html/vendor/paypal/module-braintree-graph-ql/Model/BraintreeDataProvider.php:16
Stack trace:
#0 /var/www/html/vendor/composer/ClassLoader.php(444): include()
#1 /var/www/html/vendor/composer/ClassLoader.php(322): Composer\Autoload\includeFile()
#2 [internal function]: Composer\Autoload\ClassLoader->loadClass()
#3 [internal function]: spl_autoload_call()
#4 /var/www/html/setup/src/Magento/Setup/Module/Di/Code/Reader/ClassesScanner.php(134): class_exists()
#5 /var/www/html/setup/src/Magento/Setup/Module/Di/Code/Reader/ClassesScanner.php(117): Magento\Setup\Module\Di\Code\Reader\ClassesScanner->includeClass()
#6 /var/www/html/setup/src/Magento/Setup/Module/Di/Code/Reader/ClassesScanner.php(87): Magento\Setup\Module\Di\Code\Reader\ClassesScanner->extract()
#7 /var/www/html/setup/src/Magento/Setup/Module/Di/App/Task/Operation/RepositoryGenerator.php(61): Magento\Setup\Module\Di\Code\Reader\Clas in /var/www/html/vendor/paypal/module-braintree-graph-ql/Model/BraintreeDataProvider.php on line 16

did you ever encounter something like this?
thanks a lot!

@jissereitsma
Copy link
Collaborator

The error shows that the Braintree GraphQL module is still there, but in this repository it is actually removed: https://github.com/yireo/magento2-replace-graphql/blob/magento-2.4.0/composer.json#L8 Could it be that you are using the wrong version of this package?

@fballiano
Copy link
Author

this is part of the composer.json:

    "require": {
        "magento/composer-root-update-plugin": "~1.0",
        "magento/product-community-edition": "2.4.0",
        "markshust/magento2-module-disabletwofactorauth": "^1.0",
        "yireo/magento2-replace-graphql": "^4.0"
    },

that's really wierd cause yes it seems the module it's still there but I've also removed the vendor folder completely and re-done a "composer install"

@jissereitsma
Copy link
Collaborator

Could you try with removing the composer.lock as well?

@fballiano
Copy link
Author

I removed it when reinstalling, super weird

@jissereitsma
Copy link
Collaborator

Just adding these replacements using composer require or manually adding it to composer.json and then running composer install does not work. Often it is needed to re-run composer install with an empty lock, to force composer to recalculate all dependencies :(

So the issue is solved?

@fballiano
Copy link
Author

also removing the composer.lock and re-installing I get the same error (on php7.4).

I solved copying/pasting the replace lines but I had to "keep" the quote-graphql, customer-graphql, graphql

@jissereitsma
Copy link
Collaborator

Thanks. I've been trying this out again, but in my case, with a vanilla Magento 2.4.0 and PHP 7.4 and the mentioned packages, it simply works. This is also tested for in the GitHub Actions of this workspace. It almost seems if there are additional packages installed in your environment that are not part of my regular 2.4 installation. Perhaps because of Marketplace extensions you have installed. Either way, by inspecting the output of bin/magento module:status there should be zero GraphQL modules installed. In your case, there appear to be several. Could you report them so we know which packages are actually still there?

@jissereitsma
Copy link
Collaborator

I'm going to close this due to inactivity. Feel free to reopen when this is still relevant.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants