{"record":{"id":"1acc97b4887765c6","repo":"m1k1o/neko","slug":"stream-src-not-enabled","errorCode":null,"errorMessage":"stream-src not enabled","messagePattern":"stream-src not enabled","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"server/internal/capture/streamsrc.go","lineNumber":123,"sourceCode":"}\n\nfunc (manager *StreamSrcManagerCtx) Codec() codec.RTPCodec {\n\tmanager.pipelineMu.Lock()\n\tdefer manager.pipelineMu.Unlock()\n\n\treturn manager.codec\n}\n\nfunc (manager *StreamSrcManagerCtx) Start(codec codec.RTPCodec) error {\n\tmanager.pipelineMu.Lock()\n\tdefer manager.pipelineMu.Unlock()\n\n\tif manager.pipeline != nil {\n\t\treturn types.ErrCapturePipelineAlreadyExists\n\t}\n\n\tif !manager.enabled {\n\t\treturn errors.New(\"stream-src not enabled\")\n\t}\n\n\tfound := false\n\tfor codecName, pipeline := range manager.codecPipeline {\n\t\tif codecName == codec.Name {\n\t\t\tmanager.pipelineStr = pipeline\n\t\t\tmanager.codec = codec\n\t\t\tfound = true\n\t\t\tbreak\n\t\t}\n\t}\n\n\tif !found {\n\t\treturn errors.New(\"no pipeline found for a codec\")\n\t}\n\n\tvar err error\n","sourceCodeStart":105,"sourceCodeEnd":141,"githubUrl":"https://github.com/m1k1o/neko/blob/b0f01cedea68893e85a3fd852c0521238c285695/server/internal/capture/streamsrc.go#L105-L141","documentation":"StreamSrcManagerCtx.Start returns 'stream-src not enabled' when manager.enabled is false. Like the screencast manager, a stream-src constructed as disabled refuses to create its pipeline. The check happens before codec/pipeline lookup, right after the already-exists check.","triggerScenarios":"Calling Start() on a stream-src manager whose configuration has streaming source disabled; enabling logic never ran (config flag off or client did not request stream-src).","commonSituations":"Server started without stream-src enabled but a client attempts to start the source stream; environment where streaming is deliberately disabled (e.g. no capture device); config resets after upgrades.","solutions":["Enable stream-src in the server configuration before calling Start","Have the client request the stream-src capability so the manager is created enabled","If intentionally disabled, surface a user-facing 'streaming unavailable' state instead of retrying"],"exampleFix":"// before\nif err := streamSrc.Start(codec); err != nil { return err } // stream-src not enabled\n// after\nif !streamSrcEnabled {\n    return fmt.Errorf(\"cannot start stream-src: feature disabled in config\")\n}\nif err := streamSrc.Start(codec); err != nil { return err }","handlingStrategy":"validation","validationCode":"if !cfg.StreamSrc.Enabled {\n    return errors.New(\"stream-src disabled; cannot start\")\n}\nif err := streamSrc.Start(codec); err != nil { return err }","typeGuard":null,"tryCatchPattern":"if err := streamSrc.Start(codec); err != nil {\n    if err.Error() == \"stream-src not enabled\" {\n        return fmt.Errorf(\"streaming unavailable: %w\", err) // non-retryable; fix config\n    }\n    return err\n}","preventionTips":["Enable stream-src in server config when streaming is required","Check the enabled state before exposing start controls in the UI","Keep client capability requests aligned with server-side enablement","Document that Start is non-retryable when the feature is disabled"],"tags":["go","streamsrc","configuration","disabled"],"backgroundTag":"feature-not-enabled","analyzedSha":"b0f01cedea68893e85a3fd852c0521238c285695","analyzedAt":"2026-09-01T10:35:56.638Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T15:18:49.778Z"}