{"record":{"id":"deda51cff018250f","repo":"yudai/gotty","slug":"failed-to-fill-window-title-template","errorCode":null,"errorMessage":"failed to fill window title template","messagePattern":"failed to fill window title template","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"server/handlers.go","lineNumber":139,"sourceCode":"\t\treturn errors.Wrapf(err, \"failed to create backend\")\n\t}\n\tdefer slave.Close()\n\n\ttitleVars := server.titleVariables(\n\t\t[]string{\"server\", \"master\", \"slave\"},\n\t\tmap[string]map[string]interface{}{\n\t\t\t\"server\": server.options.TitleVariables,\n\t\t\t\"master\": map[string]interface{}{\n\t\t\t\t\"remote_addr\": conn.RemoteAddr(),\n\t\t\t},\n\t\t\t\"slave\": slave.WindowTitleVariables(),\n\t\t},\n\t)\n\n\ttitleBuf := new(bytes.Buffer)\n\terr = server.titleTemplate.Execute(titleBuf, titleVars)\n\tif err != nil {\n\t\treturn errors.Wrapf(err, \"failed to fill window title template\")\n\t}\n\n\topts := []webtty.Option{\n\t\twebtty.WithWindowTitle(titleBuf.Bytes()),\n\t}\n\tif server.options.PermitWrite {\n\t\topts = append(opts, webtty.WithPermitWrite())\n\t}\n\tif server.options.EnableReconnect {\n\t\topts = append(opts, webtty.WithReconnect(server.options.ReconnectTime))\n\t}\n\tif server.options.Width > 0 {\n\t\topts = append(opts, webtty.WithFixedColumns(server.options.Width))\n\t}\n\tif server.options.Height > 0 {\n\t\topts = append(opts, webtty.WithFixedRows(server.options.Height))\n\t}\n\tif server.options.Preferences != nil {","sourceCodeStart":121,"sourceCodeEnd":157,"githubUrl":"https://github.com/yudai/gotty/blob/a080c85cbc59226c94c6941ad8c395232d72d517/server/handlers.go#L121-L157","documentation":"Wrapped template.Execute error while rendering the window title with noesctmpl: the server's TitleFormat string (or a value in the title variables, e.g. a nil from slave.WindowTitleVariables) cannot be executed against the collected template data. This is a server-side configuration/template mismatch, independent of the client.","triggerScenarios":"Thrown at server/handlers.go:139 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Test-render the --title-format string at startup and fail fast on invalid templates","Ensure slave backends always return non-nil WindowTitleVariables maps","Fall back to a static default title instead of killing the connection"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"a080c85cbc59226c94c6941ad8c395232d72d517","analyzedAt":"2026-09-02T16:42:38.150Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-09T21:17:11.164Z"}