{"record":{"id":"cfdf2e9bd3efc761","repo":"rocksdanister/lively","slug":"program-wallpaper-on-msix-package-not-allowed","errorCode":null,"errorMessage":"Program wallpaper on MSIX package not allowed.","messagePattern":"Program wallpaper on MSIX package not allowed\\.","errorType":"exception","errorClass":"MsixNotAllowedException","httpStatus":null,"severity":"error","filePath":"src/Lively/Lively/Factories/WallpaperPluginFactory.cs","lineNumber":163,"sourceCode":"                            return new VideoMpvPlayer(model.FilePath,\n                                model,\n                                display,\n                                lpFactory.CreateLivelyPropertyFolder(model, display, arrangement, userSettings),\n                                userSettings.Settings.VideoPlayerHwAccel,\n                                isWindowed: isWindowed,\n                                userSettings.Settings.VideoTargetColorSpaceMode);\n                        case LivelyPicturePlayer.wmf:\n                            return new VideoWmfProcess(model.FilePath, model, display, 0, userSettings.Settings.WallpaperScaling);\n                    }\n                    break;\n                case WallpaperType.app:\n                case WallpaperType.bizhawk:\n                case WallpaperType.unity:\n                case WallpaperType.unityaudio:\n                case WallpaperType.godot:\n                    if (PackageUtil.IsRunningAsPackaged)\n                    {\n                        throw new MsixNotAllowedException(\"Program wallpaper on MSIX package not allowed.\");\n                    }\n                    else\n                    {\n                        return new ExtPrograms(model.FilePath, model, display,\n                          userSettings.Settings.WallpaperWaitTime);\n                    }\n                case WallpaperType.videostream:\n                    if (File.Exists(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, \"plugins\", \"mpv\", \"youtube-dl.exe\")))\n                    {\n                        return new VideoMpvPlayer(model.FilePath,\n                            model,\n                            display,\n                            lpFactory.CreateLivelyPropertyFolder(model, display, arrangement, userSettings),\n                            userSettings.Settings.VideoPlayerHwAccel,\n                            isWindowed: isWindowed,\n                            userSettings.Settings.VideoTargetColorSpaceMode,\n                            userSettings.Settings.StreamQuality);\n                    }","sourceCodeStart":145,"sourceCodeEnd":181,"githubUrl":"https://github.com/rocksdanister/lively/blob/c1036feb664960722e34bf4309042c247d6a909d/src/Lively/Lively/Factories/WallpaperPluginFactory.cs#L145-L181","documentation":"Thrown by CreateWallpaper for WallpaperType.app, bizhawk, unity, unityaudio, or godot when PackageUtil.IsRunningAsPackaged is true. MSIX installs run inside an AppContainer sandbox that forbids launching arbitrary external .exe wallpapers, so the factory refuses to start them. The gate is by install/packaging type, not by Windows version.","triggerScenarios":"CreateWallpaper called with model.LivelyInfo.Type one of {app, bizhawk, unity, unityaudio, godot} on a build registered as an MSIX package (PackageUtil.IsRunningAsPackaged == true).","commonSituations":"User installed Lively from the Microsoft Store (MSIX) and tried to set a Unity/Godot/bizhawk or custom .exe wallpaper. Sideloading an .msix bundle hits the same path. The desktop (Inno) build never throws this.","solutions":["Install the classic non-MSIX desktop build of Lively to run program wallpapers.","If shipping the MSIX build, disable the 'add program wallpaper' UI when PackageUtil.IsRunningAsPackaged and show an explanatory message.","For Unity/Godot wallpapers, repackage them as web wallpapers instead."],"exampleFix":"// before\nif (PackageUtil.IsRunningAsPackaged)\n    throw new MsixNotAllowedException(\"Program wallpaper on MSIX package not allowed.\");\n\n// after: surface the limitation in the UI before the user picks the file\nif (PackageUtil.IsRunningAsPackaged)\n{\n    DialogService.Warn(Properties.Resources.MsixProgramWallpaperUnsupported);\n    return null;\n}","handlingStrategy":"validation","validationCode":"static bool IsProgramWallpaperAllowed(LibraryModel model) =>\n    !(PackageUtil.IsRunningAsPackaged &&\n      (model.LivelyInfo.Type == WallpaperType.app ||\n       model.LivelyInfo.Type == WallpaperType.bizhawk ||\n       model.LivelyInfo.Type == WallpaperType.unity ||\n       model.LivelyInfo.Type == WallpaperType.unityaudio ||\n       model.LivelyInfo.Type == WallpaperType.godot));\n\n// use before creating:\nif (!IsProgramWallpaperAllowed(model))\n    DialogService.Warn(Properties.Resources.MsixProgramWallpaperUnsupported);","typeGuard":"static bool IsProgramWallpaperType(LibraryModel m) =>\n    m.LivelyInfo.Type is WallpaperType.app or WallpaperType.bizhawk\n        or WallpaperType.unity or WallpaperType.unityaudio or WallpaperType.godot;","tryCatchPattern":"try\n{\n    var wp = factory.CreateWallpaper(model, display, arrangement);\n}\ncatch (WallpaperPluginFactory.MsixNotAllowedException ex)\n{\n    Logger.Warn(ex);\n    DialogService.Warn(\"Program wallpapers are not supported in the Store (MSIX) build.\");\n}","preventionTips":["Disable program-wallpaper entry points in the UI whenever PackageUtil.IsRunningAsPackaged is true.","Document in the Store listing that program wallpapers require the desktop build.","Unit-test the factory with a fake PackageUtil to assert the throw on MSIX and a return on desktop."],"tags":["wallpaper","msix","sandbox","packaging","csharp"],"backgroundTag":null,"analyzedSha":"c1036feb664960722e34bf4309042c247d6a909d","analyzedAt":"2026-08-13T13:03:12.648Z","schemaVersion":2},"datasetVersion":"2026-08-13T14:17:21.547Z"}