Reaction: Error in server console when checking out on Release 1.14

Created on 25 Jul 2018  路  7Comments  路  Source: reactioncommerce/reaction

Issue Description

Receive the following error in the server console

  Error merging cart for session 4i2JFjxYQTm43TnWf into new account cart 4bJzn73KpbbukGind { Error: No cart found with token 4i2JFjxYQTm43TnWf [not-found]
      at MethodInvocation.mergeCart (imports/plugins/core/cart/server/methods/mergeCart.js:60:11)
      at currentArgumentChecker.withValue (packages/check/match.js:118:15)
      at Meteor.EnvironmentVariable.EVp.withValue (packages/meteor.js:1189:12)
      at Object._failIfArgumentsAreNotAllChecked (packages/check/match.js:116:43)
      at maybeAuditArgumentChecks (packages/ddp-server/livedata_server.js:1764:18)
      at DDP._CurrentMethodInvocation.withValue (packages/ddp-server/livedata_server.js:1685:15)
      at Meteor.EnvironmentVariable.EVp.withValue (packages/meteor.js:1189:12)
      at resolve (packages/ddp-server/livedata_server.js:1683:36)
      at new Promise (<anonymous>)
      at Server.applyAsync (packages/ddp-server/livedata_server.js:1682:12)
      at Server.apply (packages/ddp-server/livedata_server.js:1621:26)
      at Server.call (packages/ddp-server/livedata_server.js:1603:17)
      at MethodInvocation.createCartMethod (imports/plugins/core/cart/server/methods/createCart.js:45:12)
      at currentArgumentChecker.withValue (packages/check/match.js:118:15)
      at Meteor.EnvironmentVariable.EVp.withValue (packages/meteor.js:1189:12)
      at Object._failIfArgumentsAreNotAllChecked (packages/check/match.js:116:43)
    isClientSafe: true,
    error: 'not-found',
    reason: 'No cart found with token 4i2JFjxYQTm43TnWf',
    details: undefined,
    message: 'No cart found with token 4i2JFjxYQTm43TnWf [not-found]',
    errorType: 'Meteor.Error' }

Steps to Reproduce

  1. Enable flat rates and example payment
  2. Checkout as admin (not sure if it's relevant)
  3. Observe error in console

Versions

release-1.14.0

bug

All 7 comments

@zenweasel is this happening on an upgraded shop or a fresh shop? @aldeed did some work to update the way anonymous carts are handled in the recent GraphQL cart updates, and I'm wondering if this could be a migration issue.

@spencern After a full reset. I discovered it testing a PR and confirmed it's happening on release-1.14.0

fwiw it happens right when you do "Submit Payment", the "Your cart is empty" screen flashes for a second but the order completes.

I'm seeing this as well.
The error is getting logged here:
https://github.com/reactioncommerce/reaction/blob/release-1.14.0/imports/plugins/core/cart/server/methods/createCart.js#L46

There's a comment a few lines above Do this async because we don't need the client to know if it failed

Additionally, not 100% related to this error, but I see that on login, carts are no longer merging. Seems to be because of this change here: https://github.com/reactioncommerce/reaction/pull/4443/files#diff-396a353e751e20f50ac5654d69e700d5L237

I saw this error on my first order, but don't see it on subsequent orders. Can anyone else confirm that?

I'm making some additional changes to how the merging works now, so I'll make sure this is resolved.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ticean picture ticean  路  4Comments

Eduard-Hasa picture Eduard-Hasa  路  4Comments

focusaurus picture focusaurus  路  4Comments

zenweasel picture zenweasel  路  4Comments

spencern picture spencern  路  3Comments