Magento2: PayPal Express Checkout: We can't initialize Express Checkout.

Created on 3 May 2017  Â·  50Comments  Â·  Source: magento/magento2


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} [] []

Payment Cannot Reproduce Clear Description Format is valid Ready for Work bug report

Most helpful comment

Same issue with 2.2.6

All 50 comments

Hello @bbtimx,

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

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?

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'. [] []

on 2.1.7 we still see this issue.

on 2.1.3, i am facing same issue

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/

I have the same error. I am using 2.0.15 version

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()

.

Hi, was this issue fixed?
Thanks

No
On Sat, Sep 9, 2017 at 1:52 PM Max Pronko notifications@github.com wrote:

Hi, was this issue fixed?
Thanks

—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/magento/magento2/issues/9497#issuecomment-328302776,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ADPLasT2coginMBXDka-6ggsdebgKrcQks5sgvqhgaJpZM4NPnxj
.

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

Same issue here in 2.1.6

Similar issue with our site... still saw it in 2.1.8 and also think we still have it in 2.1.9 It is intermittent for our site though doesn't happen every single order.

Still a issue in Magento 2.1.8 very critical, happens randomly on orders.
Any work around or a fix available ?. as we are losing sales and won't even show as a pending order on the backend.

[2017-10-05 09:42:07] main.CRITICAL: Exception message: We can't initialize Express Checkout.
[2017-10-03 09:27:02] main.CRITICAL: Exception message: We can't initialize Express Checkout.
[2017-10-02 13:02:54] main.CRITICAL: Exception message: PayPal Express Checkout Token does not exist.
[2017-09-29 15:00:44] main.CRITICAL: Exception message: We can't initialize Express Checkout.
[2017-09-29 08:38:31] main.CRITICAL: Exception message: We can't initialize Express Checkout.

Is this Issue fixed? or any update?.
losing a lot of sales - happening very frequently any quick workaround to eliminate this issue?.

Our engineers have not been able to reproduce using the steps listed in the original post. Does anyone have any additional steps that will help us better reproduce the issue? Maybe something out of the ordinary in the PP configuration settings?

paypal4

paypal3

paypal2
Hi @misha-kotov

It is not visible for us on front end but we can see it on the logs.
We had customers complaining that placing order on choosing paypal, does not take them to paypal payment page and just stays on the checkout without any notification.
Sometimes on choosing paypal, click on place order redirects them to login page. This was the feedback, when checked on the logs above mentioned are the errors were shown.

See below screenshots for our paypal setup on 2.1.8:
paypal1

we even had the same issue yesterday see log below:
[2017-10-12 05:52:09] main.CRITICAL: Exception message: We can't initialize Express Checkout.
Trace: #0 /var/www/vhosts/magento2.1.8/httpdocs/vendor/magento/module-paypal/Controller/Express/AbstractExpress/ReturnAction.php(31): Magento\Paypal\Controller\Express\AbstractExpress->_initCheckout()

1 /var/www/vhosts/magento2.1.8/httpdocs/var/generation/Magento/Paypal/Controller/Express/ReturnAction/Interceptor.php(24): Magento\Paypal\Controller\Express\AbstractExpress\ReturnAction->execute()

2 /var/www/vhosts/magento2.1.8/httpdocs/vendor/magento/framework/App/Action/Action.php(102): Magento\Paypal\Controller\Express\ReturnAction\Interceptor->execute()

3 /var/www/vhosts/magento2.1.8/httpdocs/vendor/magento/framework/Interception/Interceptor.php(74): Magento\Framework\App\Action\Action->dispatch(Object(Magento\Framework\App\Request\Http))

4 /var/www/vhosts/magento2.1.8/httpdocs/vendor/magento/framework/Interception/Chain/Chain.php(70): Magento\Paypal\Controller\Express\ReturnAction\Interceptor->___callParent('dispatch', Array)

5 /var/www/vhosts/magento2.1.8/httpdocs/vendor/magento/framework/Interception/Chain/Chain.php(63): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\Paypal\...', 'dispatch', Object(Magento\Paypal\Controller\Ex$

6 /var/www/vhosts/magento2.1.8/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$

7 /var/www/vhosts/magento2.1.8/httpdocs/vendor/magento/framework/Interception/Chain/Chain.php(67): Magento\Store\App\Action\Plugin\Context->aroundDispatch(Object(Magento\Paypal\Controller\Express\ReturnAction\Interceptor), Ob$

8 /var/www/vhosts/magento2.1.8/httpdocs/vendor/magento/framework/Interception/Chain/Chain.php(63): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\Paypal\...', 'dispatch', Object(Magento\Paypal\Controller\Ex$

9 /var/www/vhosts/magento2.1.8/httpdocs/vendor/magento/module-customer/Model/App/Action/ContextPlugin.php(61): Magento\Framework\Interception\Chain\Chain->Magento\Framework\Interception\Chain{closure}(Object(Magento\Framewor$

10 /var/www/vhosts/magento2.1.8/httpdocs/vendor/magento/framework/Interception/Chain/Chain.php(67): Magento\Customer\Model\App\Action\ContextPlugin->aroundDispatch(Object(Magento\Paypal\Controller\Express\ReturnAction\Interce$

11 /var/www/vhosts/magento2.1.8/httpdocs/vendor/magento/framework/Interception/Chain/Chain.php(63): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\Paypal\...', 'dispatch', Object(Magento\Paypal\Controller\E$

12 /var/www/vhosts/magento2.1.8/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$

13 /var/www/vhosts/magento2.1.8/httpdocs/vendor/magento/framework/Interception/Chain/Chain.php(67): Magento\Store\App\Action\Plugin\StoreCheck->aroundDispatch(Object(Magento\Paypal\Controller\Express\ReturnAction\Interceptor)$

14 /var/www/vhosts/magento2.1.8/httpdocs/vendor/magento/framework/Interception/Chain/Chain.php(63): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\Paypal\...', 'dispatch', Object(Magento\Paypal\Controller\E$

15 /var/www/vhosts/magento2.1.8/httpdocs/vendor/magento/module-weee/Model/App/Action/ContextPlugin.php(112): Magento\Framework\Interception\Chain\Chain->Magento\Framework\Interception\Chain{closure}(Object(Magento\Framework\$

16 /var/www/vhosts/magento2.1.8/httpdocs/vendor/magento/framework/Interception/Chain/Chain.php(67): Magento\Weee\Model\App\Action\ContextPlugin->aroundDispatch(Object(Magento\Paypal\Controller\Express\ReturnAction\Interceptor$

17 /var/www/vhosts/magento2.1.8/httpdocs/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\Paypal\...', 'dispatch', Object(Magento\Paypal\Controller\$

18 /var/www/vhosts/magento2.1.8/httpdocs/vendor/magento/module-tax/Model/App/Action/ContextPlugin.php(91): Magento\Paypal\Controller\Express\ReturnAction\Interceptor->Magento\Framework\Interception{closure}(Object(Magento\Fr$

19 /var/www/vhosts/magento2.1.8/httpdocs/vendor/magento/framework/Interception/Interceptor.php(142): Magento\Tax\Model\App\Action\ContextPlugin->aroundDispatch(Object(Magento\Paypal\Controller\Express\ReturnAction\Interceptor$

20 /var/www/vhosts/magento2.1.8/httpdocs/var/generation/Magento/Paypal/Controller/Express/ReturnAction/Interceptor.php(104): Magento\Paypal\Controller\Express\ReturnAction\Interceptor->___callPlugins('dispatch', Array, Array)

21 /var/www/vhosts/magento2.1.8/httpdocs/vendor/magento/framework/App/FrontController.php(55): Magento\Paypal\Controller\Express\ReturnAction\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))

22 /var/www/vhosts/magento2.1.8/httpdocs/vendor/magento/framework/Interception/Interceptor.php(74): Magento\Framework\App\FrontController->dispatch(Object(Magento\Framework\App\Request\Http))

23 /var/www/vhosts/magento2.1.8/httpdocs/vendor/magento/framework/Interception/Chain/Chain.php(70): Magento\Framework\App\FrontController\Interceptor->___callParent('dispatch', Array)

24 /var/www/vhosts/magento2.1.8/httpdocs/vendor/magento/framework/Interception/Chain/Chain.php(63): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\Framewo...', 'dispatch', Object(Magento\Framework\App\FrontC$

25 /var/www/vhosts/magento2.1.8/httpdocs/vendor/magento/module-store/App/FrontController/Plugin/RequestPreprocessor.php(94): Magento\Framework\Interception\Chain\Chain->Magento\Framework\Interception\Chain{closure}(Object(Ma$

26 /var/www/vhosts/magento2.1.8/httpdocs/vendor/magento/framework/Interception/Chain/Chain.php(67): Magento\Store\App\FrontController\Plugin\RequestPreprocessor->aroundDispatch(Object(Magento\Framework\App\FrontController\Int$

27 /var/www/vhosts/magento2.1.8/httpdocs/vendor/magento/framework/Interception/Chain/Chain.php(63): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\Framewo...', 'dispatch', Object(Magento\Framework\App\FrontC$

28 /var/www/vhosts/magento2.1.8/httpdocs/vendor/magento/framework/Module/Plugin/DbStatusValidator.php(69): Magento\Framework\Interception\Chain\Chain->Magento\Framework\Interception\Chain{closure}(Object(Magento\Framework\Ap$

29 /var/www/vhosts/magento2.1.8/httpdocs/vendor/magento/framework/Interception/Chain/Chain.php(67): Magento\Framework\Module\Plugin\DbStatusValidator->aroundDispatch(Object(Magento\Framework\App\FrontController\Interceptor), $

30 /var/www/vhosts/magento2.1.8/httpdocs/vendor/magento/framework/Interception/Chain/Chain.php(63): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\Framewo...', 'dispatch', Object(Magento\Framework\App\FrontC$

31 /var/www/vhosts/magento2.1.8/httpdocs/vendor/magento/module-page-cache/Model/App/FrontController/VarnishPlugin.php(55): Magento\Framework\Interception\Chain\Chain->Magento\Framework\Interception\Chain{closure}(Object(Mage$

32 /var/www/vhosts/magento2.1.8/httpdocs/vendor/magento/framework/Interception/Chain/Chain.php(67): Magento\PageCache\Model\App\FrontController\VarnishPlugin->aroundDispatch(Object(Magento\Framework\App\FrontController\Interc$

33 /var/www/vhosts/magento2.1.8/httpdocs/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\Framewo...', 'dispatch', Object(Magento\Framework\App\Front$

34 /var/www/vhosts/magento2.1.8/httpdocs/vendor/magento/module-page-cache/Model/App/FrontController/BuiltinPlugin.php(73): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception{closure}(Object(Mag$

35 /var/www/vhosts/magento2.1.8/httpdocs/vendor/magento/framework/Interception/Interceptor.php(142): Magento\PageCache\Model\App\FrontController\BuiltinPlugin->aroundDispatch(Object(Magento\Framework\App\FrontController\Inter$

36 /var/www/vhosts/magento2.1.8/httpdocs/var/generation/Magento/Framework/App/FrontController/Interceptor.php(26): Magento\Framework\App\FrontController\Interceptor->___callPlugins('dispatch', Array, Array)

37 /var/www/vhosts/magento2.1.8/httpdocs/vendor/magento/framework/App/Http.php(135): Magento\Framework\App\FrontController\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))

38 /var/www/vhosts/magento2.1.8/httpdocs/vendor/magento/framework/Interception/Interceptor.php(146): Magento\Framework\App\Http->launch()

39 /var/www/vhosts/magento2.1.8/httpdocs/var/generation/Magento/Framework/App/Http/Interceptor.php(26): Magento\Framework\App\Http\Interceptor->___callPlugins('launch', Array, Array)

40 /var/www/vhosts/magento2.1.8/httpdocs/vendor/magento/framework/App/Bootstrap.php(258): Magento\Framework\App\Http\Interceptor->launch()

41 /var/www/vhosts/magento2.1.8/httpdocs/index.php(39): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http\Interceptor))

42 {main} [] []


Trace: #0 /var/www/vhosts/magento2.1.8/httpdocs/vendor/magento/module-paypal/Controller/Express/AbstractExpress/Review.php(21): Magento\Paypal\Controller\Express\AbstractExpress->_initCheckout()

1 /var/www/vhosts/magento2.1.8/httpdocs/var/generation/Magento/Paypal/Controller/Express/Review/Interceptor.php(24): Magento\Paypal\Controller\Express\AbstractExpress\Review->execute()

2 /var/www/vhosts/magento2.1.8/httpdocs/vendor/magento/framework/App/Action/Action.php(102): Magento\Paypal\Controller\Express\Review\Interceptor->execute()

3 /var/www/vhosts/magento2.1.8/httpdocs/vendor/magento/framework/Interception/Interceptor.php(74): Magento\Framework\App\Action\Action->dispatch(Object(Magento\Framework\App\Request\Http))

4 /var/www/vhosts/magento2.1.8/httpdocs/vendor/magento/framework/Interception/Chain/Chain.php(70): Magento\Paypal\Controller\Express\Review\Interceptor->___callParent('dispatch', Array)

5 /var/www/vhosts/magento2.1.8/httpdocs/vendor/magento/framework/Interception/Chain/Chain.php(63): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\Paypal\...', 'dispatch', Object(Magento\Paypal\Controller\Ex$

6 /var/www/vhosts/magento2.1.8/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$

7 /var/www/vhosts/magento2.1.8/httpdocs/vendor/magento/framework/Interception/Chain/Chain.php(67): Magento\Store\App\Action\Plugin\Context->aroundDispatch(Object(Magento\Paypal\Controller\Express\Review\Interceptor), Object(C$

8 /var/www/vhosts/magento2.1.8/httpdocs/vendor/magento/framework/Interception/Chain/Chain.php(63): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\Paypal\...', 'dispatch', Object(Magento\Paypal\Controller\Ex$

9 /var/www/vhosts/magento2.1.8/httpdocs/vendor/magento/module-customer/Model/App/Action/ContextPlugin.php(61): Magento\Framework\Interception\Chain\Chain->Magento\Framework\Interception\Chain{closure}(Object(Magento\Framewor$

10 /var/www/vhosts/magento2.1.8/httpdocs/vendor/magento/framework/Interception/Chain/Chain.php(67): Magento\Customer\Model\App\Action\ContextPlugin->aroundDispatch(Object(Magento\Paypal\Controller\Express\Review\Interceptor),$

11 /var/www/vhosts/magento2.1.8/httpdocs/vendor/magento/framework/Interception/Chain/Chain.php(63): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\Paypal\...', 'dispatch', Object(Magento\Paypal\Controller\E$

12 /var/www/vhosts/magento2.1.8/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$

13 /var/www/vhosts/magento2.1.8/httpdocs/vendor/magento/framework/Interception/Chain/Chain.php(67): Magento\Store\App\Action\Plugin\StoreCheck->aroundDispatch(Object(Magento\Paypal\Controller\Express\Review\Interceptor), Obje$

14 /var/www/vhosts/magento2.1.8/httpdocs/vendor/magento/framework/Interception/Chain/Chain.php(63): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\Paypal\...', 'dispatch', Object(Magento\Paypal\Controller\E$

15 /var/www/vhosts/magento2.1.8/httpdocs/vendor/magento/module-weee/Model/App/Action/ContextPlugin.php(112): Magento\Framework\Interception\Chain\Chain->Magento\Framework\Interception\Chain{closure}(Object(Magento\Framework\$

16 /var/www/vhosts/magento2.1.8/httpdocs/vendor/magento/framework/Interception/Chain/Chain.php(67): Magento\Weee\Model\App\Action\ContextPlugin->aroundDispatch(Object(Magento\Paypal\Controller\Express\Review\Interceptor), Obj$

17 /var/www/vhosts/magento2.1.8/httpdocs/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\Paypal\...', 'dispatch', Object(Magento\Paypal\Controller\$

18 /var/www/vhosts/magento2.1.8/httpdocs/vendor/magento/module-tax/Model/App/Action/ContextPlugin.php(91): Magento\Paypal\Controller\Express\Review\Interceptor->Magento\Framework\Interception{closure}(Object(Magento\Framewor$

19 /var/www/vhosts/magento2.1.8/httpdocs/vendor/magento/framework/Interception/Interceptor.php(142): Magento\Tax\Model\App\Action\ContextPlugin->aroundDispatch(Object(Magento\Paypal\Controller\Express\Review\Interceptor), Obj$

20 /var/www/vhosts/magento2.1.8/httpdocs/var/generation/Magento/Paypal/Controller/Express/Review/Interceptor.php(104): Magento\Paypal\Controller\Express\Review\Interceptor->___callPlugins('dispatch', Array, Array)

21 /var/www/vhosts/magento2.1.8/httpdocs/vendor/magento/framework/App/FrontController.php(55): Magento\Paypal\Controller\Express\Review\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))

22 /var/www/vhosts/magento2.1.8/httpdocs/vendor/magento/framework/Interception/Interceptor.php(74): Magento\Framework\App\FrontController->dispatch(Object(Magento\Framework\App\Request\Http))

23 /var/www/vhosts/magento2.1.8/httpdocs/vendor/magento/framework/Interception/Chain/Chain.php(70): Magento\Framework\App\FrontController\Interceptor->___callParent('dispatch', Array)

24 /var/www/vhosts/magento2.1.8/httpdocs/vendor/magento/framework/Interception/Chain/Chain.php(63): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\Framewo...', 'dispatch', Object(Magento\Framework\App\FrontC$

25 /var/www/vhosts/magento2.1.8/httpdocs/vendor/magento/module-store/App/FrontController/Plugin/RequestPreprocessor.php(94): Magento\Framework\Interception\Chain\Chain->Magento\Framework\Interception\Chain{closure}(Object(Ma$

26 /var/www/vhosts/magento2.1.8/httpdocs/vendor/magento/framework/Interception/Chain/Chain.php(67): Magento\Store\App\FrontController\Plugin\RequestPreprocessor->aroundDispatch(Object(Magento\Framework\App\FrontController\Int$

27 /var/www/vhosts/magento2.1.8/httpdocs/vendor/magento/framework/Interception/Chain/Chain.php(63): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\Framewo...', 'dispatch', Object(Magento\Framework\App\FrontC$

28 /var/www/vhosts/magento2.1.8/httpdocs/vendor/magento/framework/Module/Plugin/DbStatusValidator.php(69): Magento\Framework\Interception\Chain\Chain->Magento\Framework\Interception\Chain{closure}(Object(Magento\Framework\Ap$

29 /var/www/vhosts/magento2.1.8/httpdocs/vendor/magento/framework/Interception/Chain/Chain.php(67): Magento\Framework\Module\Plugin\DbStatusValidator->aroundDispatch(Object(Magento\Framework\App\FrontController\Interceptor), $

30 /var/www/vhosts/magento2.1.8/httpdocs/vendor/magento/framework/Interception/Chain/Chain.php(63): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\Framewo...', 'dispatch', Object(Magento\Framework\App\FrontC$

31 /var/www/vhosts/magento2.1.8/httpdocs/vendor/magento/module-page-cache/Model/App/FrontController/VarnishPlugin.php(55): Magento\Framework\Interception\Chain\Chain->Magento\Framework\Interception\Chain{closure}(Object(Mage$

32 /var/www/vhosts/magento2.1.8/httpdocs/vendor/magento/framework/Interception/Chain/Chain.php(67): Magento\PageCache\Model\App\FrontController\VarnishPlugin->aroundDispatch(Object(Magento\Framework\App\FrontController\Interc$

33 /var/www/vhosts/magento2.1.8/httpdocs/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\Framewo...', 'dispatch', Object(Magento\Framework\App\Front$

34 /var/www/vhosts/magento2.1.8/httpdocs/vendor/magento/module-page-cache/Model/App/FrontController/BuiltinPlugin.php(73): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception{closure}(Object(Mag$

35 /var/www/vhosts/magento2.1.8/httpdocs/vendor/magento/framework/Interception/Interceptor.php(142): Magento\PageCache\Model\App\FrontController\BuiltinPlugin->aroundDispatch(Object(Magento\Framework\App\FrontController\Inter$

36 /var/www/vhosts/magento2.1.8/httpdocs/var/generation/Magento/Framework/App/FrontController/Interceptor.php(26): Magento\Framework\App\FrontController\Interceptor->___callPlugins('dispatch', Array, Array)

37 /var/www/vhosts/magento2.1.8/httpdocs/vendor/magento/framework/App/Http.php(135): Magento\Framework\App\FrontController\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))

38 /var/www/vhosts/magento2.1.8/httpdocs/vendor/magento/framework/Interception/Interceptor.php(146): Magento\Framework\App\Http->launch()

39 /var/www/vhosts/magento2.1.8/httpdocs/var/generation/Magento/Framework/App/Http/Interceptor.php(26): Magento\Framework\App\Http\Interceptor->___callPlugins('launch', Array, Array)

40 /var/www/vhosts/magento2.1.8/httpdocs/vendor/magento/framework/App/Bootstrap.php(258): Magento\Framework\App\Http\Interceptor->launch()

41 /var/www/vhosts/magento2.1.8/httpdocs/index.php(39): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http\Interceptor))

42 {main} [] []

@bbtimx, thank you for your report.
We were not able to reproduce this issue by following the steps you provided. If you'd like to update it, please reopen the issue.
We tested the issue on 2.3.0-dev, 2.2.0, 2.1.9

INNER JOIN catalog_category_product_index AS cat_index ON cat_index.product_id=e.entity_id AND cat_index.store_id=1 AND cat_index.visibility IN(2, 4) AND cat_index.category_id='2'
INNER JOIN cataloginventory_stock_status AS stock_status_index ON e.entity_id = stock_status_index.product_id AND stock_status_index.website_id = 0 AND stock_status_index.stock_id = 1 WHERE (()) AND (stock_status_index.stock_status = 1) [] []
[2017-12-06 09:44:24] main.CRITICAL: Exception message: We can't initialize checkout.
Trace: #0 /home/samsung/public_html/vendor/magento/module-braintree/Controller/Paypal/Review.php(60): Magento\Braintree\Controller\Paypal\AbstractAction->validateQuote(Object(Magento\Quote\Model\Quote\Interceptor))

1 /home/samsung/public_html/generated/code/Magento/Braintree/Controller/Paypal/Review/Interceptor.php(24): Magento\Braintree\Controller\Paypal\Review->execute()

2 /home/samsung/public_html/vendor/magento/framework/App/Action/Action.php(107): Magento\Braintree\Controller\Paypal\Review\Interceptor->execute()

3 /home/samsung/public_html/vendor/magento/module-braintree/Controller/Paypal/AbstractAction.php(65): Magento\Framework\App\Action\Action->dispatch(Object(Magento\Framework\App\Request\Http))

4 /home/samsung/public_html/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Braintree\Controller\Paypal\AbstractAction->dispatch(Object(Magento\Framework\App\Request\Http))

5 /home/samsung/public_html/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Braintree\Controller\Paypal\Review\Interceptor->___callParent('dispatch', Array)

6 /home/samsung/public_html/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Braintree\Controller\Paypal\Review\Interceptor->Magento\Framework\Interception{closure}(Object(Magento\Framework\App\Request\Http))

7 /home/samsung/public_html/generated/code/Magento/Braintree/Controller/Paypal/Review/Interceptor.php(39): Magento\Braintree\Controller\Paypal\Review\Interceptor->___callPlugins('dispatch', Array, Array)

8 /home/samsung/public_html/vendor/magento/framework/App/FrontController.php(55): Magento\Braintree\Controller\Paypal\Review\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))

9 /home/samsung/public_html/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Framework\App\FrontController->dispatch(Object(Magento\Framework\App\Request\Http))

10 /home/samsung/public_html/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Framework\App\FrontController\Interceptor->___callParent('dispatch', Array)

11 /home/samsung/public_html/vendor/magento/module-store/App/FrontController/Plugin/RequestPreprocessor.php(94): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception{closure}(Object(Magento\Framework\App\Request\Http))

12 /home/samsung/public_html/vendor/magento/framework/Interception/Interceptor.php(135): Magento\Store\App\FrontController\Plugin\RequestPreprocessor->aroundDispatch(Object(Magento\Framework\App\FrontController\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))

13 /home/samsung/public_html/vendor/magento/module-page-cache/Model/App/FrontController/BuiltinPlugin.php(69): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception{closure}(Object(Magento\Framework\App\Request\Http))

14 /home/samsung/public_html/vendor/magento/framework/Interception/Interceptor.php(135): Magento\PageCache\Model\App\FrontController\BuiltinPlugin->aroundDispatch(Object(Magento\Framework\App\FrontController\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))

15 /home/samsung/public_html/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception{closure}(Object(Magento\Framework\App\Request\Http))

16 /home/samsung/public_html/generated/code/Magento/Framework/App/FrontController/Interceptor.php(26): Magento\Framework\App\FrontController\Interceptor->___callPlugins('dispatch', Array, Array)

hi, has this issue been fixed?
any workaround / patch for Magento 2.1.8? I am still facing the issue on 2.1.8

I have the same issue on 2.2.2.
It's impossible to debug because it's just an exception from
vendor\magento\module-paypal\Controller\Express\AbstractExpress.php
in:
if (!$quote->hasItems() || $quote->getHasError()) {
$this->getResponse()->setStatusHeader(403, '1.1', 'Forbidden');
throw new \Magento\Framework\Exception\LocalizedException(__('We can\'t initialize Express Checkout.'));
}

Same issue in Magento 2.2.2

Magento: 2.1.11
PHP: 7.0.28-0ubuntu0.16.04.1
OS: Ubuntu 16.04.4 LTS

Same issues on 2.1.11. From what I can tell this will not happen on all quotes.
This happening on a live site and is quite hard to test.

if (!$quote->hasItems() || $quote->getHasError()) { $this->getResponse()->setStatusHeader(403, '1.1', 'Forbidden'); throw new \Magento\Framework\Exception\LocalizedException(__('We can\'t initialize Express Checkout.')); }

$qoute seems to exist in my case, as I can not see any undefined errors in my PHP error log.
This leaves only two things $quote has no items or $quote has errors. I will add some logging to the Shop.

system.log:18866:[2018-03-19 14:50:41] main.CRITICAL: Exception message: We can't initialize Express Checkout. system.log-18867-Trace: #0 [REMOVED/]vendor/magento/module-paypal/Controller/Express/AbstractExpress/ReturnAction.php(31): Magento\Paypal\Controller\Express\AbstractExpress->_initCheckout() system.log-18868-#1 [REMOVED/]vendor/magento/framework/App/Action/Action.php(102): Magento\Paypal\Controller\Express\AbstractExpress\ReturnAction->execute() system.log-18869-#2 [REMOVED/]vendor/magento/framework/Interception/Interceptor.php(74): Magento\Framework\App\Action\Action->dispatch(Object(Magento\Framework\App\Request\Http)) system.log-18870-#3 [REMOVED/]vendor/magento/framework/Interception/Chain/Chain.php(70): Magento\Paypal\Controller\Express\ReturnAction\Interceptor->___callParent('dispatch', Array) system.log-18871-#4 [REMOVED/]vendor/magento/framework/Interception/Chain/Chain.php(63): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\\Paypal\\...', 'dispatch', Object(Magento\Paypal\Controller\Express\ReturnAction\Interceptor), Array, 'contextPlugin') system.log-18872-#5 [REMOVED/]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)) system.log-18873-#6 [REMOVED/]vendor/magento/framework/Interception/Chain/Chain.php(67): Magento\Store\App\Action\Plugin\Context->aroundDispatch(Object(Magento\Paypal\Controller\Express\ReturnAction\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http)) system.log-18874-#7 [REMOVED/]vendor/magento/framework/Interception/Chain/Chain.php(63): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\\Paypal\\...', 'dispatch', Object(Magento\Paypal\Controller\Express\ReturnAction\Interceptor), Array, 'customer-app-ac...') system.log-18875-#8 [REMOVED/]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)) system.log-18876-#9 [REMOVED/]vendor/magento/framework/Interception/Chain/Chain.php(67): Magento\Customer\Model\App\Action\ContextPlugin->aroundDispatch(Object(Magento\Paypal\Controller\Express\ReturnAction\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http)) system.log-18877-#10 [REMOVED/]vendor/magento/framework/Interception/Chain/Chain.php(63): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\\Paypal\\...', 'dispatch', Object(Magento\Paypal\Controller\Express\ReturnAction\Interceptor), Array, 'storeCheck') system.log-18878-#11 [REMOVED/]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)) system.log-18879-#12 [REMOVED/]vendor/magento/framework/Interception/Chain/Chain.php(67): Magento\Store\App\Action\Plugin\StoreCheck->aroundDispatch(Object(Magento\Paypal\Controller\Express\ReturnAction\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http)) system.log-18880-#13 [REMOVED/]vendor/magento/framework/Interception/Chain/Chain.php(63): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\\Paypal\\...', 'dispatch', Object(Magento\Paypal\Controller\Express\ReturnAction\Interceptor), Array, 'weee-app-action...') system.log-18881-#14 [REMOVED/]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)) system.log-18882-#15 [REMOVED/]vendor/magento/framework/Interception/Chain/Chain.php(67): Magento\Weee\Model\App\Action\ContextPlugin->aroundDispatch(Object(Magento\Paypal\Controller\Express\ReturnAction\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http)) system.log-18883-#16 [REMOVED/]vendor/magento/framework/Interception/Interceptor.php(138): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\\Paypal\\...', 'dispatch', Object(Magento\Paypal\Controller\Express\ReturnAction\Interceptor), Array, 'tax-app-action-...') system.log-18884-#17 [REMOVED/]vendor/magento/module-tax/Model/App/Action/ContextPlugin.php(91): Magento\Paypal\Controller\Express\ReturnAction\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http)) system.log-18885-#18 [REMOVED/]vendor/magento/framework/Interception/Interceptor.php(142): Magento\Tax\Model\App\Action\ContextPlugin->aroundDispatch(Object(Magento\Paypal\Controller\Express\ReturnAction\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http)) system.log-18886-#19 [REMOVED/]var/generation/Magento/Paypal/Controller/Express/ReturnAction/Interceptor.php(26): Magento\Paypal\Controller\Express\ReturnAction\Interceptor->___callPlugins('dispatch', Array, Array) system.log-18887-#20 [REMOVED/]vendor/magento/framework/App/FrontController.php(55): Magento\Paypal\Controller\Express\ReturnAction\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http)) system.log-18888-#21 [REMOVED/]vendor/magento/framework/Interception/Interceptor.php(74): Magento\Framework\App\FrontController->dispatch(Object(Magento\Framework\App\Request\Http)) system.log-18889-#22 [REMOVED/]vendor/magento/framework/Interception/Chain/Chain.php(70): Magento\Framework\App\FrontController\Interceptor->___callParent('dispatch', Array) system.log-18890-#23 [REMOVED/]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...') system.log-18891-#24 [REMOVED/]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)) system.log-18892-#25 [REMOVED/]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)) system.log-18893-#26 [REMOVED/]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') system.log-18894-#27 [REMOVED/]vendor/magento/framework/Module/Plugin/DbStatusValidator.php(69): Magento\Framework\Interception\Chain\Chain->Magento\Framework\Interception\Chain\{closure}(Object(Magento\Framework\App\Request\Http)) system.log-18895-#28 [REMOVED/]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)) system.log-18896-#29 [REMOVED/]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...') system.log-18897-#30 [REMOVED/]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)) system.log-18898-#31 [REMOVED/]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)) system.log-18899-#32 [REMOVED/]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...') system.log-18900-#33 [REMOVED/]vendor/magento/module-page-cache/Model/App/FrontController/BuiltinPlugin.php(69): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http)) system.log-18901-#34 [REMOVED/]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)) system.log-18902-#35 [REMOVED/]var/generation/Magento/Framework/App/FrontController/Interceptor.php(26): Magento\Framework\App\FrontController\Interceptor->___callPlugins('dispatch', Array, Array) system.log-18903-#36 [REMOVED/]vendor/magento/framework/App/Http.php(135): Magento\Framework\App\FrontController\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http)) system.log-18904-#37 [REMOVED/]vendor/magento/framework/App/Bootstrap.php(258): Magento\Framework\App\Http->launch() system.log-18905-#38 [REMOVED/]pub/index.php(37): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http)) system.log-18906-#39 {main} [] []

@magento-engcom-team this needs to be reopen. Multiple people are affected.

Preconditions
Magento Version 2.1.11 Community Version
PayPal Express Checkout Live Mode
Steps to reproduce
Add any product to cart
Go to checkout payment page
Choose PayPal
Click Pay with PayPal
Redirect to empty cart error message: "We can't initialize Express Checkout."

Again: Im unable to come up with the reason as to why this is not happening all the time but I will get back here when I have some more info from logging additional information.

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

@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?.

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.

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.

Same issue in Magento 2.2.3

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

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!

@alamrezoanul I don't have such error

@swayoleg what is your error by the way?

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

at log there is no "sequence_order" error

i said what is your error then?

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.

I am facing same issue in 2.2.5

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.

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} [] []

Same issue with 2.2.6

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

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

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.

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

@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

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.

@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"?

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.

Okay. I did all this, but I did experience can't initialize express
checkout later in the day.

On Tue, Sep 3, 2019, 12:41 PM jammy-git notifications@github.com wrote:

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.

—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/magento/magento2/issues/9497?email_source=notifications&email_token=AASBWJOJRZNBBGNQSXW2TNLQH2HT5A5CNFSM4DJ6PRR2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD5YZ4CA#issuecomment-527539720,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AASBWJILDH5HZKOR5LSDJVDQH2HT5ANCNFSM4DJ6PRRQ
.

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.

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

Was this page helpful?
0 / 5 - 0 ratings