1

I have an Ubuntu Server 18.04 with PHP 7.0.33 and a working Magento 2.1.7 installation with a working (up to yesterday) module for credit card payment

after adding some new modules, compiling and deploying without any problem the system still works fine

but when I try to checkout and confirm on credit card payment the checkout page reloads, it's not redirecting anymore to the credit card portal for entering my information:

This is my credit card selection Credit card payment method

When I click on the Completa ordine button (Complete Order)

The loading spinner appears and then disappears again on the same page.

in my browser console I see this error:

VM16995:1 POST http://domain.com/rest/store/V1/carts/mine/payment-information 500 (Internal Server Error)

This is the network trace

Network trace

and in my error.log I see this message:

[Sat May 25 10:20:14.839259 2019] [proxy_fcgi:error] [pid 4427] [client XX.XX.XX.XX:13271] AH01071: Got error 'PHP message: PHP Fatal error: Uncaught TypeError: Argument 1 passed to Magento\Setup\Module\DataSetup::__construct() must be an instance of Magento\Framework\Module\Setup\Context, instance of Magento\Framework\ObjectManager\ObjectManager given, called in /var/www/domain/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php on line 93 and defined in /var/www/domain/setup/src/Magento/Setup/Module/DataSetup.php:57\nStack trace:\n#0 /var/www/domain/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(93): Magento\Setup\Module\DataSetup->__construct(Object(Magento\Framework\ObjectManager\ObjectManager))\n#1 /var/www/domain/vendor/magento/framework/ObjectManager/Factory/Compiled.php(88): Magento\Framework\ObjectManager\Factory\AbstractFactory->createObject('Magento\\Setup\\M...', Array)\n#2 /var/www/domain/vendor/magento/framework/ObjectManager/Factory/Compiled.php(130): Magento\Framework\ObjectManager\Factory\Compiled->create('Magento\\S...\n', referer: http://domain.com/checkout/

In the stack trace on error.log I can't find any reference to one of my modules, even if the presence of create('Magento\\\\S... at the end of the trace make me think that the trace has been cut for some reason

I've searched for such errors on DataSetup::__construct() but it seems that this error could happen during modules installation, I couldn't find anything about this error on an API call

the rest of the system seems to work fine and I don't have other messages on error.log

how can I solve this?

EDIT I Just noticed that the error happens on any payment method, not only on credit card, every time I click on complete order on any payment method

| improve this question | | | | |
0

Run This Command and Try :-

sudo rm -rf pub/static/frontend/ pub/static/adminhtml/ pub/static/_requirejs pub/static/deployed_version.txt var/cache var/page_cache var/generation var/view_preprocessed var/session generated/code var/di

sudo php bin/magento setup:upgrade

sudo php bin/magento setup:static-content:deploy -f

sudo php bin/magento cache:flush

After Execute Give Permission This Folder var/ generated/ pub/

Reference Link

Reference Link

| improve this answer | | | | |
  • Done, nothing changed: No errors during setup and deploy, everything works, payment confirmation fails – fabio.ivona May 25 '19 at 9:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.