grafana/k6 · error

fail to continue request

Error message

fail to continue request (id: %s): %w

What it means

Failure of the CDP Fetch.continueRequest command for the identified request. Treated as usually benign: it typically means the page navigated away or the request finished before continuation, and context-canceled errors are swallowed. The request ID in the message identifies the affected request.

Solutions

  1. Continue requests quickly in route handlers to avoid races with navigation
  2. Treat as non-fatal when it occurs near page navigation or teardown
  3. Ensure Fetch interception is still enabled when continuing a paused request
Defensive patterns

Strategy: try-catch

When it happens

Trigger: Thrown at internal/js/modules/k6/browser/common/network_manager.go:973 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of grafana/k6@8d06114777 (2026-08-18). Data as JSON: /api/errors/73e95ac40402dd86. Report an issue: GitHub.

Appendix: source

Thrown at internal/js/modules/k6/browser/common/network_manager.go:973

		// Avoid logging as error when context is canceled.
		// Most probably this happens when trying to fail a site's background request
		// while the iteration is ending and therefore the browser context is being closed.
		if errors.Is(err, context.Canceled) {
			m.logger.Debug("NetworkManager:ContinueRequest", "context canceled continuing request")
			return nil
		}

		// This error message is an internal issue, rather than something that the user can
		// action on. It's also usually ok to ignore since it means that the page has navigated
		// away or something has occurred which means that the request is no longer needed and
		// isn't being tracked by chromium.
		if strings.Contains(err.Error(), "Invalid InterceptionId") {
			m.logger.Debugf("NetworkManager:ContinueRequest", "invalid interception ID (%s) continuing request: %s",
				requestID, err)
			return nil
		}

		return fmt.Errorf("fail to continue request (id: %s): %w", requestID, err)
	}

	return nil
}

func (m *NetworkManager) FulfillRequest(request *Request, opts FulfillOptions) error {
	responseCode := int64(http.StatusOK)
	if opts.Status != 0 {
		responseCode = opts.Status
	}

	action := fetch.FulfillRequest(request.interceptionID, responseCode)

	if opts.ContentType != "" {
		opts.Headers = append(opts.Headers, HTTPHeader{
			Name:  "Content-Type",
			Value: opts.ContentType,
		})

View on GitHub (pinned to 8d06114777)