grafana/k6 · error
not found: %s
Error message
not found: %s
What it means
Raised in fetch when loading a remote module over https returns HTTP 404. It means the URL was reachable but the resource no longer exists — a broken or moved module link, not a network failure. The at-fault input is the fetched URL that returned 404.
Source
Thrown at internal/loader/loader.go:222
func fetch(logger logrus.FieldLogger, u string) ([]byte, error) {
logger.WithField("url", u).Debug("Fetching source...")
startTime := time.Now()
ctx, cancel := context.WithTimeout(context.Background(), time.Minute)
defer cancel()
req, err := http.NewRequestWithContext(ctx, http.MethodGet, u, nil)
if err != nil {
return nil, err
}
res, err := http.DefaultClient.Do(req) //nolint:gosec
if err != nil {
return nil, err
}
defer func() { _ = res.Body.Close() }()
if res.StatusCode != http.StatusOK {
switch res.StatusCode {
case http.StatusNotFound:
return nil, fmt.Errorf("not found: %s", u)
default:
return nil, fmt.Errorf("wrong status code (%d) for: %s", res.StatusCode, u)
}
}
data, err := io.ReadAll(res.Body)
if err != nil {
return nil, err
}
logger.WithFields(logrus.Fields{
"url": u,
"t": time.Since(startTime),
"len": len(data),
}).Debug("Fetched!")
return data, nil
}
View on GitHub (pinned to 01ffac6f24)
Solutions
- Verify the module URL is correct and still published
- Pin to a version that exists (check the CDN/repository for the current path)
- Replace with a locally vendored copy of the module
Defensive patterns
Strategy: retry
When it happens
Trigger: Thrown at internal/loader/loader.go:222 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of grafana/k6@01ffac6f24 (2026-08-18).
Data as JSON: /api/errors/01d3c56baa7f017b.
Report an issue: GitHub.