bitpay / magento2-plugin

Magento2.x payment plugin for Bitpay.com
MIT License
13 stars 24 forks source link

Fatal error: Uncaught TypeError Magento ver. 2.1.2 #7

Closed Eliovp closed 7 years ago

Eliovp commented 7 years ago

Hey,

Hope someone can help me out here.

Got this error

`Fatal error: Uncaught TypeError: Argument 2 passed to Magento\Braintree\Block\Adminhtml\Form\Field\CcTypes::__construct() must be an instance of Magento\Braintree\Helper\CcType, instance of Magento\Braintree\Model\Source\CcType given, called in /vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php on line 93 and defined in /vendor/magento/module-braintree/Block/Adminhtml/Form/Field/CcTypes.php:29 Stack trace:

0 /vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(93):

Magento\Braintree\Block\Adminhtml\Form\Field\CcTypes->__construct(Object(Magento\Framework\View\Element\Context), Object(Magento\Braintree\Model\Source\CcType), Array) #1 /vendor/magento/framework/ObjectManager/Factory/Compiled.php(88): Magento\Framework\ObjectManager\Factory\AbstractFactory->createObject('Magento\Braintr...', Array)

2 /vendor/magento/framework/ObjectManager/ObjectManager.php(57): Magento\Framework\ObjectManager\Factory\C

in /vendor/magento/module-braintree/Block/Adminhtml/Form/Field/CcTypes.php on line 29`

When going to Admin -> Stores -> Configuration -> Sales -> Payment Methods

I can however perfectly turn the module on/off (which makes no difference).

Thank you in advance!

Greetings!

pieterpoorthuis commented 7 years ago

Couple of questions:

Eliovp commented 7 years ago

Hey Pieter, "bedankt voor je reactie"

Thx for your quick reply.

I installed the latest from the repo. PHP version is PHP 7.0.8 Yes, manually, tried it with composer but didn't really work out. Manually was without any issues, recompiling magento from cli went fine as well.

i would gladly post the contents of that log if it was there.

 ls log
debug.log  exception.log  install.log  magento.cron.log  setup.cron.log  system.log  update.cron.log  update.log

Greetings and thank you for your reply! Appreciate it!

pieterpoorthuis commented 7 years ago

Elio,

The composer pulls in required libs. So if you download the repo and composer fails, you won't get a working plugin.

Can you try by downloading & installing the latest release: https://github.com/bitpay/magento2-plugin/releases/tag/v1.0.4 Releases are bundled with the libs, so you can install without running composer.

Eliovp commented 7 years ago

Pieter,

Downloaded 1.0.4, copied the files over, recompiled, cleared cache, still same error.

Sorry for the inconvience..

Any other suggestions?

pieterpoorthuis commented 7 years ago

I have never this error message before.. I'm also puzzled, because the log messages point to 'Braintree', which is a completely different payment plugin.

Can you remove the Braintree plugin and try the BitPay plugin again?

Eliovp commented 7 years ago

Whish i could say that that sovled the issue but it didn't, i completely disabled that module but no luck.

:(

pieterpoorthuis commented 7 years ago

Can you contact me at integrations at bitpay.com?

Eliovp commented 7 years ago

Sent you a mail.

Thank you!

Eliovp commented 7 years ago

This has been solved. Plugin Magento_Braintree was generating the issue.

Thank you pieterpoorthuis.