magento / magento2

Prior to making any Submission(s), you must sign an Adobe Contributor License Agreement, available here at: https://opensource.adobe.com/cla.html. All Submissions you make to Adobe Inc. and its affiliates, assigns and subsidiaries (collectively “Adobe”) are subject to the terms of the Adobe Contributor License Agreement.
http://www.magento.com
Open Software License 3.0
11.5k stars 9.3k forks source link

No Such Entity With Cart ID #5847

Closed saderra closed 6 years ago

saderra commented 8 years ago

Preconditions

  1. Magento 2.1, upgraded from 2.0.7 Droplet on Digital Ocean

    Steps to reproduce

  1. Add products to cart
  2. Proceed to checkout, using Authorize.net DPM (Verified Settings)
  3. Click Checkout

    Expected result

  1. Transaction processes, order is created

    Actual result

  1. The card is charged, and the response comes back from authorize.net. The charge is verified. However, the error "no such entity with cartid = X" is displayed, and the checkout page remains dimmed with JS spinner.
saderra commented 8 years ago

Is there any status on this?

gewaechshaus commented 8 years ago

@saderra - are you working with a multisite setup?

saderra commented 8 years ago

No, a single store setup. The issue seemed to go away when we ran the Alter database function outlined in several other tickets about checkout not completing.

Jeremy

On Sep 7, 2016, at 4:23 AM, Jan Fervers notifications@github.com wrote:

@saderra https://github.com/saderra - are you working with a multisite setup?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/magento/magento2/issues/5847#issuecomment-245251262, or mute the thread https://github.com/notifications/unsubscribe-auth/AMbuAT1PBGwjubmhaTEY97TpuC4qenDjks5qnp6VgaJpZM4JWw5q.

gewaechshaus commented 8 years ago

Hi Jeremy,

thx!

NiteshKuyate commented 7 years ago

When i am going to edit order then getting an error like below. No such entity with cartId = 458. I have 4 stores in my project. Order edit works fine for 1 store but for another stores it give above error and in db for 1 store it inserts 2 rows, for another 4 rows. I am not getting anything. Working on multi-site setup. Plz help me as soon as possible. Thanks.

broscodo commented 7 years ago

Any update on this?

magemanish commented 7 years ago

I'm facing problem in search by category on product listing page after migration from magento 1.6 to magento2.x. Please help me ASAP.

Getting below errors:-

1 exception(s): Exception #0 (Magento\Framework\Exception\NoSuchEntityException): No such entity with id = 3

Exception #0 (Magento\Framework\Exception\NoSuchEntityException): No such entity with id = 3

0 /home/magento2/public_html/vendor/magento/module-catalog/Model/CategoryRepository.php(141): Magento\Framework\Exception\NoSuchEntityException::singleField('id', '3')

Thanks

vovayatsyuk commented 7 years ago

I have the same error.

Here is a list of requests and responses sent by the browser when I clicked "Place Order":

URL Response
1.guest-carts/..../set-payment-information true
2.authorizenet/directpost_payment/place {"success":true,"authorizenet_directpost":{"fields"...
3.https://test.authorize.net/gateway/transact.dll html with the following script window.location="...authorizenet/directpost_payment/redirect/x_invoice_num/../success/0/controller_action_name/directpost_payment/is_secure/1/
4.authorizenet/directpost_payment/redirect html with following script ... $.when(placeOrderAction({'method': quote.paymentMethod().method}) Template: /app/code/Magento/Payment/view/frontend/templates/transparent/iframe.phtml
5.guest-carts/.../payment-information {"message":"No such entity with %fieldName = %fieldValue","parameters":{"fieldName":"cartId","fieldValue":"88103"}}

Maybe I'm wrong, but It seems that the order was created and the cart was cleared in step 2 and we can't make any additional requests to this cart (step 5).

aliuosio commented 7 years ago

Maybe I'm wrong, but It seems that the order was created and the cart was cleared in step 2 and we can't make any additional requests to this cart (step 5).

It seems to me too. Facing the same problem at the moment. Did you find a solution for the problem?

aeu commented 6 years ago

I am seeing the same error on a Magento 2.1.9 install.

magento-engcom-team commented 6 years ago

Hi @saderra and @aeu Thanks for reporting this issue. Unfortunately, I could not reproduce the issue as you described it on 2.1.10 version. Could you please try to reproduce the issue on 2.1.10 version. May be it was fixed in this version. Thanks

magento-engcom-team commented 6 years ago

@saderra, we are closing this issue due to inactivity. If you'd like to update it, please reopen the issue.

kingavi26 commented 6 years ago

hi Everyone,

I am having the same issue (magento version 2.2.3)

I get ""no such entity with cartid ="

there is nothing after the = sign.

Was anyone able to track down the cause/cure of this? please help

aliuosio commented 6 years ago

@kingavi26 Please describe your enviroment and when the error occurs. Do have and Exception thrown or is it logged in the magento error log? If you have a full exception please copy & paste it here

have you tried updating to version 2.2.4 to see if this a bug maybe closed in the new magento 2 version?

kingavi26 commented 6 years ago

The error occurs when trying to checkout via Autho.net direct post, usingc sandbox or live credentials (doesn't matter). I have not tried updating to 2.2.4 as i am afraid that could bring other issues with it like updates often do, specially since we have many customizations. I am running on PHP 7,

Here is exceptions log related to this error:

[2018-05-05 11:15:06] main.CRITICAL: No such entity with cartId =  {"exception":"[object] (Magento\\Framework\\Exception\\NoSuchEntityException(code: 0): No such entity with cartId =  at /home/emptyvas/2018.emptyvase2/vendor/magento/framework/Exception/NoSuchEntityException.php:49)"} []
[2018-05-05 11:15:52] main.CRITICAL: No such entity with cartId =  {"exception":"[object] (Magento\\Framework\\Exception\\NoSuchEntityException(code: 0): No such entity with cartId =  at /home/emptyvas/2018.emptyvase2/vendor/magento/framework/Exception/NoSuchEntityException.php:49)"} []
[2018-05-05 11:16:54] main.CRITICAL: No such entity with cartId =  {"exception":"[object] (Magento\\Framework\\Exception\\NoSuchEntityException(code: 0): No such entity with cartId =  at /home/emptyvas/2018.emptyvase2/vendor/magento/framework/Exception/NoSuchEntityException.php:49)"} []
[2018-05-05 11:18:43] main.CRITICAL: No such entity with cartId =  {"exception":"[object] (Magento\\Framework\\Exception\\NoSuchEntityException(code: 0): No such entity with cartId =  at /home/emptyvas/2018.emptyvase2/vendor/magento/framework/Exception/NoSuchEntityException.php:49)"} []
[2018-05-05 11:21:15] main.CRITICAL: No such entity with cartId =  {"exception":"[object] (Magento\\Framework\\Exception\\NoSuchEntityException(code: 0): No such entity with cartId =  at /home/emptyvas/2018.emptyvase2/vendor/magento/framework/Exception/NoSuchEntityException.php:49)"} []
[2018-05-05 12:24:11] main.CRITICAL: No such entity with cartId =  {"exception":"[object] (Magento\\Framework\\Exception\\NoSuchEntityException(code: 0): No such entity with cartId =  at /home/emptyvas/2018.emptyvase2/vendor/magento/framework/Exception/NoSuchEntityException.php:49)"} []
[2018-05-05 12:25:29] main.CRITICAL: No such entity with cartId =  {"exception":"[object] (Magento\\Framework\\Exception\\NoSuchEntityException(code: 0): No such entity with cartId =  at /home/emptyvas/2018.emptyvase2/vendor/magento/framework/Exception/NoSuchEntityException.php:49)"} []
[2018-05-05 12:26:31] main.CRITICAL: Please specify a shipping method. {"exception":"[object] (Magento\\Framework\\Exception\\LocalizedException(code: 0): Please specify a shipping method. at /home/emptyvas/2018.emptyvase2/vendor/magento/module-quote/Model/QuoteValidator.php:100)"} []
[2018-05-05 12:33:13] main.CRITICAL: No such entity with cartId =  {"exception":"[object] (Magento\\Framework\\Exception\\NoSuchEntityException(code: 0): No such entity with cartId =  at /home/emptyvas/2018.emptyvase2/vendor/magento/framework/Exception/NoSuchEntityException.php:49)"} []
[2018-05-05 12:36:55] main.CRITICAL: No such entity with cartId =  {"exception":"[object] (Magento\\Framework\\Exception\\NoSuchEntityException(code: 0): No such entity with cartId =  at /home/emptyvas/2018.emptyvase2/vendor/magento/framework/Exception/NoSuchEntityException.php:49)"} []
[2018-05-06 01:59:53] main.CRITICAL: No such entity with cartId =  {"exception":"[object] (Magento\\Framework\\Exception\\NoSuchEntityException(code: 0): No such entity with cartId =  at /home/emptyvas/2018.emptyvase2/vendor/magento/framework/Exception/NoSuchEntityException.php:49)"} []
aliuosio commented 6 years ago

check if a cartId is sent back from the Payment Provider. i think the API called is not sending the CartId back to the shop. Use your network tools of the browser to see what data comes back to the shop.

kingavi26 commented 6 years ago

capture

This is what i see... also is it normal for session id to keep incrementing by 1 over and over?

aliuosio commented 6 years ago

this is not a bug. i think its a configuration or a wrong Implementaion of the module provided by the payment provider. In Screenshot i can not see ann external call. if is uses the POST method you should only see the parameters sent by click on the call on the overview you posted. We should move the discussion to anotther forum like stackoverflow

kingavi26 commented 6 years ago

Ok sure, lets get on stackoverflow

aeu commented 6 years ago

Just a suggestion - can you confirm that PHP SOAP is installed?

kingavi26 commented 6 years ago

FIXED

Im my situation, I ended up installing a 3rd party Auth.net payment module, and that worked. I gave up after 2 weeks of trying to find the cause. This works. Im happy.

magemanish commented 6 years ago

Hi, My issue has been resolved.

Please check table "customer_entity" and check column 'failures_num',first_failure,lock_expires. if not available than create 'failures_num', smallint(6) default 0 first_failure timestamp default NULL lock_expires. imestamp default NULL

after that run reindex command

kingavi26 commented 6 years ago

Thank you very much.

ghost commented 5 years ago

Still an open issue.

Similar or identical github issues for this same error:

https://github.com/magento/magento2/issues/9744

https://github.com/magento/magento2/issues/7299

https://github.com/magento/magento2/issues/1443

https://github.com/magento/magento2/issues/5847

https://github.com/shipperhq/module-shipper/issues/27

https://github.com/magento/magento2/issues/6522

All related, tried every solution on all pages and still have the issue, including @sydekumf solution here: https://github.com/magento/magento2/issues/9744#issuecomment-347831102 this solution https://github.com/magento/magento2/issues/7299#issuecomment-305437174 this solution https://github.com/magento/magento2/issues/7299#issuecomment-327420755 and checked if this solution would apply but it didn't: https://github.com/magento/magento2/issues/5847#issuecomment-402379223

Issue MAGETWO-84524 is tracking it to some degree and still isn't fixed in Magento 2.3

How is this the most popular ecommerce store in the US if it doesn't even have a functioning checkout. This happens for me using authnet directpost regardless of what I do, guest checkout, or new, using stored address, or not. Only the error message will change at times, but it's always one of the error messages given in the links above.

Issue is as described, there is a quote_id in the quote table but it is not active. If I switch it manually to be active then it has duplicate foreign key when trying to replace the order. With active set to 0, get the cartId error.

The only solution anyone seems to say works 100% is buying a 3rd part module to do authorize.net payments which seems absurd, as paypal also doesn't work, citing invoice id errors.

snez commented 5 years ago

The "Clear site data" in Chrome resets everything and fixes the problem. Something seems stuck with the cart. Affects Magento 2.3.

Beowulf891 commented 5 years ago

Also running into this with a single store setup. cartId error every time I try to check out. Persists after upgrading to 2.2.8. Is there any kind of solution for this?

snez commented 5 years ago

@Beowulf891 you can clear the site data from the browser's web inspector, which will delete your session, cookies and reset the cart

Beowulf891 commented 5 years ago

@Beowulf891 you can clear the site data from the browser's web inspector, which will delete your session, cookies and reset the cart

Will that fix it? I get it with brand new browser sessions every time.

snez commented 5 years ago

@Beowulf891 it wont fix it permanently, if you get this with new browser sessions then you are stuck. It fixed it in my case and the issue didn't come back.

Beowulf891 commented 5 years ago

@Beowulf891 it wont fix it permanently, if you get this with new browser sessions then you are stuck. It fixed it in my case and the issue didn't come back.

Unfortunately, that didn't work for me and I need to fix this.

Beowulf891 commented 5 years ago

@Beowulf891 it wont fix it permanently, if you get this with new browser sessions then you are stuck. It fixed it in my case and the issue didn't come back.

I did finally fix it by disabling the Dotdigitalgroup_Email module since the client doesn't use it.

gakonhd commented 5 years ago

@Beowulf891 it wont fix it permanently, if you get this with new browser sessions then you are stuck. It fixed it in my case and the issue didn't come back.

I did finally fix it by disabling the Dotdigitalgroup_Email module since the client doesn't use it.

did you disable it by following these steps https://docs.magento.com/m2/2.2/ee/user_guide/system/web-setup-module-manager.html?Highlight=disable%20module ?

OvalMedia commented 5 years ago

I had the same issue using paypal. Magento 2.2.8 iways paypal plus module multisite setup

It was driving me nuts, every time I confirmed the checkout on the paypal site I ended up in the cart with the message "no such entity with cart id =".

Then I tried different browsers (chrome, internet explorer) and there was no issue. This led me to investigate my firefox addons. It turned out that uMatrix is the trouble maker in my case. Even when disabling it for my particular site it caused the error. Only after completely disabling it in the addons the error went away.

ocadmin81 commented 4 years ago

kingavi26, What is the 3rd party Authorize.net payment module you used? Thanks

mertgokceimam commented 4 years ago

This issue still existing on Magento 2 Enterprise after 3 years of original report date is unacceptable

pmsteil commented 4 years ago

Here is a suggestion for Magento developers to get to the bottom of this. Make the error message better!

No such entity is not a good error message. It provides no context or detail or suggestion on what could be wrong. Please make this error message better to help all of us!

thanks

chunsli commented 4 years ago

I am having the same issue with a Magento 2.3.2 EE, I raised a ticket to Magento support, and here is the reply:

There is a patch currently in Development for this issue. It's currently in the "code review" phase. If that passes, then it will need to pass the "quality assurance" phase before it can be released to the public. 

Unfortunately, I cannot share an ETA for when the patch will be ready. It is important that we test these hotfixes thoroughly to ensure there is no damaging consequences to the rest of the application. 

I will keep you updated as soon as more information becomes available. 

quite ridiculous given that this issue was raised in 2016

aboutzahurul commented 4 years ago

Getting the same error on checkout page while using latest amasty one step checkout module on Magento 2.3.1 CE, it creates the order successfully but can't create the user account:

Error on frontend checkout success page: Something went wrong while creating an account. Please contact us so we can assist you.

Error on var/log/exception.log [2020-02-29 22:23:22] main.CRITICAL: No such entity with cartId = 12850 {"exception":"[object] (Magento\\Framework\\Exception\\NoSuchEntityException(code: 0): No such entity with cartId = 12850 at /home/user/public_html/vendor/magento/framework/Exception/NoSuchEntityException.php:50)"} []

Already tried a few ideas without any luck:

  1. disabling the Dotdigitalgroup_Email module
  2. Checking customer_group table for "NOT LOGGED IN" group.
  3. Checking customer_entity table for columns failures_num, first_failure, lock_expires structures

(amasty don't help unless you renew their module license) Still struggling to fix the issue...

@saderra chunsli Thanks for sharing, please update us as if there any hope or suggestion...

aboutzahurul commented 4 years ago

Getting the same error on checkout page while using latest amasty one step checkout module on Magento 2.3.1 CE, it creates the order successfully but can't create the user account:

Error on frontend checkout success page: Something went wrong while creating an account. Please contact us so we can assist you.

Error on var/log/exception.log [2020-02-29 22:23:22] main.CRITICAL: No such entity with cartId = 12850 {"exception":"[object] (Magento\\Framework\\Exception\\NoSuchEntityException(code: 0): No such entity with cartId = 12850 at /home/user/public_html/vendor/magento/framework/Exception/NoSuchEntityException.php:50)"} []

Already tried a few ideas without any luck:

  1. disabling the Dotdigitalgroup_Email module
  2. Checking customer_group table for "NOT LOGGED IN" group.
  3. Checking customer_entity table for columns failures_num, first_failure, lock_expires structures

(amasty don't help unless you renew their module license) Still struggling to fix the issue...

@saderra chunsli Thanks for sharing, please update us as if there any hope or suggestion...

Upgraded Magento 2.3.1 CE to Magento 2.3.4 CE, still the same issue...

jordanvector commented 4 years ago

Still an issue on Magento 2.3.4 EE multi store setup. Exact same issues reported here:

[2020-03-19 18:35:44] report.ERROR: No such entity with cartId = 2433484 {"exception":"[object] (Magento\Framework\Exception\NoSuchEntityException(code: 0): No such entity with cartId = 2433484 at /app/7alebf6ygqtlm/vendor/magento/framework/Exception/NoSuchEntityException.php:50)"} []

Edit: Heard back from support and they gave me this version for Magento 2.3.4 EE, looks like it should work for previous versions as well. In staging this appears to have resolved the issue for me at least.

https://gist.githubusercontent.com/jordanvector/6594836df8db3ce7c97b7d5f9a54fb9d/raw/c64c3b839118477717657f88b302d0ae81e3a13f/MDVA-6348_EE_2.1.7_COMPOSER_v1.patch

wbyrnetx commented 4 years ago

This is also happening for us on Magento 2.2.3 many times per day. I was able to log a full stack trace of one of the occurrences.

#0 /srv/weldioc/releases/1583434178/vendor/magento/module-quote/Model/QuoteRepository.php(217): Magento\Framework\Exception\NoSuchEntityException::singleField('cartId', NULL)
#1 /srv/weldioc/releases/1583434178/vendor/magento/module-quote/Model/QuoteRepository.php(121): Magento\Quote\Model\QuoteRepository->loadQuote('loadByIdWithout...', 'cartId', NULL, Array)
#2 /srv/weldioc/releases/1583434178/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Quote\Model\QuoteRepository->get(NULL)
#3 /srv/weldioc/releases/1583434178/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Quote\Model\QuoteRepository\Interceptor->___callParent('get', Array)
#4 /srv/weldioc/releases/1583434178/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Quote\Model\QuoteRepository\Interceptor->Magento\Framework\Interception\{closure}(NULL)
#5 /srv/weldioc/releases/1583434178/generated/code/Magento/Quote/Model/QuoteRepository/Interceptor.php(26): Magento\Quote\Model\QuoteRepository\Interceptor->___callPlugins('get', Array, Array)
#6 /srv/weldioc/releases/1583434178/vendor/magento/module-paypal/Model/Payflow/Service/Response/Transaction.php(107): Magento\Quote\Model\QuoteRepository\Interceptor->get(NULL)
#7 /srv/weldioc/releases/1583434178/vendor/magento/module-paypal/Controller/Transparent/Response.php(85): Magento\Paypal\Model\Payflow\Service\Response\Transaction->savePaymentInQuote(Object(Magento\Framework\DataObject))
#8 /srv/weldioc/releases/1583434178/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Paypal\Controller\Transparent\Response->execute()
#9 /srv/weldioc/releases/1583434178/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Paypal\Controller\Transparent\Response\Interceptor->___callParent('execute', Array)
#10 /srv/weldioc/releases/1583434178/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Paypal\Controller\Transparent\Response\Interceptor->Magento\Framework\Interception\{closure}()
#11 /srv/weldioc/releases/1583434178/generated/code/Magento/Paypal/Controller/Transparent/Response/Interceptor.php(26): Magento\Paypal\Controller\Transparent\Response\Interceptor->___callPlugins('execute', Array, Array)
#12 /srv/weldioc/releases/1583434178/vendor/magento/framework/App/Action/Action.php(107): Magento\Paypal\Controller\Transparent\Response\Interceptor->execute()
#13 /srv/weldioc/releases/1583434178/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Framework\App\Action\Action->dispatch(Object(Magento\Framework\App\Request\Http))
#14 /srv/weldioc/releases/1583434178/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Paypal\Controller\Transparent\Response\Interceptor->___callParent('dispatch', Array)
#15 /srv/weldioc/releases/1583434178/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Paypal\Controller\Transparent\Response\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))
#16 /srv/weldioc/releases/1583434178/generated/code/Magento/Paypal/Controller/Transparent/Response/Interceptor.php(39): Magento\Paypal\Controller\Transparent\Response\Interceptor->___callPlugins('dispatch', Array, Array)
#17 /srv/weldioc/releases/1583434178/vendor/magento/framework/App/FrontController.php(55): Magento\Paypal\Controller\Transparent\Response\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))
#18 /srv/weldioc/releases/1583434178/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Framework\App\FrontController->dispatch(Object(Magento\Framework\App\Request\Http))
#19 /srv/weldioc/releases/1583434178/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Framework\App\FrontController\Interceptor->___callParent('dispatch', Array)
#20 /srv/weldioc/releases/1583434178/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))
#21 /srv/weldioc/releases/1583434178/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))
#22 /srv/weldioc/releases/1583434178/app/code/Amasty/InvisibleCaptcha/Plugin/Predispatch.php(93): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))
#23 /srv/weldioc/releases/1583434178/vendor/magento/framework/Interception/Interceptor.php(135): Amasty\InvisibleCaptcha\Plugin\Predispatch->aroundDispatch(Object(Magento\Framework\App\FrontController\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#24 /srv/weldioc/releases/1583434178/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))
#25 /srv/weldioc/releases/1583434178/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))
#26 /srv/weldioc/releases/1583434178/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))
#27 /srv/weldioc/releases/1583434178/generated/code/Magento/Framework/App/FrontController/Interceptor.php(26): Magento\Framework\App\FrontController\Interceptor->___callPlugins('dispatch', Array, Array)
#28 /srv/weldioc/releases/1583434178/vendor/magento/framework/App/Http.php(135): Magento\Framework\App\FrontController\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))
#29 /srv/weldioc/releases/1583434178/vendor/magento/framework/App/Bootstrap.php(256): Magento\Framework\App\Http->launch()
#30 /srv/weldioc/releases/1583434178/pub/index.php(37): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http\Interceptor))
#31 {main}

The issue is coming from vendor/magento/module-paypal/Model/Payflow/Service/Response/Transaction.php

It appears that this is the problematic line of code

$this->sessionTransparent->getQuoteId()

getQuoteId is returning NULL Screen Shot 2020-03-20 at 2 25 20 PM

sangthieu commented 4 years ago

@wbyrnetx I have same problem with payflowpro. I found 2 cookies "PHPSESSION" for www and non www domain. It could be make prblem with session. I was make force redirect in nginx to make sure magento create 1 "PHPSESSION" cookies. But that issue comecome few time for me.

nagarajuk12 commented 3 years ago

Hi I have been facing same issue in the magento2.3.5-P2 please advise

nagarajuk12 commented 3 years ago

Hi @jordanvector

Still an issue on Magento 2.3.4 EE multi store setup. Exact same issues reported here:

[2020-03-19 18:35:44] report.ERROR: No such entity with cartId = 2433484 {"exception":"[object] (Magento\Framework\Exception\NoSuchEntityException(code: 0): No such entity with cartId = 2433484 at /app/7alebf6ygqtlm/vendor/magento/framework/Exception/NoSuchEntityException.php:50)"} []

Edit: Heard back from support and they gave me this version for Magento 2.3.4 EE, looks like it should work for previous versions as well. In staging this appears to have resolved the issue for me at least.

https://gist.githubusercontent.com/jordanvector/6594836df8db3ce7c97b7d5f9a54fb9d/raw/c64c3b839118477717657f88b302d0ae81e3a13f/MDVA-6348_EE_2.1.7_COMPOSER_v1.patch

I have applied the same patch in one my project currently working. But still having the issue can u advise? My M2 version is Magento/2.3 (B2B)

Thanks

epeets commented 3 years ago

I had this issue today in M2.3.2 and it was stopping me from adding anything to the cart. It was due to bad code in an observer that was observing the checkout_cart_product_add_after event in my custom module. Once I cleaned up the code the error went away. Hopefully, that helps someone dealing with this.

Aquive commented 3 years ago

Still present in M2.3.7

hareshpatel commented 3 years ago

Hello Team,

I am try tu stripe payment used. admin side order place is not working. Error is : No such entity with cartId

But fronted side work is find can you please help me how to resolve this issue.

shuffless commented 3 years ago

Having the same issue in 2.4.3.

I have created a multistore setup on a website (2.3.5-p1 with php 7.3) and I get errors in checkout.

The order is placed but the customer still receives the error and then they place it 2-3 times the checkout requests look like this https://domain.com/en/rest/en/V1/guest-carts/hHibRsXvKrTKfUkRMsLKfhVH0XegQmWk/payment-information but the status returns 404

If you go on the url though there is an exception XML the error would go like this No such entity with %fieldName = %fieldValue cartId 206168

I created a dev instance for this and upgraded to 2.4.3 (with php 7.4) but the issue persists.

pppwu commented 3 years ago

Hi @shuffless I found that if the SMTP setting is not completed, it will cause the same error as above mentioned, please check the POST request (rest/it/V1/guest-carts/(cartid)/payment-information) instead of GET, you will found that there is still an error in the response even if it returns HTTP200, in my case:

Magento ver. 2.4.2 Request URL: {mydomain}/V1/guest-carts/K7bDWOgP5B7bRMyM2dcBmcxTPiyGIyts/payment-information Request Method: POST Status Code: 200 Response Preview

"32"<br />
<b>Fatal error</b>:  Uncaught Laminas\Mail\Protocol\Exception\RuntimeException: Could not read from smtp.sendgrid.net in /home/peter_wu/src/p13m2/vendor/laminas/laminas-mail/src/Protocol/AbstractProtocol.php:309
Stack trace:
#0 /home/peter_wu/src/p13m2/vendor/laminas/laminas-mail/src/Protocol/AbstractProtocol.php(338): Laminas\Mail\Protocol\AbstractProtocol-&gt;_receive()
#1 /home/peter_wu/src/p13m2/vendor/laminas/laminas-mail/src/Protocol/Smtp.php(461): Laminas\Mail\Protocol\AbstractProtocol-&gt;_expect()
#2 /home/peter_wu/src/p13m2/vendor/laminas/laminas-mail/src/Protocol/Smtp.php(500): Laminas\Mail\Protocol\Smtp-&gt;quit()
#3 /home/peter_wu/src/p13m2/vendor/laminas/laminas-mail/src/Protocol/AbstractProtocol.php(105): Laminas\Mail\Protocol\Smtp-&gt;_disconnect()
#4 [internal function]: Laminas\Mail\Protocol\AbstractProtocol-&gt;__destruct()
#5 {main}
  thrown in <b>/home/peter_wu/src/p13m2/vendor/laminas/laminas-mail/src/Protocol/AbstractProtocol.php</b> on line <b>309</b><br />

Hope this will help.

shuffless commented 3 years ago

Hope this will help.

Indeed this was the case on my end as well. Thank you for the hint. I believe the debugging on this is really problematic since I lost so many hours trying to figure out what was the issue.

So, the troubleshooting for anyone getting this would be to disable all non-standard modules and try to reactivate and test one by one.

The logs do not provide any hint about the SMTP ... completely unintuitive.

@pppwu thank you for the suggestion.