grafana/k6 · error
requesting presigned url
Error message
requesting presigned url: %w
What it means
Raised in RemoteFilePersister.Persist when requestPresignedURL fails: the HTTP POST to the cloud presigned-URL endpoint (with a 10s client timeout) could not be completed. This covers request creation, network transport, status-code rejection, or response-decoding failures — i.e. k6 could not obtain an upload target for the artifact from the remote (cloud) service before any upload is attempted.
Solutions
- Verify network connectivity and proxy settings to the k6 Cloud endpoint
- Check validity of authentication headers/token used for the presigned request
- Retry the operation; transient network or 5xx failures are common
- Inspect the wrapped error to see if it was transport, status code, or decoding that failed
Defensive patterns
Strategy: retry
When it happens
Trigger: Thrown at internal/js/modules/k6/browser/storage/file_persister.go:98 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/d404bef6994be0dd.
Report an issue: GitHub.
Appendix: source
Thrown at internal/js/modules/k6/browser/storage/file_persister.go:98
presignedURLRequestURL string,
headers map[string]string,
basePath string,
) *RemoteFilePersister {
return &RemoteFilePersister{
presignedURLRequestURL: presignedURLRequestURL,
headers: headers,
basePath: basePath,
httpClient: &http.Client{
Timeout: time.Second * 10,
},
}
}
// Persist will upload the contents of data to a remote location.
func (r *RemoteFilePersister) Persist(ctx context.Context, path string, data io.Reader) (err error) {
psResp, err := r.requestPresignedURL(ctx, path)
if err != nil {
return fmt.Errorf("requesting presigned url: %w", err)
}
req, err := newFileUploadRequest(ctx, psResp, data)
if err != nil {
return fmt.Errorf("creating upload request: %w", err)
}
resp, err := r.httpClient.Do(req)
if err != nil {
return fmt.Errorf("performing upload request: %w", err)
}
defer resp.Body.Close() //nolint:errcheck
if _, err := io.Copy(io.Discard, resp.Body); err != nil {
return fmt.Errorf("draining upload response body: %w", err)
}
if err := checkStatusCode(resp); err != nil {View on GitHub (pinned to 8d06114777)