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

[Fix] Ensure manifest in install info #3508

Merged
merged 3 commits into from
Feb 4, 2024
Merged

Conversation

arielj
Copy link
Collaborator

@arielj arielj commented Feb 3, 2024

When getting the install info for legendary games, it sometimes happens that we have invalid data cached that doesn't have manifest info.

In the past that lead to the InstallDialog to be stuck fetching the install info forever, with the latest changes for the gogdl_refactor that produces a javascript exception killing the react app: Error: Cannot use 'in' operator to search for 'perLangSize' in null]

This PR addresses that with 3 changes:

  • if the cached information for legendary does NOT have a manifest property, it doesn't use the cache and fetches a new one
  • if the result of fetching the info does not have a manifest property, it's retried up to 3 times
  • if the result of fetching the info does not have a manifest property after the retries, it throws an error instead of storing the wrong data

I had to do some changes in the parameters to be able to support different extra params for the different stores.

I understand this fixes #3249


Use the following Checklist if you have changed something on the Backend or Frontend:

  • Tested the feature and it's working on a current and clean install.
  • Tested the main App features and they are still working on a current and clean install. (Login, Install, Play, Uninstall, Move games, etc.)
  • Created / Updated Tests (If necessary)
  • Created / Updated documentation (If necessary)

@arielj arielj added the pr:ready-for-review Feature-complete, ready for the grind! :P label Feb 3, 2024
@arielj arielj requested review from a team, flavioislima, CommandMC, Etaash-mathamsetty, Nocccer and imLinguin and removed request for a team February 3, 2024 03:38
].getInstallInfo(element.params.appName, element.params.platformToInstall, {
branch: element.params.branch,
build: element.params.build
})
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

branch and build are not in an optional options 3rd argument for gog

@@ -73,7 +68,7 @@ export function addNewApp({

/* eslint-disable @typescript-eslint/no-unused-vars */

export function installState(appName: string, state: boolean) {
export function installState() {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we don't need the arguments in this functions because we don't use them

removing to avoid importing types we don't need

@arielj arielj added this to the 2.13.0 milestone Feb 4, 2024
@flavioislima flavioislima modified the milestone: 2.13.0 Feb 4, 2024
Copy link
Member

@flavioislima flavioislima left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@arielj arielj merged commit 979725a into main Feb 4, 2024
@arielj arielj deleted the ensure-manifest-in-install-info branch February 4, 2024 16:47
@Heroic-Games-Launcher Heroic-Games-Launcher locked and limited conversation to collaborators Feb 4, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
pr:ready-for-review Feature-complete, ready for the grind! :P
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Stuck at getting download/install size for Epic Games titles
2 participants