mtkennerly / ludusavi-manifest

Backup info for PC game saves
MIT License
70 stars 13 forks source link

Automatic import fails #22

Closed Lucki closed 1 year ago

Lucki commented 1 year ago

Sorry if you're already aware of this. I noticed that my changes to the Wiki didn't show up in Ludusavi.

The automatic import seems to fail currently: https://github.com/mtkennerly/ludusavi-manifest/actions/workflows/import.yaml

Error log ~~~ […] Steam: 1969080 Steam: 2215540 WARNING: unknown template type 'undefined' from: '"\\Saved Games}}"' Steam: 817628 /home/runner/work/ludusavi-manifest/ludusavi-manifest/src/manifest.ts:94 if (appInfo.installDir !== undefined) { ^ TypeError: Cannot read properties of undefined (reading 'installDir') at integrateSteamData (/home/runner/work/ludusavi-manifest/ludusavi-manifest/src/manifest.ts:94:17) at ManifestFile. (/home/runner/work/ludusavi-manifest/ludusavi-manifest/src/manifest.ts:219:17) at step (/home/runner/work/ludusavi-manifest/ludusavi-manifest/src/manifest.ts:46:23) at Object.next (/home/runner/work/ludusavi-manifest/ludusavi-manifest/src/manifest.ts:27:53) at fulfilled (/home/runner/work/ludusavi-manifest/ludusavi-manifest/src/manifest.ts:18:58) Error: Process completed with exit code 1. ~~~

I'm not entirely able to track down the cause for this. Possible things:

List of changes on the 21. of February ![Screenshot 2023-03-01 at 13-09-22 Recent changes - PCGamingWiki PCGW - bugs fixes crashes mods guides and improvements for every PC game](https://user-images.githubusercontent.com/1408843/222137763-ae6cd894-c421-415c-b358-659b025de4ea.jpg)
mtkennerly commented 1 year ago

Thanks for reporting this! I hadn't realized it was failing. It's fixed now.

It could be that the nonexistence of appId 817628 messes with the code.

Yeah, that was the issue. I'm surprised that TypeScript didn't catch it, since getAppInfo returns Promise<SteamGameCache[""] | undefined>, but it seems to ignore the undefined branch. Maybe I just need to update the TypeScript version.

Lucki commented 1 year ago

I'm surprised that TypeScript didn't catch it

Indeed, at a quick glance it seems obvious.

It's fixed now.

Thanks :+1: