{"record":{"id":"d4a9268fd603a07d","repo":"grafana/k6","slug":"the-gateway-output-failed-to-start-a-versioned-out","errorCode":null,"errorMessage":"the Gateway Output failed to start a versioned output: %w","messagePattern":"the Gateway Output failed to start a versioned output: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/output/cloud/output.go","lineNumber":293,"sourceCode":"\t\tArchive:    out.testArchive,\n\t}\n\n\tresponse, err := out.client.CreateTestRun(testRun)\n\tif err != nil {\n\t\treturn err\n\t}\n\tout.testRunID = response.ReferenceID\n\n\tif response.ConfigOverride != nil {\n\t\tout.logger.WithFields(logrus.Fields{\n\t\t\t\"override\": response.ConfigOverride,\n\t\t}).Debug(\"overriding config options\")\n\t\tout.config = out.config.Apply(*response.ConfigOverride)\n\t}\n\n\terr = out.startVersionedOutput()\n\tif err != nil {\n\t\treturn fmt.Errorf(\"the Gateway Output failed to start a versioned output: %w\", err)\n\t}\n\n\tout.logger.WithFields(logrus.Fields{\n\t\t\"name\":      out.config.Name,\n\t\t\"projectId\": out.config.ProjectID,\n\t\t\"duration\":  out.duration,\n\t\t\"testRunId\": out.testRunID,\n\t}).Debug(\"Started!\")\n\treturn nil\n}\n\n// Description returns the URL with the test run results.\nfunc (out *Output) Description() string {\n\treturn fmt.Sprintf(\"cloud (%s)\", cloudapi.URLForResults(out.testRunID, out.config))\n}\n\n// SetThresholds receives the thresholds before the output is Start()-ed.\nfunc (out *Output) SetThresholds(scriptThresholds map[string]metrics.Thresholds) {","sourceCodeStart":275,"sourceCodeEnd":311,"githubUrl":"https://github.com/grafana/k6/blob/01ffac6f245854c1b8adc6a69857c76a15f90022/internal/output/cloud/output.go#L275-L311","documentation":"Start failed while switching to the versioned cloud output implementation: after creating the test run, startVersionedOutput returned an error (e.g. unsupported API version or v2 constructor failure) and Start wraps it with this message.","triggerScenarios":"Thrown at internal/output/cloud/output.go:293 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Inspect the wrapped error for the root cause (commonly an invalid K6_CLOUD_API_VERSION)","Set K6_CLOUD_API_VERSION=2","Verify cloud credentials, legacy/summary flags, and connectivity to the cloud API"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"01ffac6f245854c1b8adc6a69857c76a15f90022","analyzedAt":"2026-08-18T03:05:52.393Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}