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

[TECH] Add more logs and error handling for MW Mod support #1169

Open
wants to merge 12 commits into
base: main
Choose a base branch
from

Conversation

flavioislima
Copy link
Contributor

@flavioislima flavioislima commented Nov 26, 2024

  • Adds a timeout while waiting for the files to be copied to the upper directory, this is necessary since some people are getting stuck forever on this step.
  • Adds some permission checks to the source and destination files.
  • Adds some try/catches to throw errors while extracting, copying, moving files, etc.
  • Adds some tests to the copyRecursiveAsync method.
  • Log more verbosely.
  • Needed to update jest config and dependencies to handle the creating and deleting of files and folders and to deal with the timeout for the method above.

HOW TO TEST

  • Windows only
  • Install Market Wars as usual to see if it will fail or suceed.
  • These changes won't change the logic of the patching, only add error handlers.

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)

@flavioislima flavioislima changed the title [FIX] MW getting stuck on copying files [TECH] Add more logs and error handling for MW Mod support Dec 10, 2024
@flavioislima flavioislima self-assigned this Dec 10, 2024
@flavioislima flavioislima added the PR: Ready-For-Review PR is ready to be reviewed by peers label Dec 10, 2024
…r capturing in prepareBaseGameForModding function
Copy link
Contributor

@jiyuu-jin jiyuu-jin left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@eliobricenov eliobricenov left a comment

Choose a reason for hiding this comment

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

lgtm, I only have one comment

src/backend/utils.ts Outdated Show resolved Hide resolved
@flavioislima flavioislima added the PR: Ready-For-Test PR is ready to be tested by a QA label Dec 10, 2024
src/backend/__tests__/utils.test.ts Outdated Show resolved Hide resolved
src/backend/utils.ts Show resolved Hide resolved
src/backend/__tests__/utils.test.ts Show resolved Hide resolved
Copy link

@nyghtstalker nyghtstalker left a comment

Choose a reason for hiding this comment

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

Confirmed the game is now installed at the correct location and launching.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR: Ready-For-Review PR is ready to be reviewed by peers PR: Ready-For-Test PR is ready to be tested by a QA
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants