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

PayPal Express Checkout: We can't initialize Express Checkout. #9497

Closed
bbtimx opened this issue May 3, 2017 · 53 comments
Closed

PayPal Express Checkout: We can't initialize Express Checkout. #9497

bbtimx opened this issue May 3, 2017 · 53 comments
Labels
bug report Component: Payment Issue: Cannot Reproduce Cannot reproduce the issue on the latest `2.4-develop` branch Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development

Comments

@bbtimx
Copy link

bbtimx commented May 3, 2017

Preconditions

  1. Magento Version 2.1.6 Community Version
  2. PayPal Express Checkout in Live Mode

Steps to reproduce

  1. Go to any products details page
  2. Click PayPal Express Button
  3. Redirect to empty cart with error message: "We can't initialize Express Checkout."

Whats working:

  1. Go to any products details page
  2. Click add to cart
  3. Click PayPal Express Button on product details page or cart or mini cart
  4. PayPal Express Checkout site came up

Expected result

  1. PayPal Express Checkout site came up

Actual result

Redirect to empty cart with error message: "We can't initialize Express Checkout."

system.log:

[2017-05-03 15:53:46] main.CRITICAL: Exception message: We can't initialize Express Checkout.
Trace: #0 /htdocs/vendor/magento/module-paypal/Controller/Express/GetToken.php(82): Magento\Paypal\Controller\Express\AbstractExpress->_initCheckout()
#1 /htdocs/vendor/magento/module-paypal/Controller/Express/AbstractExpress/Start.php(24): Magento\Paypal\Controller\Express\GetToken->getToken()
#2 /htdocs/vendor/magento/framework/App/Action/Action.php(102): Magento\Paypal\Controller\Express\AbstractExpress\Start->execute()
#3 /htdocs/vendor/magento/framework/Interception/Interceptor.php(74): Magento\Framework\App\Action\Action->dispatch(Object(Magento\Framework\App\Request\Http))
#4 /htdocs/vendor/magento/framework/Interception/Chain/Chain.php(70): Magento\Paypal\Controller\Express\Start\Interceptor->___callParent('dispatch', Array)
#5 /htdocs/vendor/magento/framework/Interception/Chain/Chain.php(63): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\\Paypal\\...', 'dispatch', Object(Magento\Paypal\Controller\Express\Start\Interceptor), Array, 'customer-app-ac...')
#6 /htdocs/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))
#7 /htdocs/vendor/magento/framework/Interception/Chain/Chain.php(67): Magento\Customer\Model\App\Action\ContextPlugin->aroundDispatch(Object(Magento\Paypal\Controller\Express\Start\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#8 /htdocs/vendor/magento/framework/Interception/Chain/Chain.php(63): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\\Paypal\\...', 'dispatch', Object(Magento\Paypal\Controller\Express\Start\Interceptor), Array, 'contextPlugin')
#9 /htdocs/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))
#10 /htdocs/vendor/magento/framework/Interception/Chain/Chain.php(67): Magento\Store\App\Action\Plugin\Context->aroundDispatch(Object(Magento\Paypal\Controller\Express\Start\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#11 /htdocs/vendor/magento/framework/Interception/Chain/Chain.php(63): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\\Paypal\\...', 'dispatch', Object(Magento\Paypal\Controller\Express\Start\Interceptor), Array, 'storeCheck')
#12 /htdocs/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))
#13 /htdocs/vendor/magento/framework/Interception/Chain/Chain.php(67): Magento\Store\App\Action\Plugin\StoreCheck->aroundDispatch(Object(Magento\Paypal\Controller\Express\Start\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#14 /htdocs/vendor/magento/framework/Interception/Chain/Chain.php(63): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\\Paypal\\...', 'dispatch', Object(Magento\Paypal\Controller\Express\Start\Interceptor), Array, 'tax-app-action-...')
#15 /htdocs/vendor/magento/module-tax/Model/App/Action/ContextPlugin.php(91): Magento\Framework\Interception\Chain\Chain->Magento\Framework\Interception\Chain\{closure}(Object(Magento\Framework\App\Request\Http))
#16 /htdocs/vendor/magento/framework/Interception/Chain/Chain.php(67): Magento\Tax\Model\App\Action\ContextPlugin->aroundDispatch(Object(Magento\Paypal\Controller\Express\Start\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#17 /htdocs/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\\Paypal\\...', 'dispatch', Object(Magento\Paypal\Controller\Express\Start\Interceptor), Array, 'weee-app-action...')
#18 /htdocs/vendor/magento/module-weee/Model/App/Action/ContextPlugin.php(112): Magento\Paypal\Controller\Express\Start\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))
#19 /htdocs/vendor/magento/framework/Interception/Interceptor.php(142): Magento\Weee\Model\App\Action\ContextPlugin->aroundDispatch(Object(Magento\Paypal\Controller\Express\Start\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#20 /htdocs/var/generation/Magento/Paypal/Controller/Express/Start/Interceptor.php(26): Magento\Paypal\Controller\Express\Start\Interceptor->___callPlugins('dispatch', Array, Array)
#21 /htdocs/vendor/magento/framework/App/FrontController.php(55): Magento\Paypal\Controller\Express\Start\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))
#22 /htdocs/vendor/magento/framework/Interception/Interceptor.php(74): Magento\Framework\App\FrontController->dispatch(Object(Magento\Framework\App\Request\Http))
#23 /htdocs/vendor/magento/framework/Interception/Chain/Chain.php(70): Magento\Framework\App\FrontController\Interceptor->___callParent('dispatch', Array)
#24 /htdocs/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...')
#25 /htdocs/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))
#26 /htdocs/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))
#27 /htdocs/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')
#28 /htdocs/vendor/magento/framework/Module/Plugin/DbStatusValidator.php(69): Magento\Framework\Interception\Chain\Chain->Magento\Framework\Interception\Chain\{closure}(Object(Magento\Framework\App\Request\Http))
#29 /htdocs/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))
#30 /htdocs/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...')
#31 /htdocs/vendor/magento/module-page-cache/Model/App/FrontController/BuiltinPlugin.php(73): Magento\Framework\Interception\Chain\Chain->Magento\Framework\Interception\Chain\{closure}(Object(Magento\Framework\App\Request\Http))
#32 /htdocs/vendor/magento/framework/Interception/Chain/Chain.php(67): Magento\PageCache\Model\App\FrontController\BuiltinPlugin->aroundDispatch(Object(Magento\Framework\App\FrontController\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#33 /htdocs/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...')
#34 /htdocs/vendor/magento/module-page-cache/Model/App/FrontController/VarnishPlugin.php(55): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))
#35 /htdocs/vendor/magento/framework/Interception/Interceptor.php(142): Magento\PageCache\Model\App\FrontController\VarnishPlugin->aroundDispatch(Object(Magento\Framework\App\FrontController\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#36 /htdocs/var/generation/Magento/Framework/App/FrontController/Interceptor.php(26): Magento\Framework\App\FrontController\Interceptor->___callPlugins('dispatch', Array, Array)
#37 /htdocs/vendor/magento/framework/App/Http.php(135): Magento\Framework\App\FrontController\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))
#38 /htdocs/vendor/magento/framework/Interception/Interceptor.php(146): Magento\Framework\App\Http->launch()
#39 /htdocs/var/generation/Magento/Framework/App/Http/Interceptor.php(26): Magento\Framework\App\Http\Interceptor->___callPlugins('launch', Array, Array)
#40 /htdocs/vendor/magento/framework/App/Bootstrap.php(258): Magento\Framework\App\Http\Interceptor->launch()
#41 /htdocs/index.php(39): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http\Interceptor))
#42 {main} [] []
@YPyltiai
Copy link

YPyltiai commented May 5, 2017

Hello @bbtimx,

Thank you for posting it. I've created an internal ticket to check the issue: MAGETWO-68948

@YPyltiai YPyltiai added Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development bug report labels May 5, 2017
@viktym
Copy link
Contributor

viktym commented Jun 21, 2017

Hi @bbtimx
I can't reproduce this issue on 2.1.6
When you click PayPal Express Button on Product Page - product should automatically be added to the cart. If that no happened then probably js errors on the page are present.
Could you please retest this issue and check if any js errors on the page are present?

@goldcattle
Copy link

Trace: #0 /opt/bitnami/apps/magento/htdocs/vendor/magento/module-paypal/Controller/Express/GetToken.php(82): Magento\Paypal\Controller\Express\AbstractExpress->_initCheckout()
#1 /opt/bitnami/apps/magento/htdocs/vendor/magento/module-paypal/Controller/Express/GetToken.php(52): Magento\Paypal\Controller\Express\GetToken->getToken()
#2 /opt/bitnami/apps/magento/htdocs/vendor/magento/framework/App/Action/Action.php(102): Magento\Paypal\Controller\Express\GetToken->execute()
#3 /opt/bitnami/apps/magento/htdocs/vendor/magento/framework/Interception/Interceptor.php(74): Magento\Framework\App\Action\Action->dispatch(Object(Magento\Framework\App\Request\Http))
#4 /opt/bitnami/apps/magento/htdocs/vendor/magento/framework/Interception/Chain/Chain.php(70): Magento\Paypal\Controller\Express\GetToken\Interceptor->___callParent('dispatch', Array)
#5 /opt/bitnami/apps/magento/htdocs/vendor/magento/framework/Interception/Chain/Chain.php(63): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\Paypal\...', 'dispatch', Object(Magento\Paypal\Controller\Express\GetToken\Interceptor), Array, 'contextPlugin')
#6 /opt/bitnami/apps/magento/htdocs/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))
#7 /opt/bitnami/apps/magento/htdocs/vendor/magento/framework/Interception/Chain/Chain.php(67): Magento\Store\App\Action\Plugin\Context->aroundDispatch(Object(Magento\Paypal\Controller\Express\GetToken\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#8 /opt/bitnami/apps/magento/htdocs/vendor/magento/framework/Interception/Chain/Chain.php(63): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\Paypal\...', 'dispatch', Object(Magento\Paypal\Controller\Express\GetToken\Interceptor), Array, 'customer-app-ac...')
#9 /opt/bitnami/apps/magento/htdocs/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))
#10 /opt/bitnami/apps/magento/htdocs/vendor/magento/framework/Interception/Chain/Chain.php(67): Magento\Customer\Model\App\Action\ContextPlugin->aroundDispatch(Object(Magento\Paypal\Controller\Express\GetToken\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#11 /opt/bitnami/apps/magento/htdocs/vendor/magento/framework/Interception/Chain/Chain.php(63): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\Paypal\...', 'dispatch', Object(Magento\Paypal\Controller\Express\GetToken\Interceptor), Array, 'storeCheck')
#12 /opt/bitnami/apps/magento/htdocs/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))
#13 /opt/bitnami/apps/magento/htdocs/vendor/magento/framework/Interception/Chain/Chain.php(67): Magento\Store\App\Action\Plugin\StoreCheck->aroundDispatch(Object(Magento\Paypal\Controller\Express\GetToken\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#14 /opt/bitnami/apps/magento/htdocs/vendor/magento/framework/Interception/Chain/Chain.php(63): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\Paypal\...', 'dispatch', Object(Magento\Paypal\Controller\Express\GetToken\Interceptor), Array, 'weee-app-action...')
#15 /opt/bitnami/apps/magento/htdocs/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))
#16 /opt/bitnami/apps/magento/htdocs/vendor/magento/framework/Interception/Chain/Chain.php(67): Magento\Weee\Model\App\Action\ContextPlugin->aroundDispatch(Object(Magento\Paypal\Controller\Express\GetToken\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#17 /opt/bitnami/apps/magento/htdocs/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\Paypal\...', 'dispatch', Object(Magento\Paypal\Controller\Express\GetToken\Interceptor), Array, 'tax-app-action-...')
#18 /opt/bitnami/apps/magento/htdocs/vendor/magento/module-tax/Model/App/Action/ContextPlugin.php(91): Magento\Paypal\Controller\Express\GetToken\Interceptor->Magento\Framework\Interception{closure}(Object(Magento\Framework\App\Request\Http))
#19 /opt/bitnami/apps/magento/htdocs/vendor/magento/framework/Interception/Interceptor.php(142): Magento\Tax\Model\App\Action\ContextPlugin->aroundDispatch(Object(Magento\Paypal\Controller\Express\GetToken\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#20 /opt/bitnami/apps/magento/htdocs/var/generation/Magento/Paypal/Controller/Express/GetToken/Interceptor.php(26): Magento\Paypal\Controller\Express\GetToken\Interceptor->___callPlugins('dispatch', Array, Array)
#21 /opt/bitnami/apps/magento/htdocs/vendor/magento/framework/App/FrontController.php(55): Magento\Paypal\Controller\Express\GetToken\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))
#22 /opt/bitnami/apps/magento/htdocs/vendor/magento/framework/Interception/Interceptor.php(74): Magento\Framework\App\FrontController->dispatch(Object(Magento\Framework\App\Request\Http))
#23 /opt/bitnami/apps/magento/htdocs/vendor/magento/framework/Interception/Chain/Chain.php(70): Magento\Framework\App\FrontController\Interceptor->___callParent('dispatch', Array)
#24 /opt/bitnami/apps/magento/htdocs/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...')
#25 /opt/bitnami/apps/magento/htdocs/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))
#26 /opt/bitnami/apps/magento/htdocs/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))
#27 /opt/bitnami/apps/magento/htdocs/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')
#28 /opt/bitnami/apps/magento/htdocs/vendor/magento/framework/Module/Plugin/DbStatusValidator.php(69): Magento\Framework\Interception\Chain\Chain->Magento\Framework\Interception\Chain{closure}(Object(Magento\Framework\App\Request\Http))
#29 /opt/bitnami/apps/magento/htdocs/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))
#30 /opt/bitnami/apps/magento/htdocs/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...')
#31 /opt/bitnami/apps/magento/htdocs/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))
#32 /opt/bitnami/apps/magento/htdocs/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))
#33 /opt/bitnami/apps/magento/htdocs/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...')
#34 /opt/bitnami/apps/magento/htdocs/vendor/magento/module-page-cache/Model/App/FrontController/BuiltinPlugin.php(73): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception{closure}(Object(Magento\Framework\App\Request\Http))
#35 /opt/bitnami/apps/magento/htdocs/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))
#36 /opt/bitnami/apps/magento/htdocs/var/generation/Magento/Framework/App/FrontController/Interceptor.php(26): Magento\Framework\App\FrontController\Interceptor->___callPlugins('dispatch', Array, Array)
#37 /opt/bitnami/apps/magento/htdocs/vendor/magento/framework/App/Http.php(135): Magento\Framework\App\FrontController\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))
#38 /opt/bitnami/apps/magento/htdocs/vendor/magento/framework/App/Bootstrap.php(258): Magento\Framework\App\Http->launch()
#39 /opt/bitnami/apps/magento/htdocs/index.php(39): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http))
#40 {main} [] []
[2017-06-28 21:47:03] main.CRITICAL: Broken reference: No element found with ID 'sidebar.additional'. [] []
[2017-06-28 22:08:31] main.CRITICAL: Broken reference: No element found with ID 'sidebar.additional'. [] []

@goldcattle
Copy link

on 2.1.7 we still see this issue.

@dharmveerrawat
Copy link

on 2.1.3, i am facing same issue

@angelo983
Copy link
Member

angelo983 commented Jul 19, 2017

The problem persists in 2.1.7. It's going to be hard to manage a lot of lost sell

See this: Store -> Configuration -> Sales -> Payment Methods -> PayPal Express Checkout -> Configure

Focus your attention in:
Enable In-Context Checkout Experience
(See PayPal Feature Support details and list of supported regions here.)
https://developer.paypal.com/docs/classic/express-checkout/in-context/

redirect to
https://developer.paypal.com/docs/classic/express-checkout/

Important: This integration method is Deprecated as of January 1, 2017. For new integrations, see the PayPal Express Checkout Integration Guide.
https://developer.paypal.com/docs/integration/direct/express-checkout/integration-jsv4/

@raumspitz
Copy link

I have the same error. I am using 2.0.15 version

@nmallepally
Copy link

I have the same error on 2.1.7, do we have any work around to avoid loss of sales, what more strange is it does not record as either pending order or cancelled orders on Magento 2 order grid.

[2017-08-24 19:43:52] main.CRITICAL: Exception message: We can't initialize Express Checkout.
Trace: #0 /var/www/vhosts/magento2/httpdocs/vendor/magento/module-paypal/Controller/Express/AbstractExpress/ReturnAction.php(31): Magento\Paypal\Controller\Express\AbstractExpress->_initCheckout()
#1 /var/www/vhosts/magento2/httpdocs/vendor/magento/framework/App/Action/Action.php(102): Magento\Paypal\Controller\Express\AbstractExpress\ReturnAction->execute()
#2 /var/www/vhosts/magento2/httpdocs/vendor/magento/framework/Interception/Interceptor.php(74): Magento\Framework\App\Action\Action->dispatch(Object(Magento\Framework\App\Request\Http))
#3 /var/www/vhosts/magento2/httpdocs/vendor/magento/framework/Interception/Chain/Chain.php(70): Magento\Paypal\Controller\Express\ReturnAction\Interceptor->___callParent('dispatch', Array)
#4 /var/www/vhosts/magento2/httpdocs/vendor/magento/framework/Interception/Chain/Chain.php(63): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\Paypal\...', 'dispatch', Object(Magento\Paypal\Controller\Ex$
#5 /var/www/vhosts/magento2/httpdocs/vendor/magento/module-store/App/Action/Plugin/Context.php(106): Magento\Framework\Interception\Chain\Chain->Magento\Framework\Interception\Chain{closure}(Object(Magento\Framework\App\R$
#6 /var/www/vhosts/magento2/httpdocs/vendor/magento/framework/Interception/Chain/Chain.php(67): Magento\Store\App\Action\Plugin\Context->aroundDispatch(Object(Magento\Paypal\Controller\Express\ReturnAction\Interceptor), Ob$
#7 /var/www/vhosts/magento2/httpdocs/vendor/magento/framework/Interception/Chain/Chain.php(63): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\Paypal\...', 'dispatch', Object(Magento\Paypal\Controller\Ex$
#8 /var/www/vhosts/magento2/httpdocs/vendor/magento/module-customer/Model/App/Action/ContextPlugin.php(61): Magento\Framework\Interception\Chain\Chain->Magento\Framework\Interception\Chain{closure}(Object(Magento\Framewor$
#9 /var/www/vhosts/magento2/httpdocs/vendor/magento/framework/Interception/Chain/Chain.php(67): Magento\Customer\Model\App\Action\ContextPlugin->aroundDispatch(Object(Magento\Paypal\Controller\Express\ReturnAction\Intercep$
#10 /var/www/vhosts/magento2/httpdocs/vendor/magento/framework/Interception/Chain/Chain.php(63): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\Paypal\...', 'dispatch', Object(Magento\Paypal\Controller\E$
#11 /var/www/vhosts/magento2/httpdocs/vendor/magento/module-store/App/Action/Plugin/StoreCheck.php(44): Magento\Framework\Interception\Chain\Chain->Magento\Framework\Interception\Chain{closure}(Object(Magento\Framework\Ap$
#12 /var/www/vhosts/magento2/httpdocs/vendor/magento/framework/Interception/Chain/Chain.php(67): Magento\Store\App\Action\Plugin\StoreCheck->aroundDispatch(Object(Magento\Paypal\Controller\Express\ReturnAction\Interceptor)$
#13 /var/www/vhosts/magento2/httpdocs/vendor/magento/framework/Interception/Chain/Chain.php(63): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\Paypal\...', 'dispatch', Object(Magento\Paypal\Controller\E$
#14 /var/www/vhosts/magento2/httpdocs/vendor/magento/module-weee/Model/App/Action/ContextPlugin.php(112): Magento\Framework\Interception\Chain\Chain->Magento\Framework\Interception\Chain{closure}(Object(Magento\Framework$
#15 /var/www/vhosts/magento2/httpdocs/vendor/magento/framework/Interception/Chain/Chain.php(67): Magento\Weee\Model\App\Action\ContextPlugin->aroundDispatch(Object(Magento\Paypal\Controller\Express\ReturnAction\Interceptor$
#16 /var/www/vhosts/magento2/httpdocs/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\Paypal\...', 'dispatch', Object(Magento\Paypal\Controller$
#17 /var/www/vhosts/magento2/httpdocs/vendor/magento/module-tax/Model/App/Action/ContextPlugin.php(91): Magento\Paypal\Controller\Express\ReturnAction\Interceptor->Magento\Framework\Interception{closure}(Object(Magento\Fr$
#18 /var/www/vhosts/magento2/httpdocs/vendor/magento/framework/Interception/Interceptor.php(142): Magento\Tax\Model\App\Action\ContextPlugin->aroundDispatch(Object(Magento\Paypal\Controller\Express\ReturnAction\Interceptor$
#19 /var/www/vhosts/magento2/httpdocs/var/generation/Magento/Paypal/Controller/Express/ReturnAction/Interceptor.php(26): Magento\Paypal\Controller\Express\ReturnAction\Interceptor->___callPlugins('dispatch', Array, Array)
#20 /var/www/vhosts/magento2/httpdocs/vendor/magento/framework/App/FrontController.php(55): Magento\Paypal\Controller\Express\ReturnAction\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))
#21 /var/www/vhosts/magento2/httpdocs/vendor/magento/framework/Interception/Interceptor.php(74): Magento\Framework\App\FrontController->dispatch(Object(Magento\Framework\App\Request\Http))
#22 /var/www/vhosts/magento2/httpdocs/vendor/magento/framework/Interception/Chain/Chain.php(70): Magento\Framework\App\FrontController\Interceptor->___callParent('dispatch', Array)
#23 /var/www/vhosts/magento2/httpdocs/vendor/magento/framework/Interception/Chain/Chain.php(63): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\Framewo...', 'dispatch', Object(Magento\Framework\App\FrontC$
#24 /var/www/vhosts/magento2/httpdocs/vendor/magento/module-store/App/FrontController/Plugin/RequestPreprocessor.php(94): Magento\Framework\Interception\Chain\Chain->Magento\Framework\Interception\Chain{closure}(Object(Ma$
#25 /var/www/vhosts/magento2/httpdocs/vendor/magento/framework/Interception/Chain/Chain.php(67): Magento\Store\App\FrontController\Plugin\RequestPreprocessor->aroundDispatch(Object(Magento\Framework\App\FrontController\Int$
#26 /var/www/vhosts/magento2/httpdocs/vendor/magento/framework/Interception/Chain/Chain.php(63): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\Framewo...', 'dispatch', Object(Magento\Framework\App\FrontC$
#27 /var/www/vhosts/magento2/httpdocs/vendor/magento/framework/Module/Plugin/DbStatusValidator.php(69): Magento\Framework\Interception\Chain\Chain->Magento\Framework\Interception\Chain{closure}(Object(Magento\Framework\Ap$
#28 /var/www/vhosts/magento2/httpdocs/vendor/magento/framework/Interception/Chain/Chain.php(67): Magento\Framework\Module\Plugin\DbStatusValidator->aroundDispatch(Object(Magento\Framework\App\FrontController\Interceptor), $
#29 /var/www/vhosts/magento2/httpdocs/vendor/magento/framework/Interception/Chain/Chain.php(63): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\Framewo...', 'dispatch', Object(Magento\Framework\App\FrontC$
#30 /var/www/vhosts/magento2/httpdocs/vendor/magento/module-page-cache/Model/App/FrontController/VarnishPlugin.php(55): Magento\Framework\Interception\Chain\Chain->Magento\Framework\Interception\Chain{closure}(Object(Mage$
#31 /var/www/vhosts/magento2/httpdocs/vendor/magento/framework/Interception/Chain/Chain.php(67): Magento\PageCache\Model\App\FrontController\VarnishPlugin->aroundDispatch(Object(Magento\Framework\App\FrontController\Interc$
#32 /var/www/vhosts/magento2/httpdocs/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\Framewo...', 'dispatch', Object(Magento\Framework\App\Front$
#33 /var/www/vhosts/magento2/httpdocs/vendor/magento/module-page-cache/Model/App/FrontController/BuiltinPlugin.php(73): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception{closure}(Object(Mag$
#34 /var/www/vhosts/magento2/httpdocs/vendor/magento/framework/Interception/Interceptor.php(142): Magento\PageCache\Model\App\FrontController\BuiltinPlugin->aroundDispatch(Object(Magento\Framework\App\FrontController\Inter$
#35 /var/www/vhosts/magento2/httpdocs/var/generation/Magento/Framework/App/FrontController/Interceptor.php(26): Magento\Framework\App\FrontController\Interceptor->___callPlugins('dispatch', Array, Array)
#36 /var/www/vhosts/magento2/httpdocs/vendor/magento/framework/App/Http.php(135): Magento\Framework\App\FrontController\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))
#37 /var/www/vhosts/magento2/httpdocs/vendor/magento/framework/Interception/Interceptor.php(146): Magento\Framework\App\Http->launch()
.

@magento-engcom-team magento-engcom-team added 2.1.x Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development bug report Progress: needs update Component: Payment labels Sep 5, 2017
@mcspronko
Copy link
Contributor

Hi, was this issue fixed?
Thanks

@goldcattle
Copy link

goldcattle commented Sep 9, 2017 via email

@magento-engcom-team magento-engcom-team added 2.1.x Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development bug report Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed Progress: needs update Component: Payment and removed G1 Passed labels Sep 11, 2017
@bijalbhavsar
Copy link

Is any patch available to fix this issue for Magento 2.1.7?

@adinca
Copy link

adinca commented Mar 22, 2018

Looks like this issue is caused by having the guest checkout disabled under Stores > Configuration > Sales > Checkout > Checkout Options > Allow Guest Checkout

Even though guest checkout was enabled under PayPal Express Checkout settings, I was getting this error because Magento guest checkout was disabled. Enabling it fixed the issue for me

@nmallepally
Copy link

@adinca This setting was already enabled for me, and still i was getting this error, did you do anything else apart from enabling this option?.

@KM-HM
Copy link

KM-HM commented Mar 23, 2018

I can not confirm that setting "Stores > Configuration > Sales > Checkout > Checkout Options > Allow Guest Checkout" to "yes" will resolve this issue, my shop had this to set to yes since launch.

"Stores > Configuration > Sales > Checkout > Checkout Options > Allow Guest Checkout" Is set to yes per Magento 2 default. So unless this was set to "no" it should be enabled.

@terrybakshi
Copy link

ok my issue was sorted out. First turn off the minify of CSS, JS and HTML and also if you are using any cache platform like cloudflare or any other do the same in them too turn off minify of CSS, JS and HTML from cloudflare too and then clear magento and cloudflare full cache and check.

@kelsonzhao
Copy link

Same issue in Magento 2.2.3

@kelsonzhao
Copy link

This issue occurs almost every day. Who could solve it ?

@alamrezoanul
Copy link

Hey guys, We're able to fix this issue.
Basically go to

  1. /var/log folder and open system.log
  2. look for an error says "YOURDB.sequence_order_x" table doesn't exist, where x is a number
  3. go to phpmyadmin and duplicate the other sequence_order_x-1 table and rename it to sequence_order_x

The problem should be solved!

@swayoleg
Copy link

swayoleg commented May 9, 2018

@alamrezoanul I don't have such error

@alamrezoanul
Copy link

@swayoleg what is your error by the way?

@swayoleg
Copy link

swayoleg commented May 9, 2018

@alamrezoanul at checkout is We can't initialize Express Checkout.

at log there is no "sequence_order" error

@alamrezoanul
Copy link

i said what is your error then?

@roberto-annunziatella-purelab

Same issue in Magento 2.2.3 only in developer mode, after set in production PayPal works fine.
I still don't know why the error exist, so i'm worried that will come out in not expected situation in production too.

@sanjayjethva
Copy link

I am facing same issue in 2.2.5

@sdhoman
Copy link

sdhoman commented Sep 4, 2018

This is INSANE!!! I'm on Magento CE 2.2.5 fresh installation and I get same error in cart "We can't start Express Checkout." and the best Magento can come up is "we can't replicate the error" when 100+ people complain about the same for more than a year!!! I'm switching to SHOPIFY. Thank you Magento and Good Bye.

@SirocoolXX
Copy link

Has somebody a solution now?
I have the same Problem like bbtimx
[2018-09-17 14:30:07] main.CRITICAL: Exception message: Wir können den Express Checkout nicht initialisieren.
Trace: #0 /html/magento2/vendor/magento/module-paypal/Controller/Express/GetToken.php(82): Magento\Paypal\Controller\Express\AbstractExpress->_initCheckout()
#1 /html/magento2/vendor/magento/module-paypal/Controller/Express/GetToken.php(52): Magento\Paypal\Controller\Express\GetToken->getToken()
#2 /html/magento2/vendor/magento/framework/App/Action/Action.php(102): Magento\Paypal\Controller\Express\GetToken->execute()
#3 /html/magento2/vendor/magento/framework/Interception/Interceptor.php(74): Magento\Framework\App\Action\Action->dispatch(Object(Magento\Framework\App\Request\Http))
#4 /html/magento2/vendor/magento/framework/Interception/Chain/Chain.php(70): Magento\Paypal\Controller\Express\GetToken\Interceptor->___callParent('dispatch', Array)
#5 /html/magento2/vendor/magento/framework/Interception/Chain/Chain.php(63): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\Paypal\...', 'dispatch', Object(Magento\Paypal\Controller\Express\GetToken\Interceptor), Array, 'contextPlugin')
#6 /html/magento2/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))
#7 /html/magento2/vendor/magento/framework/Interception/Chain/Chain.php(67): Magento\Store\App\Action\Plugin\Context->aroundDispatch(Object(Magento\Paypal\Controller\Express\GetToken\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#8 /html/magento2/vendor/magento/framework/Interception/Chain/Chain.php(63): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\Paypal\...', 'dispatch', Object(Magento\Paypal\Controller\Express\GetToken\Interceptor), Array, 'customer-app-ac...')
#9 /html/magento2/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))
#10 /html/magento2/vendor/magento/framework/Interception/Chain/Chain.php(67): Magento\Customer\Model\App\Action\ContextPlugin->aroundDispatch(Object(Magento\Paypal\Controller\Express\GetToken\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#11 /html/magento2/vendor/magento/framework/Interception/Chain/Chain.php(63): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\Paypal\...', 'dispatch', Object(Magento\Paypal\Controller\Express\GetToken\Interceptor), Array, 'storeCheck')
#12 /html/magento2/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))
#13 /html/magento2/vendor/magento/framework/Interception/Chain/Chain.php(67): Magento\Store\App\Action\Plugin\StoreCheck->aroundDispatch(Object(Magento\Paypal\Controller\Express\GetToken\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#14 /html/magento2/vendor/magento/framework/Interception/Chain/Chain.php(63): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\Paypal\...', 'dispatch', Object(Magento\Paypal\Controller\Express\GetToken\Interceptor), Array, 'weee-app-action...')
#15 /html/magento2/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))
#16 /html/magento2/vendor/magento/framework/Interception/Chain/Chain.php(67): Magento\Weee\Model\App\Action\ContextPlugin->aroundDispatch(Object(Magento\Paypal\Controller\Express\GetToken\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#17 /html/magento2/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\Paypal\...', 'dispatch', Object(Magento\Paypal\Controller\Express\GetToken\Interceptor), Array, 'tax-app-action-...')
#18 /html/magento2/vendor/magento/module-tax/Model/App/Action/ContextPlugin.php(91): Magento\Paypal\Controller\Express\GetToken\Interceptor->Magento\Framework\Interception{closure}(Object(Magento\Framework\App\Request\Http))
#19 /html/magento2/vendor/magento/framework/Interception/Interceptor.php(142): Magento\Tax\Model\App\Action\ContextPlugin->aroundDispatch(Object(Magento\Paypal\Controller\Express\GetToken\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#20 /html/magento2/var/generation/Magento/Paypal/Controller/Express/GetToken/Interceptor.php(26): Magento\Paypal\Controller\Express\GetToken\Interceptor->___callPlugins('dispatch', Array, Array)
#21 /html/magento2/vendor/magento/framework/App/FrontController.php(55): Magento\Paypal\Controller\Express\GetToken\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))
#22 /html/magento2/vendor/magento/framework/Interception/Interceptor.php(74): Magento\Framework\App\FrontController->dispatch(Object(Magento\Framework\App\Request\Http))
#23 /html/magento2/vendor/magento/framework/Interception/Chain/Chain.php(70): Magento\Framework\App\FrontController\Interceptor->___callParent('dispatch', Array)
#24 /html/magento2/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...')
#25 /html/magento2/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))
#26 /html/magento2/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))
#27 /html/magento2/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')
#28 /html/magento2/vendor/magento/framework/Module/Plugin/DbStatusValidator.php(69): Magento\Framework\Interception\Chain\Chain->Magento\Framework\Interception\Chain{closure}(Object(Magento\Framework\App\Request\Http))
#29 /html/magento2/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))
#30 /html/magento2/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...')
#31 /html/magento2/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))
#32 /html/magento2/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))
#33 /html/magento2/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...')
#34 /html/magento2/vendor/magento/module-page-cache/Model/App/FrontController/BuiltinPlugin.php(73): Magento\Framework\Interception\Chain\Chain->Magento\Framework\Interception\Chain{closure}(Object(Magento\Framework\App\Request\Http))
#35 /html/magento2/vendor/magento/framework/Interception/Chain/Chain.php(67): Magento\PageCache\Model\App\FrontController\BuiltinPlugin->aroundDispatch(Object(Magento\Framework\App\FrontController\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#36 /html/magento2/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\Framewo...', 'dispatch', Object(Magento\Framework\App\FrontController\Interceptor), Array, 'infortis_cgen_m...')
#37 /html/magento2/app/code/Infortis/Cgen/Plugin/Magento/Framework/App/FrontController.php(32): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception{closure}(Object(Magento\Framework\App\Request\Http))
#38 /html/magento2/vendor/magento/framework/Interception/Interceptor.php(142): Infortis\Cgen\Plugin\Magento\Framework\App\FrontController->aroundDispatch(Object(Magento\Framework\App\FrontController\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#39 /html/magento2/var/generation/Magento/Framework/App/FrontController/Interceptor.php(26): Magento\Framework\App\FrontController\Interceptor->___callPlugins('dispatch', Array, Array)
#40 /html/magento2/vendor/magento/framework/App/Http.php(135): Magento\Framework\App\FrontController\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))
#41 /html/magento2/vendor/magento/framework/App/Bootstrap.php(258): Magento\Framework\App\Http->launch()
#42 /html/magento2/index.php(39): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http))
#43 {main} [] []

@Smilefounder
Copy link

Same issue with 2.2.6

@innoppl-developers
Copy link

Magento version 2.2.3
Disabling CSS merge and minify fixed the issue.

@ladle3000
Copy link

I'm facing this and testing disabling merge and minify css on 2.3

@ladle3000
Copy link

ok my issue was sorted out. First turn off the minify of CSS, JS and HTML and also if you are using any cache platform like cloudflare or any other do the same in them too turn off minify of CSS, JS and HTML from cloudflare too and then clear magento and cloudflare full cache and check.

@terrybakshi I'm using sucuri, not sure sure they have a way to disable minfy and merge though. I've disabled on my magento and will see if it helps.

@jammy-git
Copy link

I experience this problem on 2.3.2. Insane that is still an issue after more than 2 years.

@ladle3000
Copy link

@jammy-git What all extensions do you use. Maybe it will be useful for us to compare notes and environment, since there don't seem to be any solid answers coming

@jammy-git
Copy link

Found a couple of similar issues on StackOverflow that pointed me in the right direction.

This is a multi-store that has been migrated from M1 (using the Uberthemes Migration Pro module if that matters). At some point the data contained in sales_sequence_meta has fallen out of sync with the store_ids that exist. This meant that when the store was creating an order, it would try to insert data into a table that didn't exist.

The fix was to go to Admin > Stores > Settings - All Stores. Then click on the Web Site, Store and Store View and save each in turn for the store that you're trying to place the order on.

I imagine the issue reported here though could be caused by several different root causes, so YMMV.

@ladle3000
Copy link

@jammy-git my site is also migrated from M1 and was at one point multistore. Can you please elaborate what you mean by "save each in turn"?

@jammy-git
Copy link

Literally just go click into the Web Site (to edit it), change nothing but click Save. This will then run through the code to generate the correct data in the database tables for that store. Then click into the Store to edit it, click save, then do the same for the Store View.

@ladle3000
Copy link

ladle3000 commented Sep 4, 2019 via email

@stijnkuppens
Copy link

stijnkuppens commented Mar 13, 2020

After searching I found the problem that was happening with our store.
Check in the table 'sales_sequence_meta'.
There is a listing of table names that magento is using. In our case the tables for store_id 2 were missing. I added these as following:

|meta_id|entity_type|store_id|sequence_table
{increment_id}|order|2|sequence_order_2
{increment_id}|invoice|2|sequence_invoice_2
{increment_id}|creditmemo|2|sequence_creditmemo_2
{increment_id}|shipment|2|sequence_shipment_2
{increment_id}|rma_item|2|sequence_rma_item_2

Make sure the sequence_tables exist in the database. Create them if needed.

After that make sure these changes are also applied in the 'sales_sequence_profile' table.
There add the meta_id for the new ones you added previously:

|profile_id|meta_id|prefix|suffix|start_value|step|max_value|warning_value|is_active|
{increment}|{meta_id}|2|NULL|1|1|4294967295|4294967295|1

After these changes paypal worked as expected on the store with id 2.

@JMLucas96
Copy link

After searching I found the problem that was happening with our store.
Check in the table 'sales_sequence_meta'.
There is a listing of table names that magento is using. In our case the tables for store_id 2 were missing. I added these as following:

|meta_id|entity_type|store_id|sequence_table
{increment_id}|order|2|sequence_order_2
{increment_id}|invoice|2|sequence_invoice_2
{increment_id}|creditmemo|2|sequence_creditmemo_2
{increment_id}|shipment|2|sequence_shipment_2
{increment_id}|rma_item|2|sequence_rma_item_2

Make sure the sequence_tables exist in the database. Create them if needed.

After that make sure these changes are also applied in the 'sales_sequence_profile' table.
There add the meta_id for the new ones you added previously:

|profile_id|meta_id|prefix|suffix|start_value|step|max_value|warning_value|is_active|
{increment}|{meta_id}|2|NULL|1|1|4294967295|4294967295|1

After these changes paypal worked as expected on the store with id 2.

I already have this values on the database but error still exist...
Magento 2.1.8

@aurel5542
Copy link

Hello, why is this closed? I still have this issue on 2.3.6-p2 several times a week

@goldcattle
Copy link

goldcattle commented Jun 3, 2021 via email

@davinanaya
Copy link

After searching I found the problem that was happening with our store. Check in the table 'sales_sequence_meta'. There is a listing of table names that magento is using. In our case the tables for store_id 2 were missing. I added these as following:

|meta_id|entity_type|store_id|sequence_table
{increment_id}|order|2|sequence_order_2
{increment_id}|invoice|2|sequence_invoice_2
{increment_id}|creditmemo|2|sequence_creditmemo_2
{increment_id}|shipment|2|sequence_shipment_2
{increment_id}|rma_item|2|sequence_rma_item_2

Make sure the sequence_tables exist in the database. Create them if needed.

After that make sure these changes are also applied in the 'sales_sequence_profile' table. There add the meta_id for the new ones you added previously:

|profile_id|meta_id|prefix|suffix|start_value|step|max_value|warning_value|is_active|
{increment}|{meta_id}|2|NULL|1|1|4294967295|4294967295|1

After these changes paypal worked as expected on the store with id 2.

that worked, thanks so much

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug report Component: Payment Issue: Cannot Reproduce Cannot reproduce the issue on the latest `2.4-develop` branch Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development
Projects
None yet
Development

No branches or pull requests