-
-
Notifications
You must be signed in to change notification settings - Fork 480
Adding to Steam can fail due to error checking that isn't required #2030
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
Comments
I can confirm this issue happens in Windows, since for some reason Steam saves the AppName parameter written as "appName" (lowercase a). The only workaround is manually editing the "shortcuts.vdf" file by replacing "appName" with "AppName" EVERY TIME before adding a game. My programming skills are limited, but I found out that in the file: there is a check in line 172 that tries to make a case insensitive comparison using "toLowerCase", but it somehow fails, maybe the "entry" object stores entries not "Lowercased": HeroicGamesLauncher/src/backend/shortcuts/nonesteamgame/nonesteamgame.ts Lines 172 to 177 in 6a7be0f
entry is stablished earlier at:
Where:
Soit seems to me that the fix would either consist on lowercasing the Someone that is more knowledgeable than me should take a look at it, seems like this could be a quick fix that would hugely improve usage of the Heroic Games Launcher |
Please provide your shortcuts.vdf so i can might can fix that and update our tests. The fix would be to check for |
The fix is to not test it at all, if another entry is (potentially) broken that's not relevant to adding new entry. |
I need the shortcuts.vdf to add this to our test, fix the code till the test passes. If you say you don't need a fix than we can close the issue ? Steam does not tell you. It just acts wierdly. I think it just does not show corrupted entries. Never got any message in steam that one entry is invalid. Btw i wrote this add to steam feature, so i already troubleshoot alot. |
I can confirm that this is a Steam issue, I don't use any third party tools other than Heroic Games Launcher. This might be a Windows-exclusive related issue. You can reproduce this in Windows by following this steps:
No 3rd party tools running. I'll attach 4 versions of
As you can see, Steam replaces all instances of EDIT: formatting |
As I previously mentioned, I think the proper way to handle this isn't to compare with all possible capitalization variations, but to make the check case-insensitive, so if Steam for some reason starts saving it as No need to hardcode all possible variations |
Yes that was the plan. Still i need the shortcut.vdf to still test if it solves the problem and also check if this is the only problem. Else we need to iterate over and over again with you as tester. |
Yes that was the plan. Still i need the shortcut.vdf to still test if it solves the problem and also check if this is the only problem. Else we need to iterate over and over again with you as tester.
I already attached 4 variants of shortcut.vfd in the message right above the one you're answering to. Is that enough?
Edit: Formatting (original response made through email response)
|
You don't need a test at all did you not read what I said? The only place I can agree to test, is if you want to specifically and only validate the single shortcut that just got added to the file, in which case your validating that the data in the file matches what you just added. |
If you know it better you could have fix it by yourself. I troubleshoot alot with this and what steam does, does not apply to what we do. I need the shortcuts.vdf to make sure future code adaption don't break things. Just look closer to the code were we testing our implementation of that future. Atm i just added a case insensitive check without knowing if it breaks something for other people! Also if someone changes the code back to the old implementation the current test will still pass because i have no shortcuts.vdf to test your scenario. Also i never saw steam complaining about a invalid shortcuts.vdf. Atleast in Linux. During the development i had plenty of invalid shortcuts.vdf and steam reported nothing in the frontend. Maybe the log prints something out, but which user looks at steam logs? |
You don't need to be an asshole here. There's plenty of reasons to check a file for corruption before writing new stuff into it. If you really think you know better, you should code your own "Epic Games compatible Launcher". Here you and me are just users reporting an issue, and we can suggest our thoughts on where is the issue, but uunless you're planning on fixing it yourself, I would suggest you being polite to the people that are here to fix the issue. EDIT: |
I fail to see how what your saying is true, the person's reply did not indicate they had read a single word I had actually written. Scenario 1: the shortcuts.vdf is actually really corrupted:
Scenario 2: Heroic thinks shortcut.vdf is corrupted when it actually isn't:
Scenario 3: shortcut.vdf is fine according too Heroic:
In every scenario, not checking for corruption results in a equal or better user experience. where corruption checking makes it worse.
I think you also failed to read my issue report, as I already pointed out that issue, and even provided a sample portion of my shortcuts.vdf file:
|
I understood that. Still you don't see the point of the baseline. Maybe the corruption message is wrong. It should be Btw a corrupted shortcuts.vdf is not resolved by steam if i remember correctly. So a check is also needed to not make the shortcuts.vdf more corrupted by bypassing the check. The endresult is to delete the shortcuts.vdf and start from scratch. You want to avoid that on the user side as much as possible! |
Describe the bug
Trying to add games to steam throws this error in the log
(12:20:30) ERROR: [Shortcuts]: Can't remove "Goat Simulator 3" from Steam user "<redacted>". "C:\Program Files (x86)\Steam\userdata\<redacted>\config\shortcuts.vdf" is corrupted!
One of the game entries is missing the AppName parameter!
the thing is, my shortcuts.vdf isn't corrupt, it just contained an entry like this:
Notice how it has
appName
, but notAppName
orappname
, this is due to the error checking not properly checking case insensitivity.This shortcut does work on steam, so the error checking is at fault here.
IMO, its not really on this program to check for valid VDF entries, it should just add the entry, and possibly warn the user that the shortcuts file is potentially corrupt, and so they might need to go delete the file.
Add logs
(12:20:31) INFO: [Shortcuts]: Prepare Steam images for Goat Simulator 3
(12:20:32) INFO: [Shortcuts]: Prepare Steam images for Goat Simulator 3
(12:20:33) INFO: [Shortcuts]: Prepare Steam images for Goat Simulator 3
(12:20:33) INFO: [Shortcuts]: Prepare Steam images for Goat Simulator 3
(12:20:34) INFO: [Shortcuts]: Prepare Steam images for Goat Simulator 3
(12:20:35) INFO: [Shortcuts]: Prepare Steam images for Goat Simulator 3
(12:20:35) INFO: [Shortcuts]: Prepare Steam images for Goat Simulator 3
(12:20:36) INFO: [Shortcuts]: Prepare Steam images for Goat Simulator 3
(12:20:36) INFO: [Shortcuts]: Prepare Steam images for Goat Simulator 3
(12:20:37) INFO: [Shortcuts]: Prepare Steam images for Goat Simulator 3
(12:20:37) INFO: [Shortcuts]: Prepare Steam images for Goat Simulator 3
(12:20:38) INFO: [Shortcuts]: Prepare Steam images for Goat Simulator 3
(12:20:39) INFO: [Shortcuts]: Prepare Steam images for Goat Simulator 3
(12:20:39) INFO: [Shortcuts]: Prepare Steam images for Goat Simulator 3
(12:20:40) INFO: [Shortcuts]: Prepare Steam images for Goat Simulator 3
(12:20:41) INFO: [Shortcuts]: Prepare Steam images for Goat Simulator 3
(12:20:41) INFO: [Shortcuts]: Prepare Steam images for Goat Simulator 3
(12:20:42) INFO: [Shortcuts]: Prepare Steam images for Goat Simulator 3
(12:20:42) INFO: [Shortcuts]: Prepare Steam images for Goat Simulator 3
(12:20:43) INFO: [Shortcuts]: Prepare Steam images for Goat Simulator 3
(12:20:44) INFO: [Shortcuts]: Prepare Steam images for Goat Simulator 3
(12:20:44) INFO: [Shortcuts]: Prepare Steam images for Goat Simulator 3
(12:20:45) INFO: [Shortcuts]: Prepare Steam images for Goat Simulator 3
(12:20:45) INFO: [Shortcuts]: Prepare Steam images for Goat Simulator 3
(12:20:46) INFO: [Shortcuts]: Prepare Steam images for Goat Simulator 3
(12:20:47) INFO: [Shortcuts]: Prepare Steam images for Goat Simulator 3
(12:20:47) INFO: [Shortcuts]: Prepare Steam images for Goat Simulator 3
(12:20:48) INFO: [Shortcuts]: Prepare Steam images for Goat Simulator 3
(12:20:48) INFO: [Shortcuts]: Prepare Steam images for Goat Simulator 3
(12:20:49) INFO: [Shortcuts]: Prepare Steam images for Goat Simulator 3
(12:20:50) INFO: [Shortcuts]: Prepare Steam images for Goat Simulator 3
(12:20:50) INFO: [Shortcuts]: Prepare Steam images for Goat Simulator 3
(12:20:51) INFO: [Shortcuts]: Prepare Steam images for Goat Simulator 3
(12:20:51) INFO: [Shortcuts]: Prepare Steam images for Goat Simulator 3
(12:20:52) INFO: [Shortcuts]: Prepare Steam images for Goat Simulator 3
(12:20:53) INFO: [Shortcuts]: Prepare Steam images for Goat Simulator 3
(12:20:53) INFO: [Shortcuts]: Prepare Steam images for Goat Simulator 3
(12:20:54) INFO: [Shortcuts]: Prepare Steam images for Goat Simulator 3
(12:20:55) INFO: [Shortcuts]: Prepare Steam images for Goat Simulator 3
(12:20:55) INFO: [Shortcuts]: Prepare Steam images for Goat Simulator 3
(12:20:56) INFO: [Shortcuts]: Prepare Steam images for Goat Simulator 3
(12:20:56) INFO: [Shortcuts]: Prepare Steam images for Goat Simulator 3
(12:20:57) INFO: [Shortcuts]: Prepare Steam images for Goat Simulator 3
(12:20:58) INFO: [Shortcuts]: Prepare Steam images for Goat Simulator 3
(12:20:58) INFO: [Shortcuts]: Prepare Steam images for Goat Simulator 3
(12:20:59) INFO: [Shortcuts]: Prepare Steam images for Goat Simulator 3
(12:20:59) INFO: [Shortcuts]: Prepare Steam images for Goat Simulator 3
(12:21:00) INFO: [Shortcuts]: Prepare Steam images for Goat Simulator 3
(12:21:00) INFO: [Shortcuts]: Prepare Steam images for Goat Simulator 3
(12:21:01) INFO: [Shortcuts]: Prepare Steam images for Goat Simulator 3
(12:21:02) INFO: [Shortcuts]: Prepare Steam images for Goat Simulator 3
(12:21:02) INFO: [Shortcuts]: Prepare Steam images for Goat Simulator 3
(12:21:03) INFO: [Shortcuts]: Prepare Steam images for Goat Simulator 3
(12:21:04) INFO: [Shortcuts]: Prepare Steam images for Goat Simulator 3
(12:21:04) INFO: [Shortcuts]: Prepare Steam images for Goat Simulator 3
(12:21:05) INFO: [Shortcuts]: Prepare Steam images for Goat Simulator 3
(12:21:05) INFO: [Shortcuts]: Prepare Steam images for Goat Simulator 3
(12:21:06) INFO: [Shortcuts]: Prepare Steam images for Goat Simulator 3
(12:21:07) INFO: [Shortcuts]: Prepare Steam images for Goat Simulator 3
(12:21:07) INFO: [Shortcuts]: Prepare Steam images for Goat Simulator 3
(12:21:08) INFO: [Shortcuts]: Prepare Steam images for Goat Simulator 3
(12:21:08) INFO: [Shortcuts]: Prepare Steam images for Goat Simulator 3
(12:21:09) INFO: [Shortcuts]: Prepare Steam images for Goat Simulator 3
(12:21:10) INFO: [Shortcuts]: Prepare Steam images for Goat Simulator 3
(12:21:10) INFO: [Shortcuts]: Prepare Steam images for Goat Simulator 3
(12:21:11) INFO: [Shortcuts]: Prepare Steam images for Goat Simulator 3
(12:21:12) INFO: [Shortcuts]: Prepare Steam images for Goat Simulator 3
(12:21:12) INFO: [Shortcuts]: Prepare Steam images for Goat Simulator 3
(12:21:13) INFO: [Shortcuts]: Prepare Steam images for Goat Simulator 3
(12:21:14) INFO: [Shortcuts]: Prepare Steam images for Goat Simulator 3
(12:21:14) INFO: [Shortcuts]: Prepare Steam images for Goat Simulator 3
(12:21:15) INFO: [Shortcuts]: Prepare Steam images for Goat Simulator 3
(12:21:15) INFO: [Shortcuts]: Prepare Steam images for Goat Simulator 3
(12:21:16) INFO: [Shortcuts]: Prepare Steam images for Goat Simulator 3
(12:21:17) INFO: [Shortcuts]: Prepare Steam images for Goat Simulator 3
(12:21:17) INFO: [Shortcuts]: Prepare Steam images for Goat Simulator 3
(12:21:18) INFO: [Shortcuts]: Prepare Steam images for Goat Simulator 3
(12:21:18) INFO: [Shortcuts]: Prepare Steam images for Goat Simulator 3
(12:21:19) INFO: [Shortcuts]: Prepare Steam images for Goat Simulator 3
(12:21:20) INFO: [Shortcuts]: Prepare Steam images for Goat Simulator 3
(12:21:20) INFO: [Shortcuts]: Prepare Steam images for Goat Simulator 3
(12:21:21) INFO: [Shortcuts]: Prepare Steam images for Goat Simulator 3
(12:21:21) INFO: [Shortcuts]: Prepare Steam images for Goat Simulator 3
(12:21:22) INFO: [Shortcuts]: Prepare Steam images for Goat Simulator 3
(12:21:23) INFO: [Shortcuts]: Prepare Steam images for Goat Simulator 3
(12:21:23) INFO: [Shortcuts]: Prepare Steam images for Goat Simulator 3
(12:21:24) INFO: [Shortcuts]: Prepare Steam images for Goat Simulator 3
(12:21:24) INFO: [Shortcuts]: Prepare Steam images for Goat Simulator 3
(12:21:25) INFO: [Shortcuts]: Prepare Steam images for Goat Simulator 3
(12:21:26) INFO: [Shortcuts]: Prepare Steam images for Goat Simulator 3
(12:21:26) INFO: [Shortcuts]: Prepare Steam images for Goat Simulator 3
(12:21:27) INFO: [Shortcuts]: Prepare Steam images for Goat Simulator 3
(12:21:28) INFO: [Shortcuts]: Prepare Steam images for Goat Simulator 3
(12:21:28) INFO: [Shortcuts]: Prepare Steam images for Goat Simulator 3
(12:21:29) INFO: [Shortcuts]: Prepare Steam images for Goat Simulator 3
(12:21:29) INFO: [Shortcuts]: Prepare Steam images for Goat Simulator 3
(12:21:30) INFO: [Shortcuts]: Prepare Steam images for Goat Simulator 3
(12:21:31) WARNING: [Shortcuts]: Goat Simulator 3 could not be added to all found Steam users.
(12:21:31) ERROR: [Shortcuts]: Can't add "Goat Simulator 3" to Steam user "". "C:\Program Files (x86)\Steam\userdata<steamuserid>\config\shortcuts.vdf" is corrupted!
One of the game entries is missing the AppName parameter!
One of the game entries is missing the AppName parameter!
One of the game entries is missing the AppName parameter!
One of the game entries is missing the AppName parameter!
Steps to reproduce
Add to steam with a "corrupted" shortcuts.vdf
Expected behavior
It should add to my shortcuts.vdf
Screenshots
No response
System Information
Windows 11
Additional information
No response
The text was updated successfully, but these errors were encountered: