Checkout Extension useApplyCartLinesChange > removeCartLine > returns error

I developed a checkout extension that removes items from the cart once a certain amount of time has passed. This is determined by a timestamp added as an attribute when items are added to the cart. This works fine if the browser tab is left inactive and then one return to the tab. The issue is when the tab or browser is closed and the user returns to checkout with the same cart. When the extension tries to remove any items using the React hook, useApplyCartLinesChange with type set to 'removeCartLine' or 'updateCartline', it returns an error.

{
    "type": "error",
    "message": "Could not apply line item changes. Error: Server failed to fulfill the request and to identify the exact issue."
}
GenericError: Server failed to fulfill the request and to identify the exact issue.
    at Module.Kt (actions.CLWhN4v9.js:1:134056)
    at async Object.negotiate (app.CltNt-T3.js:34:79288)
    at async uIe.runNegotiation (app.CltNt-T3.js:34:85395)Caused by: NegotiationFailedError: Negotiation request failed. Violations = BASE_INTERNAL_ERROR
    at Module.Kt (actions.CLWhN4v9.js:1:134142)
    at async Object.negotiate (app.CltNt-T3.js:34:79288)
    at async uIe.runNegotiation (app.CltNt-T3.js:34:85395)

Instructions are checked before attempting to remove.

{
    "canAddCartLine": true,
    "canRemoveCartLine": true,
    "canUpdateCartLine": true
}

I can add items successfully, but cannot remove items. Wondering if there is a scope I’m missing, or if item remove is just not allowed in a new browser session.

Hi, I am getting the same error. Did you manage to find a solution to this?

No, I did not find a solution to remove items at checkout. I ended up using a checkout validator function to prevent checkout, flagged via a cart attribute, and checkout UI to navigate them back to shopping, then use cart/update.js to remove items.