{"record":{"id":"238d0d3c8b714766","repo":"wailsapp/wails","slug":"implement-me-238d0d","errorCode":null,"errorMessage":"Implement me","messagePattern":"Implement me","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"v3/pkg/application/menuitem_linux_gtk3.go","lineNumber":374,"sourceCode":"\t\t\tcurrentWindow := globalApplication.Window.Current()\n\t\t\tif currentWindow != nil {\n\t\t\t\tcurrentWindow.Zoom()\n\t\t\t}\n\t\t})\n}\n\nfunc newFullScreenMenuItem() *MenuItem {\n\treturn NewMenuItem(\"Fullscreen\").\n\t\tOnClick(func(ctx *Context) {\n\t\t\tcurrentWindow := globalApplication.Window.Current()\n\t\t\tif currentWindow != nil {\n\t\t\t\tcurrentWindow.Fullscreen()\n\t\t\t}\n\t\t})\n}\n\nfunc newPrintMenuItem() *MenuItem {\n\tpanic(\"Implement me\")\n}\n\nfunc newPageLayoutMenuItem() *MenuItem {\n\tpanic(\"Implement me\")\n}\n\nfunc newShowAllMenuItem() *MenuItem {\n\tpanic(\"Implement me\")\n}\n\nfunc newBringAllToFrontMenuItem() *MenuItem {\n\tpanic(\"Implement me\")\n}\n\nfunc newNewFileMenuItem() *MenuItem {\n\tpanic(\"Implement me\")\n}\n","sourceCodeStart":356,"sourceCodeEnd":392,"githubUrl":"https://github.com/wailsapp/wails/blob/0e754b1b40ba9044c2a1460e23b7c3de20fc5cf3/v3/pkg/application/menuitem_linux_gtk3.go#L356-L392","documentation":"newPrintMenuItem is an unimplemented stub in the Linux GTK3 menu backend. The Role 'Print' dispatches through NewRole (menuitem.go:192-193) to NewPrintMenuItem(), which panics with 'Implement me' at menu-build time, crashing the application on startup. Identical stubs exist in the default GTK4 backend (menuitem_linux.go:337), so both Linux flavors are affected.","triggerScenarios":"Calling AddRole(application.Print) or NewPrintMenuItem() in an application running on Linux (with or without -tags gtk3). The panic occurs during menu construction, before the UI shows.","commonSituations":"Menus written on Windows/macOS where printing roles are expected; v2-to-v3 migrations that keep role-based File menus; test runs on Linux CI for an app developed on another OS.","solutions":["Replace AddRole(application.Print) with an explicit item wired to your own print logic: Add(NewMenuItem(\"Print\").SetAccelerator(\"CmdOrCtrl+p\").OnClick(func(ctx *application.Context) { ... }))","Restrict the Print role to platforms where it is implemented (check runtime.GOOS before AddRole)","Contribute an implementation of newPrintMenuItem upstream (e.g. invoking the WebKitGTK print dialog via window.Print()) and track it as a GitHub issue"],"exampleFix":"// before\nfileMenu.AddRole(application.Print)\n\n// after\nfileMenu.Add(application.NewMenuItem(\"Print\").\n\tSetAccelerator(\"CmdOrCtrl+p\").\n\tOnClick(func(ctx *application.Context) { app.Window.Current().Print() }))","handlingStrategy":"validation","validationCode":"var unsupportedOnLinux = map[application.Role]bool{\n\tapplication.Print: true, application.PageLayout: true,\n\tapplication.NewFile: true, application.Open: true,\n\tapplication.Save: true, application.SaveAs: true, application.Revert: true,\n\tapplication.Find: true, application.FindAndReplace: true,\n\tapplication.FindNext: true, application.FindPrevious: true,\n\tapplication.StartSpeaking: true, application.StopSpeaking: true,\n\tapplication.ShowAll: true, application.BringAllToFront: true,\n\tapplication.Front: true, application.Help: true,\n}\nfunc addRole(m *application.Menu, r application.Role) {\n\tif runtime.GOOS == \"linux\" && unsupportedOnLinux[r] {\n\t\treturn\n\t}\n\tm.AddRole(r)\n}","typeGuard":null,"tryCatchPattern":"defer func() {\n\tif r := recover(); r != nil {\n\t\tlog.Printf(\"menu build panic: %v\", r)\n\t}\n}()\nfileMenu.AddRole(application.Print)","preventionTips":["Treat the Role enum as macOS-complete but Linux-partial; audit every AddRole against menuitem_linux.go","Wrap menu construction in a recover during development to get a log instead of a crash","Implement app-specific behaviors (print, find) as explicit items from day one"],"tags":["linux","gtk","menu","role","print","panic","not-implemented"],"backgroundTag":null,"analyzedSha":"0e754b1b40ba9044c2a1460e23b7c3de20fc5cf3","analyzedAt":"2026-08-15T14:17:36.034Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}