grafana/k6 · error

parsing mouse move options: %w

Error message

parsing mouse move options: %w

What it means

Error "parsing mouse move options: %w" thrown in grafana/k6.

Source

Thrown at internal/js/modules/k6/browser/browser/mouse_mapping.go:55

				return nil, fmt.Errorf("parsing mouse down options: %w", err)
			}
			return promise(vu, func() (any, error) {
				return nil, m.Down(popts) //nolint:wrapcheck
			}), nil
		},
		"up": func(opts sobek.Value) (*sobek.Promise, error) {
			popts, err := parseMouseDownUpOptions(rt, opts)
			if err != nil {
				return nil, fmt.Errorf("parsing mouse up options: %w", err)
			}
			return promise(vu, func() (any, error) {
				return nil, m.Up(popts) //nolint:wrapcheck
			}), nil
		},
		"move": func(x float64, y float64, opts sobek.Value) (*sobek.Promise, error) {
			popts, err := parseMouseMoveOptions(rt, opts)
			if err != nil {
				return nil, fmt.Errorf("parsing mouse move options: %w", err)
			}
			return promise(vu, func() (any, error) {
				return nil, m.Move(x, y, popts) //nolint:wrapcheck
			}), nil
		},
	}
}

// parseMouseClickOptions parses the mouse click options from a Sobek value.
func parseMouseClickOptions(rt *sobek.Runtime, opts sobek.Value) (*common.MouseClickOptions, error) {
	popts := common.NewMouseClickOptions()
	if k6common.IsNullish(opts) {
		return popts, nil
	}

	obj := opts.ToObject(rt)
	for _, k := range obj.Keys() {
		v := obj.Get(k)

View on GitHub (pinned to 93accf6570)

When it happens

Trigger: Thrown at internal/js/modules/k6/browser/browser/mouse_mapping.go:55 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of grafana/k6@93accf6570 (2026-08-15). Data as JSON: /api/errors/50e8bd1840a5d0b5. Report an issue: GitHub.