{"record":{"id":"b618c47f0a6f0c61","repo":"grafana/k6","slug":"touch-end-w","errorCode":null,"errorMessage":"touch end: %w","messagePattern":"touch end: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/js/modules/k6/browser/common/touchscreen.go","lineNumber":53,"sourceCode":"func (t *Touchscreen) tap(x float64, y float64) error {\n\ttouchStart := input.DispatchTouchEvent(\n\t\tinput.TouchStart,\n\t\t[]*input.TouchPoint{{X: x, Y: y}},\n\t).WithModifiers(\n\t\tinput.Modifier(t.keyboard.modifiers),\n\t)\n\tif err := touchStart.Do(cdp.WithExecutor(t.ctx, t.session)); err != nil {\n\t\treturn fmt.Errorf(\"touch start: %w\", err)\n\t}\n\n\ttouchEnd := input.DispatchTouchEvent(\n\t\tinput.TouchEnd,\n\t\t[]*input.TouchPoint{},\n\t).WithModifiers(\n\t\tinput.Modifier(t.keyboard.modifiers),\n\t)\n\tif err := touchEnd.Do(cdp.WithExecutor(t.ctx, t.session)); err != nil {\n\t\treturn fmt.Errorf(\"touch end: %w\", err)\n\t}\n\n\treturn nil\n}\n","sourceCodeStart":35,"sourceCodeEnd":58,"githubUrl":"https://github.com/grafana/k6/blob/01ffac6f245854c1b8adc6a69857c76a15f90022/internal/js/modules/k6/browser/common/touchscreen.go#L35-L58","documentation":"Raised inside Touchscreen.tap when the second CDP call — Input.dispatchTouchEvent with type=touchEnd and an empty touch-point list, carrying the keyboard modifiers — fails. The touchStart half already succeeded, so the page may be left with a stuck pressed state. This fires on CDP-level delivery failure of the release event, e.g. a session that died between the two dispatches.","triggerScenarios":"Thrown at internal/js/modules/k6/browser/common/touchscreen.go:53 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify CDP session stability; avoid closing the browser mid-gesture","Retry the full tap so the start/end pair is dispatched consistently","If taps intermittently fail, add a small delay or wait between interactions to keep the session stable"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"01ffac6f245854c1b8adc6a69857c76a15f90022","analyzedAt":"2026-08-18T03:05:52.393Z","contentChangedAt":"2026-08-18T03:05:52.393Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}