Dishwasher won't drain

Dishwasher won’t drain when cycle completes. Drain line is clear. If I start a cycle and cancel immediately, the pump runs and drains a portion of the standing water. If I go through this starting and cancelling cycle 5 times, it completely pumps out all of the standing water. Anyone have a fix?