Closed StefanLobbenmeier closed 2 years ago
I noticed that in external login, epic.login is called with the whole JSON string: https://github.com/Heroic-Games-Launcher/HeroicGamesLauncher/blob/43c1eaa0d34b5988514430d64da1d64474d8176d/src/screens/Login/components/SIDLogin/index.tsx#L27
But in Embedded Browser Login epic.login is called with a the sid field from the parsed JSON : https://github.com/Heroic-Games-Launcher/HeroicGamesLauncher/blob/6c3c7ce941e182c2cd1ea8581da4c0c4147b7d19/src/screens/WebView/index.tsx#L109
So I think this is an easy fix, external login also needs to parse the JSON and read the sid field instead of providing legendary the whole json. Should also be reproducible on any platform 😄
No, this is working fine. We are destructuring the sid string from the json so it is a string. I wonder if the issue is because you are using a Windows 10 educational.
What might he happening is that the frontend is not updating the login status, did you restart heroic?
Yeah I dont think it is a frontend issue. After restarting heroic I am still logged out, and I also verified with the legendary command in the terminal that legendary is still signed off.
No, this is working fine. We are destructuring the sid string from the json so it is a string.
Please double check, I cannot see any destructuring in the external login flow: https://github.com/Heroic-Games-Launcher/HeroicGamesLauncher/blob/43c1eaa0d34b5988514430d64da1d64474d8176d/src/screens/Login/components/SIDLogin/index.tsx#L27
I can see that you passing the whole JSON object to legendary. If you do this in heroic it will break. If you can read, we only want the sid value which is a string! Please confirm that this bug also happens only with the sid value.
Even legendary asks for the sid value only. Wonder why it is succesfully and thinks your sid is your username?
Ahh you’re absolutely right, it does ask for the Sid number: https://github.com/Heroic-Games-Launcher/HeroicGamesLauncher/blob/1522b3b01aa2ee2e818df19ccc841bbce6c8b4af/public/locales/en/login.json#L10
i Wonder if we can still improve the ux. legendary auth. accepts both the Sid or the full json, is that something we can also consider?
in any case it would be nice if there was an error message instead of the screen closing.
I will close this one, we won't change that and the instructions on legendary clearly say to pass only the SID number. If it works with JSON, nice, but we won't change this now.
We should still consider showing a error in frontend, if login fails.
We should still consider showing a error in frontend, if login fails.
We used to have that. It showed a dialog or a error at the bottom if I'm not mistaken. But after changing the layout probably this stopped working.
Describe the bug
(Log in via the embedded browser works without issues. I logged out to reproduce the bug. But this time I can always reproduce)
When I use External Login to authenticate, it opens my browser, and there I can copy the JSON and paste it to Heroic. It then returns me back to the Manage Accounts Screen without having the account:
Legendary will also complain about missing credentials when I try list-games:
Strangely I can use legendary auth to complete authentication without issues:
Add logs
(23:30:34) DEBUG: [Legendary]: Running Legendary command: C:\Users\Stefan\AppData\Local\Programs\heroic\resources\app.asar.unpacked\build\bin\win32\legendary --version
(23:30:38) INFO: [Legendary]: Legendary location: C:\Users\Stefan\AppData\Local\Programs\heroic\resources\app.asar.unpacked\build\bin\win32\legendary
(23:30:38) INFO: [Gog]: GOGDL location: C:\Users\Stefan\AppData\Local\Programs\heroic\resources\app.asar.unpacked\build\bin\win32\gogdl
(23:30:38) INFO: [Backend]:
Heroic Version: 2.3.10 Brook
Legendary Version: 0.20.27 Dark Energy (hotfix)
OS: Microsoft Windows 10 Education KERNEL: 10.0.19044 ARCH: x64
CPU: Intel Core™ i5-8600K @3.6
RAM: Total: 15.88 GiB Available: 10.3 GiB
GRAPHICS: GPU0: Intel(R) UHD Graphics 630 VRAM: 1024MB DRIVER: GPU1: NVIDIA GeForce RTX 3070 VRAM: 8192MB DRIVER: 516.59
(23:30:38) INFO: [Gog]: Getting data about the user
(23:30:38) WARNING: [Backend]: Protocol already registered.
(23:30:38) INFO: [Gog]: Saved user data to config
(23:30:39) INFO: [Frontend]: Refreshing Library
(23:30:39) INFO: [Legendary]: Refreshing library...
(23:30:39) INFO: [Legendary]: Refreshing Epic Games...
(23:30:39) INFO: [Gog]: Getting GOG library
(23:30:39) INFO: [Gog]: Number of library pages: 1
(23:30:39) INFO: [Gog]: Saved games data
(23:30:39) DEBUG: [Legendary]: Running Legendary command: C:\Users\Stefan\AppData\Local\Programs\heroic\resources\app.asar.unpacked\build\bin\win32\legendary list
(23:30:41) INFO: [Legendary]: Updating game list
(23:30:41) INFO: [Legendary]: Game List Updated
(23:30:41) INFO: [Frontend]: No cache found, getting data from legendary...
(23:30:41) INFO: [Legendary]: Refreshing library...
(23:30:41) INFO: [Legendary]: Updating game list
(23:30:41) INFO: [Legendary]: Game List Updated
(23:30:41) INFO: [Legendary]: Checking for game updates: C:\Users\Stefan\AppData\Local\Programs\heroic\resources\app.asar.unpacked\build\bin\win32\legendary list-installed --check-updates --tsv
(23:30:41) DEBUG: [Legendary]: Running Legendary command: C:\Users\Stefan\AppData\Local\Programs\heroic\resources\app.asar.unpacked\build\bin\win32\legendary list-installed --check-updates --tsv
(23:30:42) INFO: [Legendary]: Logging out: C:\Users\Stefan\AppData\Local\Programs\heroic\resources\app.asar.unpacked\build\bin\win32\legendary auth --delete
(23:30:42) DEBUG: [Legendary]: Running Legendary command: C:\Users\Stefan\AppData\Local\Programs\heroic\resources\app.asar.unpacked\build\bin\win32\legendary auth --delete
(23:30:43) DEBUG: [Legendary]: Running Legendary command: C:\Users\Stefan\AppData\Local\Programs\heroic\resources\app.asar.unpacked\build\bin\win32\legendary cleanup
(23:30:43) INFO: [Frontend]: Refreshing Library
(23:30:43) INFO: [Legendary]: Refreshing library...
(23:30:43) INFO: [Gog]: Getting GOG library
(23:30:43) INFO: [Legendary]: Found 0 game(s) to update
(23:30:43) INFO: [Gog]: Found 0 game(s) to update
(23:30:43) INFO: [Gog]: Number of library pages: 1
(23:30:46) WARNING: [Gog]: Unable to get covers from gamesdb for Spring Sale Goodies Collection #1. Trying to get it from api.gog.com
(23:30:46) WARNING: [Gog]: Couldn't get info from api.gog.com, Using fallback vertical image
(23:30:46) WARNING: [Gog]: Unable to get covers from gamesdb for The Witcher Goodies Collection. Trying to get it from api.gog.com
(23:30:46) WARNING: [Gog]: Couldn't get info from api.gog.com, Using fallback vertical image
(23:30:47) WARNING: [Gog]: Unable to get covers from gamesdb for Wanderlust: Transsiberian. Trying to get it from api.gog.com
(23:30:47) INFO: [Gog]: Saved games data
(23:30:47) INFO: [Frontend]: No cache found, getting data from legendary...
(23:30:47) INFO: [Legendary]: Refreshing library...
(23:30:47) INFO: [Gog]: Found 0 game(s) to update
(23:30:59) INFO: [Legendary]: Logging in with Legendary: C:\Users\Stefan\AppData\Local\Programs\heroic\resources\app.asar.unpacked\build\bin\win32\legendary auth --sid
(23:30:59) DEBUG: [Legendary]: Running Legendary command: C:\Users\Stefan\AppData\Local\Programs\heroic\resources\app.asar.unpacked\build\bin\win32\legendary auth --sid
(23:31:01) INFO: [Frontend]: Refreshing Library
(23:31:01) INFO: [Legendary]: Refreshing library...
(23:31:01) INFO: [Frontend]: Called Login
(23:31:01) INFO: [Frontend]: No cache found, getting data from legendary...
(23:31:01) INFO: [Legendary]: Refreshing library...
Steps to reproduce
Expected behavior
I am logged in
Screenshots
No response
System Information
Additional information
No response