Nexus-Mods / NexusMods.App

Home of the development of the Nexus Mods App
https://nexus-mods.github.io/NexusMods.App/
GNU General Public License v3.0
1.08k stars 50 forks source link

[User Reported] NXM Handler Not Working [Missing Working Dir?] #2056

Open Sewer56 opened 2 months ago

Sewer56 commented 2 months ago

Bug Report

Summary

Yesterday during load order meeting, a user reported an issue on the Discord server, whereby their login was not fully working.

After some back and forth, post meeting; it seems the following is true:

At least according to log.

In other words, all is good, but the user's web browser isn't booting the App.

Steps to reproduce

I cannot currently reproduce this on my machine, although I run the same Linux distro as the user. The user was also running archive install, not AppImage, which isn't as commonly used/tested.

However I have a possible theory; when I asked the user to run

/home/g/Desktop/Nexus\ mod\ app/mog\ manager/NexusMods.App-0.6.0-1.linux-x64/NexusMods.App

Which was derived from the user's .desktop file, the App failed to start. When I asked them to change the current working directory to the App folder, i.e.

/home/g/Desktop/Nexus\ mod\ app/mog\ manager/NexusMods.App-0.6.0-1.linux-x64

The App successfully booted.

I suspect there's a possibility that the user's web browser is not setting the working directory of the App to the App folder. Since some browsers don't delegate to xdg-open.

The XDG .desktop specification does not mention the default working directory anywhere in the specification (I tried Ctrl+F and skimming through it). So if the Path field is not specified, there's a chance the working directory is defaulting to ~ instead.

Some more investigation is needed, I had limited time. I want to test my theory by providing a user with a patched build that explicitly sets working directory first, before doing additional investigation; just in case I'm right.

[!NOTE]
I forgot to ask the user to test xdg-open nxm:// at the time.

But I believe we should set a working directory nonetheless.

What is the expected behaviour?

Login should work.

Other information

User distro is CachyOS, same as mine.

The user's log file:

nexusmods.app.main.current.log

User's .desktop entry:

[Desktop Entry]
Type=Application
Version=1.0
Name=Nexus Mods App
GenericName=Mod Manager
Comment=Mod Manager for your games
Categories=Game
Terminal=false
Icon=com.nexusmods.app
Exec=/home/g/Desktop/Nexus\ mod\ app/mog\ manager/NexusMods.App-0.6.0-1.linux-x64/NexusMods.App %u
TryExec=/home/g/Desktop/Nexus\ mod\ app/mog\ manager/NexusMods.App-0.6.0-1.linux-x64/NexusMods.App
X-AppImage-Integrate=true
X-AppImage-Name=NexusMods.App
X-AppImage-Arch=x86_64
MimeType=x-scheme-handler/nxm;x-scheme-handler/nxm
MattSturgeon commented 2 months ago

Closing this because it didn't solve the user end-issue. Turns out they're running AppImage, but our logs said 'Archive'. I'll talk and look into that a bit more. https://github.com/Nexus-Mods/NexusMods.App/pull/2057#issuecomment-2358947434

Do you set the APPIMAGE env var to the exe's file path? May be unrelated, but I believe that is (or was?) required for some things to work correctly when running the appimage build?

Sewer56 commented 2 months ago

Closing this because it didn't solve the user end-issue. Turns out they're running AppImage, but our logs said 'Archive'. I'll talk and look into that a bit more. #2057 (comment)

Do you set the APPIMAGE env var to the exe's file path? May be unrelated, but I believe that is (or was?) required for some things to work correctly when running the appimage build?

The user actually tested both AppImage and Archive in the end. I'm not exactly sure where the problem lies myself. Only a few questions left to answer, but sometimes I need to wait a little while for a response.

LukeNexusMods commented 1 month ago

@erri120 Is this fixed?