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

[CRITICAL] Checkout crashes with UnexpectedValueException #30

Closed
koenner01 opened this issue Jul 12, 2017 · 9 comments
Closed

[CRITICAL] Checkout crashes with UnexpectedValueException #30

koenner01 opened this issue Jul 12, 2017 · 9 comments

Comments

@koenner01
Copy link

If the module is installed and 'Enabled' is set to 'No', the checkout crashes with an UnexpectedValueException when there are no settings entered in the backend.

Stacktrace:

1 exception(s):
Exception #0 (UnexpectedValueException): Payment model name is not provided in config!

Exception #0 (UnexpectedValueException): Payment model name is not provided in config!
#0 ./vendor/mollie/magento2/Model/MollieConfigProvider.php(65): Magento\Payment\Helper\Data->getMethodInstance('mollie_methods_...')
#1 ./vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(93): Mollie\Payment\Model\MollieConfigProvider->__construct(Object(Mollie\Payment\Model\Mollie), Object(Magento\Payment\Helper\Data), Object(Magento\Framework\View\Asset\Repository), Object(Magento\Framework\App\Config), Object(Magento\Store\Model\StoreManager), Object(Magento\Framework\Escaper))
#2 ./vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php(89): Magento\Framework\ObjectManager\Factory\AbstractFactory->createObject('Mollie\\Payment\\...', Array)
#3 ./vendor/magento/framework/ObjectManager/ObjectManager.php(71): Magento\Framework\ObjectManager\Factory\Dynamic\Developer->create('Mollie\\Payment\\...')
#4 ./vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(163): Magento\Framework\ObjectManager\ObjectManager->get('Mollie\\Payment\\...')
#5 ./vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(139): Magento\Framework\ObjectManager\Factory\AbstractFactory->parseArray(Array)
#6 ./vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php(53): Magento\Framework\ObjectManager\Factory\AbstractFactory->resolveArgument(Array, NULL, NULL, 'configProviders', 'Magento\\Checkou...')
#7 ./vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php(82): Magento\Framework\ObjectManager\Factory\Dynamic\Developer->_resolveArguments('Magento\\Checkou...', Array, Array)
#8 ./vendor/magento/framework/ObjectManager/ObjectManager.php(71): Magento\Framework\ObjectManager\Factory\Dynamic\Developer->create('Magento\\Checkou...')
#9 ./vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(126): Magento\Framework\ObjectManager\ObjectManager->get('Magento\\Checkou...')
#10 ./vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php(53): Magento\Framework\ObjectManager\Factory\AbstractFactory->resolveArgument(Array, 'Magento\\Checkou...', NULL, 'configProvider', 'Magento\\Checkou...')
#11 ./vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php(82): Magento\Framework\ObjectManager\Factory\Dynamic\Developer->_resolveArguments('Magento\\Checkou...', Array, Array)
#12 ./vendor/magento/framework/ObjectManager/ObjectManager.php(57): Magento\Framework\ObjectManager\Factory\Dynamic\Developer->create('Magento\\Checkou...', Array)
#13 ./vendor/magento/framework/View/Element/BlockFactory.php(45): Magento\Framework\ObjectManager\ObjectManager->create('Magento\\Checkou...', Array)
#14 ./vendor/magento/framework/View/Layout/Generator/Block.php(257): Magento\Framework\View\Element\BlockFactory->createBlock('Magento\\Checkou...', Array)
#15 ./vendor/magento/framework/View/Layout/Generator/Block.php(237): Magento\Framework\View\Layout\Generator\Block->getBlockInstance('Magento\\Checkou...', Array)
#16 ./vendor/magento/framework/View/Layout/Generator/Block.php(215): Magento\Framework\View\Layout\Generator\Block->createBlock('Magento\\Checkou...', 'checkout.cart.s...', Array)
#17 ./vendor/magento/framework/View/Layout/Generator/Block.php(124): Magento\Framework\View\Layout\Generator\Block->generateBlock(Object(Magento\Framework\View\Layout\ScheduledStructure), Object(Magento\Framework\View\Layout\Data\Structure), 'checkout.cart.s...')
#18 ./vendor/magento/framework/View/Layout/GeneratorPool.php(86): Magento\Framework\View\Layout\Generator\Block->process(Object(Magento\Framework\View\Layout\Reader\Context), Object(Magento\Framework\View\Layout\Generator\Context))
#19 ./vendor/magento/framework/View/Layout.php(327): Magento\Framework\View\Layout\GeneratorPool->process(Object(Magento\Framework\View\Layout\Reader\Context), Object(Magento\Framework\View\Layout\Generator\Context))
#20 ./var/generation/Magento/Framework/View/Layout/Interceptor.php(89): Magento\Framework\View\Layout->generateElements()
#21 ./vendor/magento/framework/View/Layout/Builder.php(129): Magento\Framework\View\Layout\Interceptor->generateElements()
#22 ./vendor/magento/framework/View/Page/Builder.php(55): Magento\Framework\View\Layout\Builder->generateLayoutBlocks()
#23 ./vendor/magento/framework/View/Layout/Builder.php(65): Magento\Framework\View\Page\Builder->generateLayoutBlocks()
#24 ./vendor/magento/framework/View/Page/Config.php(197): Magento\Framework\View\Layout\Builder->build()
#25 ./vendor/magento/framework/View/Page/Config.php(217): Magento\Framework\View\Page\Config->build()
#26 ./vendor/magento/module-checkout/Controller/Cart/Index.php(55): Magento\Framework\View\Page\Config->getTitle()
#27 ./var/generation/Magento/Checkout/Controller/Cart/Index/Interceptor.php(24): Magento\Checkout\Controller\Cart\Index->execute()
#28 ./vendor/magento/framework/App/Action/Action.php(102): Magento\Checkout\Controller\Cart\Index\Interceptor->execute()
#29 ./vendor/magento/framework/Interception/Interceptor.php(74): Magento\Framework\App\Action\Action->dispatch(Object(Magento\Framework\App\Request\Http))
#30 ./vendor/magento/framework/Interception/Chain/Chain.php(70): Magento\Checkout\Controller\Cart\Index\Interceptor->___callParent('dispatch', Array)
#31 ./vendor/magento/framework/Interception/Chain/Chain.php(63): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\\Checkou...', 'dispatch', Object(Magento\Checkout\Controller\Cart\Index\Interceptor), Array, 'contextPlugin')
#32 ./vendor/magento/module-store/App/Action/Plugin/Context.php(106): Magento\Framework\Interception\Chain\Chain->Magento\Framework\Interception\Chain\{closure}(Object(Magento\Framework\App\Request\Http))
#33 ./vendor/magento/framework/Interception/Chain/Chain.php(67): Magento\Store\App\Action\Plugin\Context->aroundDispatch(Object(Magento\Checkout\Controller\Cart\Index\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#34 ./vendor/magento/framework/Interception/Chain/Chain.php(63): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\\Checkou...', 'dispatch', Object(Magento\Checkout\Controller\Cart\Index\Interceptor), Array, 'customer-app-ac...')
#35 ./vendor/magento/module-customer/Model/App/Action/ContextPlugin.php(61): Magento\Framework\Interception\Chain\Chain->Magento\Framework\Interception\Chain\{closure}(Object(Magento\Framework\App\Request\Http))
#36 ./vendor/magento/framework/Interception/Chain/Chain.php(67): Magento\Customer\Model\App\Action\ContextPlugin->aroundDispatch(Object(Magento\Checkout\Controller\Cart\Index\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#37 ./vendor/magento/framework/Interception/Chain/Chain.php(63): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\\Checkou...', 'dispatch', Object(Magento\Checkout\Controller\Cart\Index\Interceptor), Array, 'storeCheck')
#38 ./vendor/magento/module-store/App/Action/Plugin/StoreCheck.php(44): Magento\Framework\Interception\Chain\Chain->Magento\Framework\Interception\Chain\{closure}(Object(Magento\Framework\App\Request\Http))
#39 ./vendor/magento/framework/Interception/Chain/Chain.php(67): Magento\Store\App\Action\Plugin\StoreCheck->aroundDispatch(Object(Magento\Checkout\Controller\Cart\Index\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#40 ./vendor/magento/framework/Interception/Chain/Chain.php(63): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\\Checkou...', 'dispatch', Object(Magento\Checkout\Controller\Cart\Index\Interceptor), Array, 'weee-app-action...')
#41 ./vendor/magento/module-weee/Model/App/Action/ContextPlugin.php(112): Magento\Framework\Interception\Chain\Chain->Magento\Framework\Interception\Chain\{closure}(Object(Magento\Framework\App\Request\Http))
#42 ./vendor/magento/framework/Interception/Chain/Chain.php(67): Magento\Weee\Model\App\Action\ContextPlugin->aroundDispatch(Object(Magento\Checkout\Controller\Cart\Index\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#43 ./vendor/magento/framework/Interception/Interceptor.php(138): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\\Checkou...', 'dispatch', Object(Magento\Checkout\Controller\Cart\Index\Interceptor), Array, 'tax-app-action-...')
#44 ./vendor/magento/module-tax/Model/App/Action/ContextPlugin.php(91): Magento\Checkout\Controller\Cart\Index\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))
#45 ./vendor/magento/framework/Interception/Interceptor.php(142): Magento\Tax\Model\App\Action\ContextPlugin->aroundDispatch(Object(Magento\Checkout\Controller\Cart\Index\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#46 ./var/generation/Magento/Checkout/Controller/Cart/Index/Interceptor.php(39): Magento\Checkout\Controller\Cart\Index\Interceptor->___callPlugins('dispatch', Array, Array)
#47 ./vendor/magento/framework/App/FrontController.php(55): Magento\Checkout\Controller\Cart\Index\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))
#48 ./vendor/magento/framework/Interception/Interceptor.php(74): Magento\Framework\App\FrontController->dispatch(Object(Magento\Framework\App\Request\Http))
#49 ./vendor/magento/framework/Interception/Chain/Chain.php(70): Magento\Framework\App\FrontController\Interceptor->___callParent('dispatch', Array)
#50 ./vendor/magento/framework/Interception/Chain/Chain.php(63): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\\Framewo...', 'dispatch', Object(Magento\Framework\App\FrontController\Interceptor), Array, 'requestPreproce...')
#51 ./vendor/magento/module-store/App/FrontController/Plugin/RequestPreprocessor.php(94): Magento\Framework\Interception\Chain\Chain->Magento\Framework\Interception\Chain\{closure}(Object(Magento\Framework\App\Request\Http))
#52 ./vendor/magento/framework/Interception/Chain/Chain.php(67): Magento\Store\App\FrontController\Plugin\RequestPreprocessor->aroundDispatch(Object(Magento\Framework\App\FrontController\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#53 ./vendor/magento/framework/Interception/Chain/Chain.php(63): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\\Framewo...', 'dispatch', Object(Magento\Framework\App\FrontController\Interceptor), Array, 'install')
#54 ./vendor/magento/framework/Module/Plugin/DbStatusValidator.php(69): Magento\Framework\Interception\Chain\Chain->Magento\Framework\Interception\Chain\{closure}(Object(Magento\Framework\App\Request\Http))
#55 ./vendor/magento/framework/Interception/Chain/Chain.php(67): Magento\Framework\Module\Plugin\DbStatusValidator->aroundDispatch(Object(Magento\Framework\App\FrontController\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#56 ./vendor/magento/framework/Interception/Chain/Chain.php(63): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\\Framewo...', 'dispatch', Object(Magento\Framework\App\FrontController\Interceptor), Array, 'front-controlle...')
#57 ./vendor/magento/module-page-cache/Model/App/FrontController/VarnishPlugin.php(55): Magento\Framework\Interception\Chain\Chain->Magento\Framework\Interception\Chain\{closure}(Object(Magento\Framework\App\Request\Http))
#58 ./vendor/magento/framework/Interception/Chain/Chain.php(67): Magento\PageCache\Model\App\FrontController\VarnishPlugin->aroundDispatch(Object(Magento\Framework\App\FrontController\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#59 ./vendor/magento/framework/Interception/Interceptor.php(138): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\\Framewo...', 'dispatch', Object(Magento\Framework\App\FrontController\Interceptor), Array, 'front-controlle...')
#60 ./vendor/magento/module-page-cache/Model/App/FrontController/BuiltinPlugin.php(68): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))
#61 ./vendor/magento/framework/Interception/Interceptor.php(142): Magento\PageCache\Model\App\FrontController\BuiltinPlugin->aroundDispatch(Object(Magento\Framework\App\FrontController\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#62 ./var/generation/Magento/Framework/App/FrontController/Interceptor.php(26): Magento\Framework\App\FrontController\Interceptor->___callPlugins('dispatch', Array, Array)
#63 ./vendor/magento/framework/App/Http.php(135): Magento\Framework\App\FrontController\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))
#64 ./vendor/magento/framework/App/Bootstrap.php(258): Magento\Framework\App\Http->launch()
#65 ./pub/index.php(37): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http))
#66 {main}

Please add checks to see if the module is actually enabled in the stores configuration, before applying Mollie logic to any page! This is a blocking issue.

@Marvin-Magmodules
Copy link
Collaborator

Hi Koen, thanks for the detailed report!

The model is set by default value in etc/config.xml, so this should be available after installation. What where the exact steps you took, so I'm able te replicate this and get this fixed? Can you also supply the Magento version, extension version. There are no other Mollie extensions installed on this instance?

@koenner01
Copy link
Author

There are no other mollie extensions installed and we are using the latest release (through composer).
The only thing that was done is that the module was installed. Nothing else was done (no configuration settings etc.).

After that we just followed the default Magento flow to go to the checkout (add product to cart, go to checkout through minicart) and on the checkout page the exception is thrown.

We assume this happens because no settings have been configured (we can't yet as we are waiting on the data from our client) because on another webshop we are using the same version with settings configured and everything is working there.

@Marvin-Magmodules
Copy link
Collaborator

Thanks for the info, one last question, what Magento version is the client running?

@koenner01
Copy link
Author

koenner01 commented Jul 13, 2017

We are running CE 2.1.7

@Pagayo
Copy link

Pagayo commented Jul 14, 2017

I also have issues with Mollie and CE 2.1.7. In the admin all is functioning just fine. I frontend it is not loading. No errors or exceptions. Also no debug file is being created.
I use the Infortis Ultimo theme and Magento basic checkout.
When the Mollie payment functions are disabled I have the same problems. Only when I disable Mollie at Advanced/Advanced the checkout is functioning.

@Marvin-Magmodules
Copy link
Collaborator

Marvin-Magmodules commented Jul 14, 2017

Any errors on the selftest?

@Pagayo
Copy link

Pagayo commented Jul 14, 2017

Success: PHP version: 7.0.21.
Success: JSON is enabled.
Success: cURL is enabled.
Success: cURL functions are enabled.

@Marvin-Magmodules
Copy link
Collaborator

@koenner01 did some testing, but was not able to reproduce this. Think this is a caching issue, do you still have this error after flushing the cache? Magento 2.1.7 is also loading all the disabled payment methods. This issue of loading disabled payment methods is fixed in the 2.1-develop and 2.1.8-preview: magento/magento2@c41743d

If you sill have this issue after flushing the cache, can you ping me some login details if possible, so we can investigate this issue? https://www.magmodules.eu/contact-us.html

@Marvin-Magmodules
Copy link
Collaborator

Closing this issue because it has been inactive for over a month. Please reopen if you still encounter this issue with the latest version 1.1.1. Thank you!

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

3 participants