The trapping of thermal electrons in a nonlinear plasma wave of arbitrary phase velocity is investigated. The threshold plasma wave amplitude for trapping plasma electrons is calculated, thereby determining the fraction trapped and the expected dark current in a plasma-based accelerator. It is shown that the presence of a laser field (e.g., trapping in the self-modulated regime of the laser wakefield accelerator) increases the trapping threshold. Implications for experimental and numerical laser-plasma studies are discussed.