Summary: A batch that fails with "Sequence contains no elements" was hitting a problem that a Shipstore update fixed. If it still happens after you update, it is usually because one or more orders in the batch were already shipped, so build a fresh batch of only the orders that have not shipped yet.
Problem
Processing a batch fails with this message:
Sequence contains no elements
In the batch log the same failure shows for each order as:
BatchProcessHelper : ShipBatchOrder : Errors encountered for order: [order]: Sequence contains no matching element
Sometimes every record in the batch errors out. The same message has also appeared when rating a single LTL (freight) shipment.
Cause
There are a few causes. First, an older version had a batch problem that raised this error; a Shipstore update fixed it. Second, once you are on the fixed version, the error comes back when the batch still contains orders that were already shipped (in another batch or by hand), so there is no un-shipped record left for the batch to act on. Third, the same message on a single LTL shipment was a separate problem that a Shipstore update fixed.
Fix
- Make sure Shipstore is on the current version, where the original problem is fixed.
- Check whether any orders in the failing batch were already shipped, in another batch or by hand (for example, an order created one day and shipped the next).
- Build and run a brand-new batch that holds only the orders that still need to ship. Do not re-run the batch that still holds the already-shipped orders.
- If you are on an older version and cannot update yet, process the orders in smaller groups to find the records that still process.
- Before you reprocess anything, check Shipment History so you do not ship the same order twice.
If the error shows on a single LTL shipment (not a batch) and stays after you update, email support@shipstore.com with the order number.
What you should see
A fresh batch of not-yet-shipped orders processes without the "Sequence contains no elements" error, and the batch log no longer shows "Sequence contains no matching element".
Related articles
- Batch stays In Process and never rates or ships
- Batches or imports stop: a Shipstore service is not running