flathub / sh.ppy.osu

https://flathub.org/apps/details/sh.ppy.osu
MIT License
26 stars 15 forks source link

Unhandled error everytime i open the game #170

Open 64ArthurAraujo opened 7 months ago

64ArthurAraujo commented 7 months ago

With this new update, every time i open the game i get the following error:

2024-04-13 12:19:46 [error]: An unhandled error has occurred.
2024-04-13 12:19:46 [error]: System.ComponentModel.Win32Exception (2): An error occurred trying to start process 'xdg-mime' with working directory '/home/arthur'. No such file or directory
2024-04-13 12:19:46 [error]: at System.Diagnostics.Process.ForkAndExecProcess(ProcessStartInfo startInfo, String resolvedFilename, String[] argv, String[] envp, String cwd, Boolean setCredentials, UInt32 userId, UInt32 groupId, UInt32[] groups, Int32& stdinFd, Int32& stdoutFd, Int32& stderrFd, Boolean usesTerminal, Boolean throwOnNoExec)
2024-04-13 12:19:46 [error]: at System.Diagnostics.Process.StartCore(ProcessStartInfo startInfo)
2024-04-13 12:19:46 [error]: at System.Diagnostics.Process.Start(ProcessStartInfo startInfo)
2024-04-13 12:19:46 [error]: at DiscordRPC.Registry.UnixUriSchemeCreator.RegisterMime(String appid)
2024-04-13 12:19:46 [error]: at DiscordRPC.Registry.UnixUriSchemeCreator.RegisterUriScheme(UriSchemeRegister register)
2024-04-13 12:19:46 [error]: at DiscordRPC.Registry.UriSchemeRegister.RegisterUriScheme()
2024-04-13 12:19:46 [error]: at DiscordRPC.DiscordRpcClient.RegisterUriScheme(String steamAppID, String executable)
2024-04-13 12:19:46 [error]: at osu.Desktop.DiscordRichPresence.load() in /home/runner/work/osu-auth-client/osu-auth-client/osu/osu.Desktop/DiscordRichPresence.cs:line 87
2024-04-13 12:19:46 [error]: at osu.Desktop.DiscordRichPresence.<>c.<RegisterForDependencyActivation>b__45_0(Object t, IReadOnlyDependencyContainer d) in /home/runner/work/osu-auth-client/osu-auth-client/osu/osu.Desktop/osu.Framework.SourceGeneration/osu.Framework.SourceGeneration.Generators.Dependencies.DependencyInjectionSourceGenerator/g_osu.Desktop.DiscordRichPresence_Dependencies.cs:line 22
2024-04-13 12:19:46 [error]: at osu.Framework.Allocation.DependencyActivator.<Activate>g__activateRecursively|8_0[T](Object obj, IReadOnlyDependencyContainer dependencies, Type currentType)
2024-04-13 12:19:46 [error]: at osu.Framework.Allocation.DependencyActivator.Activate[T](T obj, IReadOnlyDependencyContainer dependencies)
2024-04-13 12:19:46 [error]: at osu.Framework.Allocation.DependencyContainer.Inject[T](T instance)
2024-04-13 12:19:46 [error]: at osu.Framework.Graphics.Drawable.InjectDependencies(IReadOnlyDependencyContainer dependencies)
2024-04-13 12:19:46 [error]: at osu.Framework.Graphics.Drawable.load(IFrameBasedClock clock, IReadOnlyDependencyContainer dependencies)
2024-04-13 12:19:46 [error]: at osu.Framework.Graphics.Drawable.Load(IFrameBasedClock clock, IReadOnlyDependencyContainer dependencies, Boolean isDirectAsyncContext)
2024-04-13 12:19:46 [error]: at osu.Framework.Graphics.Drawable.LoadFromAsync(IFrameBasedClock clock, IReadOnlyDependencyContainer dependencies, Boolean isDirectAsyncContext)
2024-04-13 12:19:46 [error]: at osu.Framework.Graphics.Containers.CompositeDrawable.loadComponents[TLoadable](List`1 components, IReadOnlyDependencyContainer dependencies, Boolean isDirectAsyncContext, CancellationToken cancellation)
2024-04-13 12:19:46 [error]: at osu.Framework.Graphics.Containers.CompositeDrawable.<>c__DisplayClass13_0`1.<LoadComponentsAsync>b__1()
2024-04-13 12:19:46 [error]: at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
2024-04-13 12:19:46 [error]: --- End of stack trace from previous location ---
2024-04-13 12:19:46 [error]: at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
2024-04-13 12:19:46 [error]: at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)

1713010783.runtime.log

huupoke12 commented 7 months ago

It seems that the DiscordRPC's Scheme Creator is running the command with the home directory as the working directory, and writing to ~/.local/share/applications. While allowing it to access home could work (with --filesystem=home), I'd prefer the game to properly register its MIME and URL for Discord RPC on install rather than directly modifying user directories when running.

TheComputerGuy96 commented 7 months ago

I'd prefer the game to properly register its MIME and URL for Discord RPC on install rather than directly modifying user directories when running.

I guess we could create a separate desktop file just for Discord rich presence or maybe add the required MIME type to the main one (but that may not work when osu! is already open and xdg-mime isn't really functional on Flatpak so that will have to be disabled)

huupoke12 commented 7 months ago

I don't think it is possible for an AppImage alone to register MIME and URL scheme without directly modifying user directories. The user will have to install some kind of AppImage desktop integration program to make it possible. If that's the case, I think it should be mentioned somewhere in the game or the installation documentation.

This thing make me wonder if AppImage is even a good format for this game. It's fine for portable, run-then-forget applications. But I don't think it's suitable for things that have desktop integrations like MIME and URL scheme (and automatic updates).

bdach commented 7 months ago

This thing make me wonder if AppImage is even a good format for this game. It's fine for portable, run-then-forget applications. But I don't think it's suitable for things that have desktop integrations like MIME and URL scheme (and automatic updates).

We are not maintaining fifty builds for fifty distros with whatever the distro maintainers decide to apply on top of the base game and then attempting to track whether all of them are playing fair with respect to game integrity. No other platform/OS plays these games. In that light "portable" is the only viable choice for linux. It's appimage or nothing.

huupoke12 commented 7 months ago

We are not maintaining fifty builds for fifty distros

I'm not saying we should package the game for every distros. That is why Flatpak is created to solve that. I said that to make Flatpak to be considered as the main way to distribute on Linux.