1

When user adds an item(or items) to the cart, it behaves normally. but if user tried to goto either checkot page or basket page after a while, it shows an error page as follows,

Exception #0 (Magento\Framework\Exception\NoSuchEntityException): No such entity with cartId = 
Exception #0 (Magento\Framework\Exception\NoSuchEntityException): No such entity with cartId = 
#0 E:\xampp\htdocs\magento_projects\jestic\vendor\magento\module-quote\Model\QuoteRepository.php(197): Magento\Framework\Exception\NoSuchEntityException::singleField('cartId', NULL)
Exception #0 (Magento\Framework\Exception\NoSuchEntityException): No such entity with cartId = 
#0C:xampp/htdocs/myProject/vendor/magento/module-quote/Model/QuoteRepository.php(197): Magento\Framework\Exception\NoSuchEntityException::singleField('cartId', NULL)
#1C:xampp/htdocs/myProject/vendor/magento/module-quote/Model/QuoteRepository.php(101): Magento\Quote\Model\QuoteRepository->loadQuote('load', 'cartId', NULL, Array)
#2C:xampp/htdocs/myProject/vendor/magento/module-quote/Model/QuoteRepository.php(127): Magento\Quote\Model\QuoteRepository->get(NULL, Array)
#3C:xampp/htdocs/myProject/var/generation/Magento/Quote/Model/QuoteRepository/Interceptor.php(24): Magento\Quote\Model\QuoteRepository->getActive(NULL, Array)
#4C:xampp/htdocs/myProject/vendor/magento/module-quote/Model/Quote/Item/Repository.php(69): Magento\Quote\Model\QuoteRepository\Interceptor->getActive(NULL)
#5C:xampp/htdocs/myProject/vendor/magento/module-checkout/Model/Cart/ImageProvider.php(44): Magento\Quote\Model\Quote\Item\Repository->getList(NULL)
#6C:xampp/htdocs/myProject/vendor/magento/module-checkout/Model/DefaultConfigProvider.php(278): Magento\Checkout\Model\Cart\ImageProvider->getImages(NULL)
#7C:xampp/htdocs/myProject/vendor/magento/framework/Interception/Interceptor.php(146): Magento\Checkout\Model\DefaultConfigProvider->getConfig()
#8C:xampp/htdocs/myProject/var/generation/Magento/Checkout/Model/DefaultConfigProvider/Interceptor.php(26): Magento\Checkout\Model\DefaultConfigProvider\Interceptor->___callPlugins('getConfig', Array, Array)
#9C:xampp/htdocs/myProject/vendor/magento/module-checkout/Model/CompositeConfigProvider.php(32): Magento\Checkout\Model\DefaultConfigProvider\Interceptor->getConfig()
#10C:xampp/htdocs/myProject/vendor/magento/module-checkout/Block/Cart/Shipping.php(54): Magento\Checkout\Model\CompositeConfigProvider->getConfig()

and so on..

This happens when user tries to click on minicart icon before site gets fully loaded. (icon is clickable before site gets fully loaded and it linked to http://localhost/myProject/checkout/cart/)

I think usually there should be some standard web page with error message rather than showing errors like this.

What is wrong here? How can I fix this? please help...

1

A similar issue is reported in Magento's GitHub issues list. This issue is resolved in Magento 2.2 as informed here in this comment.

https://github.com/magento/magento2/issues/6522#issuecomment-334663929

Also, you can verify the commit ID referenced in the above comment. The commit can be seen here - https://github.com/magento/magento2/commit/e93c44e66d256836c18e6a5e7e9f24623f05e25b

If you update your Magento website to it's latest stable release, issue should not occur.

| improve this answer | |
  • Can I redirect user to login page when session time out exceeded? it could be best if I show valid UI to user rather than big error – Joey Dec 14 '17 at 7:59
  • @Joey Does the above answer solve your previous problem ? – N. Karthic Kannan Dec 14 '17 at 8:11
  • Not quite, thing is it may be some problem with my theme, but if so, I can't find it. Now I need to do something like redirecting user to login page when session expired. can you help me with that? – Joey Dec 14 '17 at 9:07
  • @Joey As a general rule, we should not mingle two questions in a single page. If you have more queries, please create a separate question for each of them. – N. Karthic Kannan Dec 14 '17 at 10:25
  • actually it IS my actual question. I needed to know if I can fix this or stop showing this to user – Joey Dec 15 '17 at 5:50
1
+50

Is your development area is set to Developer ? It seems like magento bug as Karthic pointed out. However error reporting like this is common if you set your development to Developer. Try using Production mode and see if error shows then. If so, it's caused by buggy magento component. You may need to either update or manually try to fix the bug yourself.

| improve this answer | |
  • Can I redirect user to login page when session time out exceeded? it could be best if I show valid UI to user rather than big error – Joey Dec 14 '17 at 8:00

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.