Puppeteer: Touch has already started
A touch handle is started again while it is already active.
A touch handle is started again while it is already active.
Error message
Touch has already started
How this error happens
A TouchHandle has a start/end lifecycle. Restarting the same active handle repeats its start operation.
The snippets use an open Puppeteer page named page.
const touch = await page.touchscreen.touchStart(
50,
50
);
await touch.start();
How to fix
Move and end the active touch. To make another gesture, create a new touch after ending the first.
const touch = await page.touchscreen.touchStart(
50,
50
);
await touch.move(
100,
100
);
await touch.end();
Things to keep in mind
Run these as alternative sequences from a fresh touch state. Calling touchStart again can create a separate touch; it does not restart the existing handle.