Description:
Downloading mods from the built-in Nexus page Files tab silently fails for all mods, all games. The log shows only "Download failed" with no error details and no error popup appears.
Steps to reproduce:
- Set up NexusMods API key (shows valid, premium)
- Right-click any mod → Show Nexus Page → Files tab
- Click the download button on any file
- "Download failed" in log, no error popup
Environment:
- Limo v1.2.2 (Flatpak, Flathub)
- Fedora 43, KDE Wayland
- NexusMods Premium account, API key confirmed working via curl
Root cause (source analysis of v1.2.2):
The Files tab download path in mainwindow.cpp:3244 (onModDownloadRequested) sets info.remote_file_id and info.remote_source but does not set info.remote_request_url — it stays at its default value of "" (importmodinfo.h:63).
In applicationmanager.cpp:938, since remote_request_url is empty, the first branch is taken and getDownloadUrl(remote_source, remote_file_id) is called. This succeeds — the CDN download URL is obtained and stored in info.remote_download_url (line 949).
However, on line 965, Api::initModInfo(info) is called. In api.cpp:339, this function immediately calls nxmUrlIsValid(info.remote_request_url). Since remote_request_url is empty, the regex at api.cpp:377 doesn't match, and initModInfo returns false on line 341 without throwing an exception.
Back in applicationmanager.cpp:966, !(*init_successful) evaluates to true, and downloadFailed() is emitted. Because no exception was thrown, handleExceptionsForFunction never calls sendError, so no error popup is shown — the failure is completely silent.
By contrast, the browser-based "Mod Manager Download" path (mainwindow.cpp:3224) does set info.remote_request_url to the NXM URL, so initModInfo succeeds and the download completes.
Summary: The CDN URL is successfully obtained but the download never executes because initModInfo unconditionally gates on an NXM URL that the Files tab never provides.
Suggested fix:
Add an alternate path at the top of Api::initModInfo for when remote_request_url is empty but remote_source and remote_file_id are already populated:
if(info.remote_request_url.empty() && modUrlIsValid(info.remote_source) && info.remote_file_id >= 0)
{
auto files = getModFiles(info.remote_source);
auto iter = str::find_if(files, [&info](File& f){ return f.file_id == info.remote_file_id; });
if(iter == files.end())
return false;
auto domain_and_mod = extractDomainAndModId(info.remote_source);
if(!domain_and_mod)
return false;
info.remote_mod_id = std::stol((*domain_and_mod).second);
info.remote_file_name = iter->name;
info.remote_file_version = iter->version;
info.remote_type = ImportModInfo::RemoteType::nexus;
return true;
}
Workaround: Use the "Mod Manager Download Link" to open the file in browser, then click "Mod Manager Download" on the NexusMods website. This uses the NXM URL path which works correctly.
Possibly related: #41
Description:
Downloading mods from the built-in Nexus page Files tab silently fails for all mods, all games. The log shows only "Download failed" with no error details and no error popup appears.
Steps to reproduce:
Environment:
Root cause (source analysis of v1.2.2):
The Files tab download path in
mainwindow.cpp:3244(onModDownloadRequested) setsinfo.remote_file_idandinfo.remote_sourcebut does not setinfo.remote_request_url— it stays at its default value of""(importmodinfo.h:63).In
applicationmanager.cpp:938, sinceremote_request_urlis empty, the first branch is taken andgetDownloadUrl(remote_source, remote_file_id)is called. This succeeds — the CDN download URL is obtained and stored ininfo.remote_download_url(line 949).However, on line 965,
Api::initModInfo(info)is called. Inapi.cpp:339, this function immediately callsnxmUrlIsValid(info.remote_request_url). Sinceremote_request_urlis empty, the regex atapi.cpp:377doesn't match, andinitModInforeturnsfalseon line 341 without throwing an exception.Back in
applicationmanager.cpp:966,!(*init_successful)evaluates totrue, anddownloadFailed()is emitted. Because no exception was thrown,handleExceptionsForFunctionnever callssendError, so no error popup is shown — the failure is completely silent.By contrast, the browser-based "Mod Manager Download" path (
mainwindow.cpp:3224) does setinfo.remote_request_urlto the NXM URL, soinitModInfosucceeds and the download completes.Summary: The CDN URL is successfully obtained but the download never executes because
initModInfounconditionally gates on an NXM URL that the Files tab never provides.Suggested fix:
Add an alternate path at the top of
Api::initModInfofor whenremote_request_urlis empty butremote_sourceandremote_file_idare already populated:Workaround: Use the "Mod Manager Download Link" to open the file in browser, then click "Mod Manager Download" on the NexusMods website. This uses the NXM URL path which works correctly.
Possibly related: #41