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
774 stars 43 forks source link

Login Failure on Linux (Nobara 40, KDE Plasma 6.1.1 Wayland) #1756

Closed ItsRogueRen closed 2 weeks ago

ItsRogueRen commented 3 weeks ago

Bug Report

Summary

Unable to log in via web link. Browser opens, login goes through on the website, but the app itself cannot log in after. Browser prompts to choose an app to pen the link with but choosing the appimage does nothing and the app infinitely waits to log in.

Steps to reproduce

(How one can reproduce the issue - this is very important) open the appimage on Linux click log in log in on nexusmods when prompted by the xdg portal, choose the appimage to open the link with

What is the expected behaviour?

(What did you expect to happen instead?) App logs in to your account

Other information

(Logs, screenshots, possible fixes, expected behaviour, etc.)

Log files can be found in these locations:

Please attach both nexusmods.app.main and nexusmods.app.slim log files with the most recent dates.

nexusmods.app.main.00.log nexusmods.app.slim.00.log

I would suggest having a way to log in that doesn't require a separate web browser, just have the login page in the app itself.

EzioTheDeadPoet commented 3 weeks ago

https://nexus-mods.github.io/NexusMods.App/users/faq/#linux this should cover the cause and the fix for your issue.

ItsRogueRen commented 3 weeks ago

https://nexus-mods.github.io/NexusMods.App/users/faq/#linux this should cover the cause and the fix for your issue.

No it does not, I get a new tab after hitting "Authorize", a prompt to allow an app to open the link, and then nothing.

Regardless, having it go through your browser seems needlessly complicated when I could just log in within the app itself.

EzioTheDeadPoet commented 3 weeks ago

What browser are you using ?

erri120 commented 2 weeks ago

According to the logs, the App received the NXM command successfully. It should also be noted that the upcoming version 0.5.3 has fixed multiple login issues on Linux.

RodoMa92 commented 2 weeks ago

Same issue with 0.5.3. No login works again.

RodoMa92 commented 2 weeks ago

https://nexus-mods.github.io/NexusMods.App/users/faq/#linux this should cover the cause and the fix for your issue.

No it does not, I get a new tab after hitting "Authorize", a prompt to allow an app to open the link, and then nothing.

Regardless, having it go through your browser seems needlessly complicated when I could just log in within the app itself.

Yeah, they should really leave a fallback, especially since the NexusMod site itself gives you the actual token to paste in. Not sure why it hasn't really be considered to add a box where you would be able to paste the token or even login manually directly in the app at this point.

RodoMa92 commented 2 weeks ago

Already found one bug: You don't update the link inside nexusmods-app-nxm.desktop in case the path of the AppImage changes (Like when using GearLevel, which will add a version crc for tracking versions in the AppName). But even manually updating it and pointing to the new appimage file the login still fails, so there is still another problem in the login flow.

Logs look clean but no data comes back to the app:

00:00:05.169 [INFO] (NexusMods.CrossPlatform.Process.ProcessFactory) Command `xdg-settings set default-url-scheme-handler nxm com.nexusmods.app.desktop` finished after 4.364711 seconds with exit Code 0
00:00:05.941 [INFO] (NexusMods.App.UI.Controls.TopBar.TopBarViewModel) Logging into Nexus Mods
00:00:05.958 [INFO] (NexusMods.CrossPlatform.Process.ProcessFactory) Executing command `xdg-open "https://users.nexusmods.com/oauth/authorize?privatestuff`
00:00:05.977 [DEBUG] (NexusMods.App.UI.InjectedViewLocator) Finding View for NexusMods.App.UI.Overlays.Login.NexusLoginOverlayViewModel
00:00:05.984 [INFO] (Avalonia.ReactiveUI.ViewModelViewHost) Ready to show NexusMods.App.UI.Overlays.Login.NexusLoginOverlayView with autowired NexusMods.App.UI.Overlays.Login.NexusLoginOverlayViewModel.
00:01:01.555 [DEBUG] (NexusMods.MnemonicDB.Storage.DatomStore) Tx:10000000000000E (2 datoms, 521 B) prepared in 4ms, written in 0ms
00:01:01.618 [DEBUG] (Microsoft.Extensions.Hosting.Internal.Host) Hosting stopping
00:01:01.618 [INFO] (Microsoft.Hosting.Lifetime) Application is shutting down...
00:01:01.619 [INFO] (NexusMods.SingleProcess.CliServer) TCP listener was cancelled, stopping
00:01:01.620 [DEBUG] (Microsoft.Extensions.Hosting.Internal.Host) Hosting stopped
erri120 commented 2 weeks ago

Already found one bug: You don't update the link inside nexusmods-app-nxm.desktop in case the path of the AppImage changes (Like when using GearLevel, which will add a version crc for tracking versions in the AppName). But even manually updating it and pointing to the new appimage file the login still fails, so there is still another problem in the login flow.

You should remove previous .desktop files and revert manual changes. 0.5.3 creates com.nexusmods.app.desktop for you and sets it as the default URL scheme handler for nxm:// links. Your browser might have some stuff cached, so try to restart your browser.

You can verify that the NXM handler is registered correctly by using xdg-open nxm://something.

RodoMa92 commented 2 weeks ago

On Firefox nothing makes it work correctly. Copy pasting the link on ungoogled chromium finally made it fire correctly. Still, you should add a fallback if logging in is so fragile.

EzioTheDeadPoet commented 2 weeks ago

this is a Firefox issue most likely and the explanation and fix is in the FAQ.

RodoMa92 commented 2 weeks ago

this is a Firefox issue most likely and the explanation and fix is in the FAQ.

Yep, already did. Still not working even following the FAQ, sadly.

RodoMa92 commented 2 weeks ago

Yep, it seems that firefox flatpak has issues with links. xdg-portal doesn't work. Switched to Librewolf and it works 100% fine. Good for me, since I was in the process of switching anyway.

erri120 commented 2 weeks ago

Yep, it seems that firefox flatpak has issues with links. xdg-portal doesn't work. Switched to Librewolf and it works 100% fine. Good for me, since I was in the process of switching anyway.

That's odd, but glad you got it working.

@ItsRogueRen the issue should be fixed with the latest version. If you still have issues, you can re-open the issue.

ItsRogueRen commented 2 weeks ago

Appimage fails to open at all now, no error or anything.

This may be an appimage issue, unless it has its own built-in updater appimages are extremely annoying to update if you use a tool to add them to your app menu (vs flatpak, snaps, or a native package like deb or rpm).

erri120 commented 2 weeks ago

Appimage fails to open at all now, no error or anything.

We don't have a migration process in place yet, so you need to clean your existing data.