3

I am on Magento 2.2. When I click on proceed with checkout, the checkout page opens (where it asks for address) but the checkout-loader jig keeps on spinning. I get below error on console:

console-output-handler.js:34 [2018-03-26 02:15:40] [ERROR] Failed to load the "Magento_Checkout/js/view/payment" component.

Could you please suggest? FYI, I have already tried cache cleans, redeploying static content etc but that didn't help either.

I have already tried the solution posted on below link but it did not help. Magento 2.2.1 Checkout page broken and Js fail to load error

  • Please roll back your last changes, if checkout works, Then the problem is in your last changes. – Sujeet Pandit Mar 26 '18 at 9:25
  • This is the first thing that I tried. It didn't work. Weird thing is, it used to work before. So I am guessing it is more of my setup/environment issue rather than code issue. – Sanjay Kumar Mar 27 '18 at 15:17
2

Another reason this could happen is the checkoutConfig array in javascript is empty. Check the value of checkoutConfig in the browser console. If its an empty array, json_encode returned false on the backend.

In my case it was probably because of some non-utf8 friendly character in there somewhere. I ended up uploading the database again and it worked.

Edit: This was acknowledged by Magento https://github.com/magento/magento2/issues/17934

Seems to be an issue with different crypt keys, which can malform encrypted data and prevent json_encode from being able to parse non-utf8 characters.

  • Using the correct encryption key in env.php did the trick for me. Thanks! – Cypher909 Jul 2 at 20:10
1

I have faced same issue on cart and checkout page, In console it shows me "Failed to load the component" error. I have research more about this and check with disable all third party modules and theme but no luck.

enter image description here

So, I have checked with comment out app/etc/env.php to env_bck.php file and run URL from browser address bar. I have check "Readiness Check" and found some PHP extension is missing.

enter image description here

I hvae installed missing PHP extension and checked site it is working fine.

This solution might be help.

Thanks.

0

If you get this error when logged in as a customer:

I have had the same issue. This was caused (in my case) by edits made to the checkout pages, settings, layouts etc. Why this made my checkout from stopping to work, is still something that keeps me wondering. What fixed this for me was creating a new user when I was done editing the checkout pages and settings.

  • Thanks for the suggestion. I am actually not overriding the default checkout module. I tried adding a new user but the issue still persists. – Sanjay Kumar Mar 26 '18 at 9:08
  • Try removing the front end folder from the static folder in /pub/static. After that run bin/magento setup:static-content:deploy -f. – Condor Mar 26 '18 at 9:13
  • Hi, I tried removing these folders manually but it didn't help. :( – Sanjay Kumar Mar 26 '18 at 11:58
  • Hmmm well my guesses are lost then. Check this page github.com/magento/magento2/issues/12679 , maybe you have some luck finding a solution there. – Condor Mar 26 '18 at 12:27

Your Answer

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

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