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

HumbleBundle #9

Closed
cassidyjames opened this issue Jun 21, 2018 · 21 comments
Closed

HumbleBundle #9

cassidyjames opened this issue Jun 21, 2018 · 21 comments
Labels
auth bug Something isn't working can't reproduce GS: Humble Bundle Game source: Humble Bundle needs testing

Comments

@cassidyjames
Copy link

HumbleBundle.com has a concept of a library. I'm not sure what their API is like, but it'd be handy to be able to see and download my games there.

Installing might be tricky, as they're typically delivered as a zip or tarball, which is a lot less friendly for users.

@tkashkin
Copy link
Owner

tkashkin commented Jun 21, 2018

Humble Bundle support is already implemented in 89968b4 and should work for archives and binaries (assuming they are MojoSetup).

It may take a while to fetch Humble orders and Linux-compatible games from them.

Unfortunately I can't test many games as I have only 6 of them in Humble library.

@cassidyjames
Copy link
Author

Oh, awesome! I have a large library of HumbleBundle games, so I can give it a test.

@cassidyjames
Copy link
Author

@tkashkin it appears linking a HumbleBundle account opens the log in window with the website, then just shows me the library on the website instead of in GameHub. If I close the website, GameHub still doesn't seem to know about my HumbleBundle account.

@tkashkin tkashkin added the bug Something isn't working label Jun 21, 2018
@tkashkin
Copy link
Owner

@cassidyjames have you received email with security code? If so did it show code prompt?

@cassidyjames
Copy link
Author

@tkashkin I did, and it logged in successfully. But then it just logged in in the web browser. The GameHub UI never updated and showed it as logged in.

@tkashkin
Copy link
Owner

tkashkin commented Jun 21, 2018

@cassidyjames ok, so it seems to fail when security code is requested. I'll look into this tomorrow.

@tkashkin tkashkin added auth GS: Humble Bundle Game source: Humble Bundle labels Jun 21, 2018
@tkashkin
Copy link
Owner

@cassidyjames it should be fixed by 2ba374a; release.

You may need to run dconf reset -f /com/github/tkashkin/gamehub/auth/humble/ for it to work properly.

@mgclabs
Copy link

mgclabs commented Jul 1, 2018

gamehub.log
Does this help?

@tkashkin
Copy link
Owner

tkashkin commented Jul 1, 2018

@mgclabs did it login in browser successfully? If so, my assumption that humble token can't be enclosed in " was wrong.

@mgclabs
Copy link

mgclabs commented Jul 1, 2018

It did log in successfully in the browser, yes

@tkashkin
Copy link
Owner

tkashkin commented Jul 1, 2018

@mgclabs try new release.

@mgclabs
Copy link

mgclabs commented Jul 1, 2018

Just tried it, it shows the authorization as successful but isnt populating with games

@tkashkin
Copy link
Owner

tkashkin commented Jul 1, 2018

@mgclabs I don't really know what's the problem in your case.

You can try to login in external browser and get _simpleauth_sess cookie value. In my testing it should never be enclosed in " (when it is user isn't fully logged in).

If you are logged in correctly (with 2FA), you should be able to get your order ids at https://www.humblebundle.com/api/v1/user/order?ajax=true

Then execute dconf write /com/github/tkashkin/gamehub/auth/humble/access-token \'<token>\' where <token> is cookie value.

@cassidyjames
Copy link
Author

@tkashkin I tried the latest master on a fresh install. It looks like HumbleBundle gets added, but it's showing 0 games. However, visiting the API link provided above shows me a dozen or so game keys.

@tkashkin
Copy link
Owner

@cassidyjames Just to be sure, have you waited long enough? Orders are loading sequentially and take some time to parse. There's no filtering so not all orders contain Linux-compatible games.

There may be some useful info in the log, run com.github.tkashkin.gamehub --debug in terminal.

You can also try to set access token from browser cookies, I'll add option in settings if that will work.

@Stew-rt
Copy link

Stew-rt commented Aug 6, 2018

I've found on my system - using the UI GameHub supplies results in the auth token being saved into dconf as: '"$auth_token"' (note the extra inverted commas ("))
If I change this manually in dconf value to '$auth_token' - this issue is resolved.

@tkashkin
Copy link
Owner

tkashkin commented Aug 6, 2018

@MessedUpHare
_simpleauth_sess cookie exists on humble site even if user is not authenticated. In this case token contains quotes. But after signing in new token should not contain quotes (that's for me, but it's not the case for others for some reason).

So do you think removing quotes helps?

@Stew-rt
Copy link

Stew-rt commented Aug 6, 2018

@tkashkin
for me, removing the double quotes from the humble/access-token dconf key worked.
GameHub now lists games from Humble, where it previously listed 0 (running it in debug, it reported an issue about null strings a JSON class was trying to parse before).
I do still get a segfault after some time - but it starts listing games from humble after this change.
(I'll do some investigation into the crash I get when I get some more spare time)

  • edit:
    if you want me to revert my manual change (removing quotes) and run in debug to show you the json error, let me know, I can do that later...)

@tkashkin
Copy link
Owner

tkashkin commented Aug 6, 2018

@Stew-rt
Copy link

Stew-rt commented Aug 6, 2018

@tkashkin
Building from tag 0.6.3 has resolved the authentication issue for me.
Others who have experienced this problem will need to be advised to reset their authentication credentials.

@cassidyjames
Copy link
Author

This worked great for me on a fresh install. Nice work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auth bug Something isn't working can't reproduce GS: Humble Bundle Game source: Humble Bundle needs testing
Projects
None yet
Development

No branches or pull requests

4 participants