grafana/k6 · error
received empty load tests page with next link
Error message
received empty load tests page with next link
What it means
Thrown by the k6 v6 cloud API client's ListLoadTests when a paginated ProjectsLoadTestsRetrieve response returns zero tests but still carries a non-empty NextLink. The client guards against a broken pagination contract: a next link implies more items, so an empty page means the loop could never make progress; it aborts instead of looping or returning a truncated list. It surfaces through `k6 cloud test list`.
Solutions
- Retry the command — transient pagination glitches usually resolve
- Update k6 to the latest release to pick up the current cloud API client
- Check the project in the Grafana Cloud UI and archive/delete stale tests if it holds 1000+ entries
- Verify no proxy alters the response body, then retry outside it
- If persistent, collect verbose logs and report a bug to grafana/k6
Defensive patterns
Strategy: retry
Prevention
- Retry `k6 cloud test list` once on this error — it is usually transient
- Archive CI-generated throwaway tests so a project stays well under 1000 entries
- Pin and periodically bump the k6 version used in CI to keep the API client current
When it happens
Trigger: Calling Client.ListLoadTests (the code behind `k6 cloud test list --project-id N`) when the project has more than 1000 load tests (the fixed pageSize) and the API returns an empty Value array with NextLink set; also from response-mangling proxies or an API/client version mismatch.
Common situations: Projects that accumulated 1000+ test definitions over time; CI-generated tests with auto-generated names inflating the count; old k6 binaries against an updated backend.
Related errors
- received empty projects page with next link
- an error occurred communicating with k6 Cloud
- 97
- load test not found
- Run `k6 cloud login` to authenticate, or check the docs for…
AI-assisted analysis of grafana/k6@01ffac6f24 (2026-08-18).
Data as JSON: /api/errors/d73c19820f375fe9.
Report an issue: GitHub.
Appendix: source
Thrown at internal/cloudapi/v6/api.go:131
return nil, err
}
for _, test := range res.Value {
tests = append(tests, LoadTest{
ID: test.Id,
ProjectID: test.ProjectId,
Name: test.Name,
Created: test.Created,
Updated: test.Updated,
})
}
if res.NextLink == nil || *res.NextLink == "" {
return tests, nil
}
if len(res.Value) == 0 {
return nil, errors.New("received empty load tests page with next link")
}
skip += pageSize
}
}
func (c *Client) listLoadTestsPage(
ctx context.Context, projectID int64, skip, top int32,
) (*k6cloud.LoadTestListResponse, error) {
res, hr, err := c.apiClient.LoadTestsAPI.
ProjectsLoadTestsRetrieve(c.authCtx(ctx), projectID).
XStackId(c.stackID).
Skip(skip).
Top(top).
Execute()
defer closeResponse(hr, &err)
if err := CheckResponse(hr, err); err != nil {
return nil, errView on GitHub (pinned to 01ffac6f24)