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

Stardew Valley - Multiple installs of SMAPI cause unexpected diagnostics #1672

Closed
Pickysaurus opened this issue Jun 24, 2024 · 1 comment · Fixed by #1674
Closed

Stardew Valley - Multiple installs of SMAPI cause unexpected diagnostics #1672

Pickysaurus opened this issue Jun 24, 2024 · 1 comment · Fixed by #1674
Assignees
Labels
Bug Something isn't working Epic: Diagnostics This is related to the Diagnostic System

Comments

@Pickysaurus
Copy link
Contributor

Bug Report

Summary

When multiple versions of SMAPI are installed to the same loadout, a Health Check message starts to behave unexpectedly.

If you have two SMAPIs installed (e.g. v3 and v4) but have disabled the older one, the app will report that SMAPI is disabled, even though there is a build of SMAPI enabled in the loadout.

Steps to reproduce

  1. Install SMAPI twice (see screenshot)
  2. Disable one of the SMAPIs
  3. See the diagnostic message

What is the expected behaviour?

(What did you expect to happen instead?)

Other information

image
Log files can be found in these locations:

  • Windows: %LOCALAPPDATA%\NexusMods.App\Logs
  • Linux: ~/.local/state/NexusMods.App/Logs

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

@Pickysaurus Pickysaurus added the Bug Something isn't working label Jun 24, 2024
@erri120
Copy link
Member

erri120 commented Jun 24, 2024

Issue comes from using the same result from checking if SMAPI is installed, for checking if SMAPI is disabled. Relevant code:

var optionalSmapiMod = loadout.GetFirstModWithMetadata(SMAPIMarker.Version, onlyEnabledMods: false);
if (!optionalSmapiMod.HasValue)
{
yield return Diagnostics.CreateSMAPIRequiredButNotInstalled(
ModCount: smapiModCount,
NexusModsSMAPIUri: Helpers.SMAPILink
);
yield break;
}
var smapiMod = optionalSmapiMod.Value.Item1;
if (!smapiMod.Enabled)
{
yield return Diagnostics.CreateSMAPIRequiredButDisabled(
ModCount: smapiModCount
);
}

Solution is getting the first enabled SMAPI mod.

@erri120 erri120 self-assigned this Jun 24, 2024
@erri120 erri120 added the Epic: Diagnostics This is related to the Diagnostic System label Jun 24, 2024
erri120 added a commit to erri120/NexusMods.App that referenced this issue Jun 24, 2024
erri120 added a commit to erri120/NexusMods.App that referenced this issue Jun 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working Epic: Diagnostics This is related to the Diagnostic System
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants