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

GameHub fails to download installers from Humble Bundle Trove #329

Closed
IanTrudel opened this issue Dec 26, 2019 · 17 comments
Closed

GameHub fails to download installers from Humble Bundle Trove #329

IanTrudel opened this issue Dec 26, 2019 · 17 comments

Comments

@IanTrudel
Copy link

Expected behavior

Download and install Humble Bundle Trove games.

Actual behavior

Fail to find the installers. It says "impossible to obtain a link to download on Trove. Please check that your monthly subscription is active."

My monthly subscription is indeed active. Perhaps this is due to the change from Humble Bundle Monthly to Humble Bundle Choice?

@tkashkin
Copy link
Owner

Try to run GameHub with --debug --verbose args and see if there's something wrong.

Trove page format seems to be same as before, but https://humblebundle.com/trove now redirects to https://humblebundle.com/subscription/trove which may cause problems. However it works fine if Trove games are loaded and shown.

@IanTrudel
Copy link
Author

IanTrudel commented Dec 26, 2019

Hi @tkashkin ,

Here is an example where I am trying to download Tokyo 42 from Humble Bundle Trove. Interestingly, the last URL found by GameHub is working from a web browser.

[DEBUG]  [Database.migrate] Latest db version: 9, current: 9
[DEBUG]  [WineWrap] Updating index
[DEBUG]  [DOSBox.init] ProjectConfig.DATADIR: '/usr/share'
[DEBUG]  [DOSBox.init] user_data_dir: '/home/ian/.local/share'
[DEBUG]  [DOSBox.init] system_data_dir: '/home/ian/.local/share/flatpak/exports/share/'
[DEBUG]  [DOSBox.init] system_data_dir: '/var/lib/flatpak/exports/share/'
[DEBUG]  [DOSBox.init] system_data_dir: '/usr/local/share/'
[DEBUG]  [DOSBox.init] system_data_dir: '/usr/share/'
[DEBUG]  [DOSBox.init] data_dirs: {'/usr/share/com.github.tkashkin.gamehub/compat/dosbox', '/home/ian/.local/share/com.github.tkashkin.gamehub/compat/dosbox', '/home/ian/.local/share/flatpak/exports/share/com.github.tkashkin.gamehub/compat/dosbox', '/var/lib/flatpak/exports/share/com.github.tkashkin.gamehub/compat/dosbox', '/usr/local/share/com.github.tkashkin.gamehub/compat/dosbox'}
[DEBUG]  [DOSBox.init] Config directory: '/usr/share/com.github.tkashkin.gamehub/compat/dosbox'
[DEBUG]  [DOSBox.init] Config: '/usr/share/com.github.tkashkin.gamehub/compat/dosbox/windowed.conf'; description: 'Disable fullscreen'; enabled: true
[INFO]   - GameHub
[INFO]       Version: 0.15.0-8a88b07-master
[INFO]       Branch:  master
[INFO]       Commit:  8a88b0796857fa6c30bca4eabd7da44e192cf1ad
[INFO]   - Environment
[INFO]       Distro:  CentOS Linux release 7.7.1908 (Core)
[INFO]       DE:      GNOME-Classic:GNOME
[INFO]       GTK:     3.22.30
[INFO]       Themes:  Numix | Numix
[DEBUG]  [WineWrap] Index updated
[DEBUG]  [GOG] Loading games: page 1 of 1
[DEBUG]  [GOG] Imported tag: COMPLETED (468165616)
[DEBUG]  [GOG] Imported tag: NEXT TO PLAY (468165613)
[DEBUG]  [GOG] Imported tag: BACKLOG (468165610)
[DEBUG]  [GOG] Imported tag: FAVORITE (468165607)
[DEBUG]  [Merge] Merging GOG games
[DEBUG]  [Merge] Merging Humble Bundle games
[DEBUG]  [Merge] Merging Humble Trove games
[DEBUG]  [Merge] Merging Jeux de l'utilisateur games
[DEBUG]  [Trove.sign_url] 'tokyo42_windows':'tokyo42_windows.zip' -> 'https://dl.humble.com/tokyo42_windows.zip?key=<...>'
[DEBUG]  [HumbleGame.Installer.update_url] Old URL: 'humble-trove-unsigned://tokyo42_windows/_gh_dl_/tokyo42_windows.zip'; (humble-trove:tokyo42_trove)
[DEBUG]  [HumbleGame.Installer.update_url] New URL: 'https://dl.humble.com/tokyo42_windows.zip?key=<...>'; (humble-trove:tokyo42_trove)
[DEBUG]  [Trove.sign_url] 'tokyo42_windows':'tokyo42_windows.zip' -> 'https://dl.humble.com/tokyo42_windows.zip?key=<...>'
[DEBUG]  [HumbleGame.Installer.update_url] Old URL: 'humble-trove-unsigned://tokyo42_windows/_gh_dl_/tokyo42_windows.zip'; (humble-trove:tokyo42_trove)
[DEBUG]  [HumbleGame.Installer.update_url] New URL: 'https://dl.humble.com/tokyo42_windows.zip?key=<...>'; (humble-trove:tokyo42_trove)

@tkashkin
Copy link
Owner

Looks like it's an issue with humble access tokens again. See #32 and #9. I'm not sure how to fix that.

Try #32 (comment) to see if there's something wrong while saving token.

@IanTrudel
Copy link
Author

IanTrudel commented Dec 26, 2019

Take a look at these two logs. The first one with --log-auth and the second one with --log-auth and relogin to Humble Bundle. Trove games are not listed after relogin and it requires restarting GameHub to have them load again.

--log-auth

[DEBUG]  [Database.migrate] Latest db version: 9, current: 9
[DEBUG]  [WineWrap] Updating index
[DEBUG]  [DOSBox.init] ProjectConfig.DATADIR: '/usr/share'
[DEBUG]  [DOSBox.init] user_data_dir: '/home/ian/.local/share'
[DEBUG]  [DOSBox.init] system_data_dir: '/home/ian/.local/share/flatpak/exports/share/'
[DEBUG]  [DOSBox.init] system_data_dir: '/var/lib/flatpak/exports/share/'
[DEBUG]  [DOSBox.init] system_data_dir: '/usr/local/share/'
[DEBUG]  [DOSBox.init] system_data_dir: '/usr/share/'
[DEBUG]  [DOSBox.init] data_dirs: {'/usr/share/com.github.tkashkin.gamehub/compat/dosbox', '/home/ian/.local/share/com.github.tkashkin.gamehub/compat/dosbox', '/home/ian/.local/share/flatpak/exports/share/com.github.tkashkin.gamehub/compat/dosbox', '/var/lib/flatpak/exports/share/com.github.tkashkin.gamehub/compat/dosbox', '/usr/local/share/com.github.tkashkin.gamehub/compat/dosbox'}
[DEBUG]  [DOSBox.init] Config directory: '/usr/share/com.github.tkashkin.gamehub/compat/dosbox'
[DEBUG]  [DOSBox.init] Config: '/usr/share/com.github.tkashkin.gamehub/compat/dosbox/windowed.conf'; description: 'Disable fullscreen'; enabled: true
[INFO]   - GameHub
[INFO]       Version: 0.15.0-8a88b07-master
[INFO]       Branch:  master
[INFO]       Commit:  8a88b0796857fa6c30bca4eabd7da44e192cf1ad
[INFO]   - Environment
[INFO]       Distro:  CentOS Linux release 7.7.1908 (Core)
[INFO]       DE:      GNOME-Classic:GNOME
[INFO]       GTK:     3.22.30
[INFO]       Themes:  Numix | Numix
[DEBUG]  [Auth] Refreshing GOG access token with refresh token: <...>
[DEBUG]  [Auth] GOG access token: <...>
[DEBUG]  [Auth] GOG refresh token: <...>
[DEBUG]  [Auth] GOG user id: <...>
[DEBUG]  [WineWrap] Index updated
[DEBUG]  [Humble.escaped_cookie] Unescaped: <...>
[DEBUG]  [Humble.escaped_cookie] Escaped:   _simpleauth_sess="<...>";
[DEBUG]  [Humble.escaped_cookie] Unescaped: <...>
[DEBUG]  [Humble.escaped_cookie] Escaped:   _simpleauth_sess="<...>";
[DEBUG]  [GOG] Loading games: page 1 of 1
[DEBUG]  [GOG] Imported tag: COMPLETED (468165616)
[DEBUG]  [GOG] Imported tag: NEXT TO PLAY (468165613)
[DEBUG]  [GOG] Imported tag: BACKLOG (468165610)
[DEBUG]  [GOG] Imported tag: FAVORITE (468165607)
[DEBUG]  [Merge] Merging GOG games
[DEBUG]  [Merge] Merging Humble Bundle games
[DEBUG]  [Merge] Merging Humble Trove games
[DEBUG]  [Merge] Merging Jeux de l'utilisateur games
[DEBUG]  [Humble.escaped_cookie] Unescaped: <...>
[DEBUG]  [Humble.escaped_cookie] Escaped:   _simpleauth_sess="<...>";
[DEBUG]  [Trove.sign_url] 'tokyo42_windows':'tokyo42_windows.zip' -> 'https://dl.humble.com/tokyo42_windows.zip?key=<...>'
[DEBUG]  [HumbleGame.Installer.update_url] Old URL: 'humble-trove-unsigned://tokyo42_windows/_gh_dl_/tokyo42_windows.zip'; (humble-trove:tokyo42_trove)
[DEBUG]  [HumbleGame.Installer.update_url] New URL: 'https://dl.humble.com/tokyo42_windows.zip?key=<...>'; (humble-trove:tokyo42_trove)
[DEBUG]  [Humble.escaped_cookie] Unescaped: <...>
[DEBUG]  [Humble.escaped_cookie] Escaped:   _simpleauth_sess="<...>";
[DEBUG]  [Trove.sign_url] 'tokyo42_windows':'tokyo42_windows.zip' -> 'https://dl.humble.com/tokyo42_windows.zip?key=<...>'
[DEBUG]  [HumbleGame.Installer.update_url] Old URL: 'humble-trove-unsigned://tokyo42_windows/_gh_dl_/tokyo42_windows.zip'; (humble-trove:tokyo42_trove)
[DEBUG]  [HumbleGame.Installer.update_url] New URL: 'https://dl.humble.com/tokyo42_windows.zip?key=<...>'; (humble-trove:tokyo42_trove)

Relogin to Humble Bundle

[DEBUG]  [Database.migrate] Latest db version: 9, current: 9
[DEBUG]  [WineWrap] Updating index
[DEBUG]  [DOSBox.init] ProjectConfig.DATADIR: '/usr/share'
[DEBUG]  [DOSBox.init] user_data_dir: '/home/ian/.local/share'
[DEBUG]  [DOSBox.init] system_data_dir: '/home/ian/.local/share/flatpak/exports/share/'
[DEBUG]  [DOSBox.init] system_data_dir: '/var/lib/flatpak/exports/share/'
[DEBUG]  [DOSBox.init] system_data_dir: '/usr/local/share/'
[DEBUG]  [DOSBox.init] system_data_dir: '/usr/share/'
[DEBUG]  [DOSBox.init] data_dirs: {'/usr/share/com.github.tkashkin.gamehub/compat/dosbox', '/home/ian/.local/share/com.github.tkashkin.gamehub/compat/dosbox', '/home/ian/.local/share/flatpak/exports/share/com.github.tkashkin.gamehub/compat/dosbox', '/var/lib/flatpak/exports/share/com.github.tkashkin.gamehub/compat/dosbox', '/usr/local/share/com.github.tkashkin.gamehub/compat/dosbox'}
[DEBUG]  [DOSBox.init] Config directory: '/usr/share/com.github.tkashkin.gamehub/compat/dosbox'
[DEBUG]  [DOSBox.init] Config: '/usr/share/com.github.tkashkin.gamehub/compat/dosbox/windowed.conf'; description: 'Disable fullscreen'; enabled: true
[INFO]   - GameHub
[INFO]       Version: 0.15.0-8a88b07-master
[INFO]       Branch:  master
[INFO]       Commit:  8a88b0796857fa6c30bca4eabd7da44e192cf1ad
[INFO]   - Environment
[INFO]       Distro:  CentOS Linux release 7.7.1908 (Core)
[INFO]       DE:      GNOME-Classic:GNOME
[INFO]       GTK:     3.22.30
[INFO]       Themes:  Numix | Numix
[DEBUG]  [Auth] Refreshing GOG access token with refresh token: <...>
[DEBUG]  [Auth] GOG access token: <...>
[DEBUG]  [Auth] GOG refresh token: <...>
[DEBUG]  [Auth] GOG user id: <...>
[DEBUG]  [WineWrap] Index updated
[DEBUG]  [WebAuth/Humble Bundle] Authenticating at `https://www.humblebundle.com/login?goto=home`; success_url_prefix: `https://www.humblebundle.com/home/library`; success_cookie_name: `_simpleauth_sess`
<...>
[DEBUG]  [WebAuth/Humble Bundle] [Cookie] `_simpleauth_sess`=`<...>`
[DEBUG]  [WebAuth/Humble Bundle] Finished with result `<...>`
[DEBUG]  [Auth] Humble access token: <...>
[DEBUG]  [Humble.escaped_cookie] Unescaped: <...>
[DEBUG]  [Humble.escaped_cookie] Escaped:   _simpleauth_sess="<...>";
[DEBUG]  [GOG] Loading games: page 1 of 1
[DEBUG]  [GOG] Imported tag: COMPLETED (468165616)
[DEBUG]  [GOG] Imported tag: NEXT TO PLAY (468165613)
[DEBUG]  [GOG] Imported tag: BACKLOG (468165610)
[DEBUG]  [GOG] Imported tag: FAVORITE (468165607)

@tkashkin
Copy link
Owner

Try #32 (comment) to make sure token is correct and Humble didn't change their API.

@IanTrudel
Copy link
Author

IanTrudel commented Dec 26, 2019

wget -O- -nv --header 'Cookie: _simpleauth_sess="<...>"' --post-data 'machine_name=hacknet_linux&filename=Hacknet_v5.069_Standalone_Linux.zip' https://www.humblebundle.com/api/v1/user/download/sign
{
"signed_url":"https://dl.humble.com/Hacknet_v5.069_Standalone_Linux.zip?key=<...>",
"signed_torrent_url":"https://dl.humble.com/torrents/Hacknet_v5.069_Standalone_Linux.zip.torrent?key=<...>"
}2019-12-26 15:24:25 URL:https://www.humblebundle.com/api/v1/user/download/sign [387/387] -> "-" [1]

@tkashkin
Copy link
Owner

Everything looks ok, it should work. Have you tried to download other games?

@IanTrudel
Copy link
Author

Yes, every trove game fails to download.

@tkashkin
Copy link
Owner

Did your token contain quotes? If it did, try to remove them.

dconf write /com/github/tkashkin/gamehub/auth/humble/access-token \'<token>\'

where <token> is your token without quotes.

@IanTrudel
Copy link
Author

I did try with and without quotes. All the same. Even tried with a faulty token and it shows an error page as expected.

dconf read /com/github/tkashkin/gamehub/auth/humble/access-token returns the correct token.

Thank you for removing auth info. Privacy is important. :)

Any idea?

@tkashkin
Copy link
Owner

No, I don't know what's wrong. It always worked fine on my account when I was writing and testing it, but it didn't work for some users and I'm not sure why. There's no Humble API documetation and there's no Trove API at all, so I may be doing something wrong and that's why it's so unstable.

@IanTrudel
Copy link
Author

Any way that I can help you to better diagnostic the problem and find a solution? Чем могу, тем помогу)))

@tkashkin
Copy link
Owner

I'll try to test it on my account in a few days and fix it if I find a reason why it doesn't work.
If it will work on my account but won't work on someone else's account, that account would be helpful for further testing.

@IanTrudel
Copy link
Author

I added some code to HumbleGame.vala on line 3330 for debugging purpose: debug("is_installable? %s; source is Trove? %s", is_installable ? 3 "true" : "false", (source is Trove) ? "true" : "false");

The output is [DEBUG] is_installable? false; source is Trove? true.

Hope this helps.

@tkashkin
Copy link
Owner

tkashkin commented Dec 28, 2019

@backorder
Unfortunately I can't actually do/test anything with Humble since I'm not subscribed and couldn't subscribe for last few months. They just don't want to take my money because they don't accept prepaid cards and I don't have other payment methods available ¯\_(ツ)_/¯.

tkashkin added a commit that referenced this issue Jan 4, 2020
Fix Proton prefix initialization
@tkashkin
Copy link
Owner

tkashkin commented Jan 4, 2020

@backorder try 6057e0f.

@IanTrudel
Copy link
Author

Thank you @tkashkin ! It's working with your patch. You are so fast. :D

@tkashkin tkashkin closed this as completed Jan 5, 2020
Lucki pushed a commit to Lucki/GameHub that referenced this issue Oct 30, 2021
Fix Proton prefix initialization


Former-commit-id: 6057e0f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants