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

GraphQL sizeInBytes field for mod file fragments sometimes doesn't contain a value #2709

Open
RedRanger14 opened this issue Feb 24, 2025 · 3 comments
Labels
Failed QA Did not pass QA process, required fixes will be in comments

Comments

@RedRanger14
Copy link

Bug Report

Summary

Some mods are showing incorrect file sizes for the mods. They are showing as 0 Bytes

Steps to reproduce

  1. Add the collection "Stardew Valley Artisan Valley Expand"
  2. View the file sizes on the mods

Some are showing as 0 e.g. Animated Food and Drinks

What is the expected behaviour?

File sizes should match what they are on the website

Other information

Image

Log files can be found in these locations:

nexusmods.app.main.current.log
nexusmods.app.slim.current.log

  • 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.

@RedRanger14 RedRanger14 added Bug Failed QA Did not pass QA process, required fixes will be in comments labels Feb 24, 2025
@RedRanger14 RedRanger14 added this to MVP Feb 24, 2025
@erri120
Copy link
Member

erri120 commented Feb 24, 2025

The Nexus Mods API actually sends us this value. You can see the issue also appears on the site itself:

Image

@erri120 erri120 changed the title Stardew Valley - Some mod file sizes are showing as 0B when they are not - e.g. Animated Food and Drinks GraphQL sizeInBytes field for mod file fragments sometimes doesn't contain a value Feb 24, 2025
@erri120
Copy link
Member

erri120 commented Feb 24, 2025

I think this was raised before, not sure if we already have an issue for this, but this an issue with the GraphQL API. We're requesting the mod file details, including sizeInBytes when querying for collection revision info:

For some reason we don't get back a value and just save 0:

if (ulong.TryParse(modFileFragment.SizeInBytes, out var size))
{
nexusFileResolver.Add(NexusModsFileMetadata.Size, Size.From(size));
}
else
{
Debug.WriteLine($"Unable to parse `{modFileFragment.SizeInBytes}` as bytes for Uid `{modFileFragment.Uid}`");
nexusFileResolver.Add(NexusModsFileMetadata.Size, Size.Zero);
}

See issue #644 on the API repo.

@Pickysaurus
Copy link
Contributor

We might be able to fall back to size * 1000 as that always seems to populate.

@Pickysaurus Pickysaurus removed the Bug label Feb 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Failed QA Did not pass QA process, required fixes will be in comments
Projects
Status: No status
Development

No branches or pull requests

3 participants