Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Sewer56 opened this issue Sep 18, 2024 · 2 comments
Open

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

Sewer56 opened this issue Sep 18, 2024 · 2 comments
Assignees
Labels
Bug Something isn't working os-linux This affects Linux related code.

Comments

@Sewer56
Copy link
Member

Sewer56 commented Sep 18, 2024

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:

  • xdg-settings set default-url-scheme-handler nxm com.nexusmods.app.desktop ran successfully
  • update-desktop-database /home/g/.local/share/applications ran successfully

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
@Sewer56 Sewer56 added Bug Something isn't working os-linux This affects Linux related code. labels Sep 18, 2024
@Sewer56 Sewer56 self-assigned this Sep 18, 2024
@MattSturgeon
Copy link

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?

@Sewer56
Copy link
Member Author

Sewer56 commented Sep 20, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working os-linux This affects Linux related code.
Projects
Status: No status
Development

No branches or pull requests

2 participants