burnhamup / galaxy-integration-indiegala

A GOG Galaxy Integration for Indie Gala
MIT License
64 stars 3 forks source link

Can't connect #2

Closed kyuuketsukikurai closed 4 years ago

kyuuketsukikurai commented 4 years ago

I've added the plugin successfully. However, when I login on the window that opens, it opens the homepage in that window. There's no connection made.

burnhamup commented 4 years ago

This sounds like it could be related to the code that checks what page you are on after you login.

I'm assuming that after login, you get redirected to exactly https://www.indiegala.com.

If you visit the IndieGala site in a browser and login it https://www.indiegala.com/login where do you get redirected to?

Additionally I'm tracking bugs related to a new cloud protection system that could also be related.

BtencateSphereon commented 4 years ago

Don't know if it's the same problem. Mine just says Offline. with below error

2020-05-02 17:16:21,522 - galaxy.api.jsonrpc - DEBUG - Received 55 bytes of data 2020-05-02 17:16:21,522 - galaxy.api.jsonrpc - INFO - Handling request: id=35, method=ping, params={} 2020-05-02 17:16:21,522 - root - DEBUG - Sending data: {"jsonrpc": "2.0", "id": "35", "result": null} 2020-05-02 17:16:25,578 - galaxy.api.jsonrpc - DEBUG - Received 266 bytes of data 2020-05-02 17:16:25,578 - galaxy.api.jsonrpc - INFO - Handling request: id=36, method=init_authentication, params={'stored_credentials': '*'} 2020-05-02 17:16:25,578 - galaxy.task_manager - DEBUG - Task manager jsonrpc server: creating task 4 (init_authentication) 2020-05-02 17:16:25,578 - galaxy.task_manager - DEBUG - Task manager plugin external: creating task 4 (init_authentication) 2020-05-02 17:16:25,766 - galaxy.api.jsonrpc - ERROR - Unexpected exception raised in plugin handler Traceback (most recent call last): File "C:\Users\Brummos\AppData\Local\GOG.com\Galaxy\plugins\installed\indiegala\galaxy\api\jsonrpc.py", line 271, in handle result = await callback(bound_args.args, *boundargs.kwargs) File "C:\Users\Brummos\AppData\Local\GOG.com\Galaxy\plugins\installed\indiegala\galaxy\api\plugin.py", line 252, in method result = await handler(args, kwargs) File "C:\Users\Brummos\AppData\Local\GOG.com\Galaxy\plugins\installed\indiegala\galaxy\api\plugin.py", line 264, in wrapper return await self._external_task_manager.create_task(handler(*args, **kwargs), name, False) File "C:\Users\Brummos\AppData\Local\GOG.com\Galaxy\plugins\installed\indiegala\galaxy\task_manager.py", line 21, in task_wrapper result = await coro File "C:\Users\Brummos\AppData\Local\GOG.com\Galaxy\plugins\installed\indiegala\plugin.py", line 44, in authenticate return await self.get_user_info() File "C:\Users\Brummos\AppData\Local\GOG.com\Galaxy\plugins\installed\indiegala\plugin.py", line 68, in get_user_info data = json.loads(text) File "D:\obj\Windows-Release\37win32_Release\msi_python\zip_win32__init__.py", line 348, in loads File "D:\obj\Windows-Release\37win32_Release\msi_python\zip_win32\decoder.py", line 337, in decode File "D:\obj\Windows-Release\37win32_Release\msi_python\zip_win32\decoder.py", line 355, in raw_decode json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

burnhamup commented 4 years ago

I've got a new release out the improves reliability. And it looks like you may be running the first version of the plugin, which stopped working when IndieGala updated their site last week.

kyuuketsukikurai commented 4 years ago

Just to clarify, I am running the new release for the new site. When I login in a browser, I'm redirected to https://www.indiegala.com/#. When I login in the plugin, it appears to go to the same place.

image

There doesn't appear to be a log for the plugin, but ClientHelper-Unknown.log This log updates when I try and connect.

BtencateSphereon commented 4 years ago

Running 0.0.4, getting Connection lost when galaxy starts and i'm unable to connect afterwards. Connecting just hangs.

2020-05-03 11:45:52,276 - galaxy.api.jsonrpc - INFO - Received EOF 2020-05-03 11:45:52,276 - galaxy.api.jsonrpc - INFO - Closing JSON-RPC server - not more messages will be read 2020-05-03 11:45:52,277 - galaxy.api.plugin - DEBUG - Plugin run loop finished 2020-05-03 11:45:52,277 - galaxy.api.plugin - INFO - Closing plugin 2020-05-03 11:45:52,277 - galaxy.task_manager - DEBUG - Task manager plugin internal: creating task 1 (shutdown) 2020-05-03 11:45:52,277 - galaxy.api.plugin - DEBUG - Waiting for plugin to close 2020-05-03 11:45:52,277 - galaxy.task_manager - DEBUG - Task manager plugin internal: finished task 1 (shutdown) 2020-05-03 11:45:53,223 - galaxy.task_manager - DEBUG - Task manager plugin internal: finished task 0 (tick) 2020-05-03 11:45:53,223 - galaxy.api.plugin - DEBUG - Plugin closed 2020-05-03 11:45:53,229 - root - ERROR - Unclosed client session client_session: <aiohttp.client.ClientSession object at 0x04236450> 2020-05-03 11:45:58,242 - root - DEBUG - Using proactor: IocpProactor 2020-05-03 11:45:58,244 - galaxy.api.plugin - INFO - Using local address: 127.0.0.1:59599 2020-05-03 11:45:58,244 - galaxy.api.plugin - INFO - Creating plugin for platform indiegala, version 0.0.4 2020-05-03 11:45:59,277 - galaxy.api.jsonrpc - DEBUG - Received 66 bytes of data 2020-05-03 11:45:59,277 - galaxy.api.jsonrpc - INFO - Handling request: id=0, method=get_capabilities, params={} 2020-05-03 11:45:59,278 - root - DEBUG - Sending data: {"jsonrpc": "2.0", "id": "0", "result": {"platform_name": "indiegala", "features": ["ImportOwnedGames"], "token": "[REMOVED]"}} 2020-05-03 11:45:59,370 - galaxy.api.jsonrpc - DEBUG - Received 75 bytes of data 2020-05-03 11:45:59,370 - galaxy.api.jsonrpc - INFO - Handling request: id=1, method=initialize_cache, params={'data': ''} 2020-05-03 11:45:59,370 - galaxy.task_manager - DEBUG - Task manager plugin internal: creating task 0 (tick) 2020-05-03 11:45:59,370 - root - DEBUG - Sending data: {"jsonrpc": "2.0", "id": "1", "result": null} 2020-05-03 11:45:59,422 - galaxy.api.jsonrpc - DEBUG - Received 54 bytes of data 2020-05-03 11:45:59,423 - galaxy.api.jsonrpc - INFO - Handling request: id=2, method=ping, params={} 2020-05-03 11:45:59,423 - root - DEBUG - Sending data: {"jsonrpc": "2.0", "id": "2", "result": null} 2020-05-03 11:45:59,868 - galaxy.api.jsonrpc - DEBUG - Received 265 bytes of data 2020-05-03 11:45:59,868 - galaxy.api.jsonrpc - INFO - Handling request: id=3, method=init_authentication, params={'stored_credentials': ''} 2020-05-03 11:45:59,868 - galaxy.task_manager - DEBUG - Task manager jsonrpc server: creating task 0 (init_authentication) 2020-05-03 11:45:59,869 - galaxy.task_manager - DEBUG - Task manager plugin external: creating task 0 (init_authentication) 2020-05-03 11:46:00,053 - galaxy.api.jsonrpc - INFO - Sending notification: method=authentication_lost, params=None 2020-05-03 11:46:00,054 - galaxy.api.jsonrpc - DEBUG - Sending 68 bytes of data 2020-05-03 11:46:00,054 - galaxy.task_manager - DEBUG - Task manager plugin external: finished task 0 (init_authentication) 2020-05-03 11:46:00,054 - root - DEBUG - Sending data: {"jsonrpc": "2.0", "id": "3", "result": null} 2020-05-03 11:46:00,054 - galaxy.task_manager - DEBUG - Task manager jsonrpc server: finished task 0 (init_authentication) 2020-05-03 11:46:05,719 - galaxy.api.jsonrpc - DEBUG - Received 54 bytes of data 2020-05-03 11:46:05,719 - galaxy.api.jsonrpc - INFO - Handling request: id=4, method=ping, params={} 2020-05-03 11:46:05,720 - root - DEBUG - Sending data: {"jsonrpc": "2.0", "id": "4", "result": null} 2020-05-03 11:46:10,784 - galaxy.api.jsonrpc - DEBUG - Received 54 bytes of data 2020-05-03 11:46:10,784 - galaxy.api.jsonrpc - INFO - Handling request: id=5, method=ping, params={} 2020-05-03 11:46:10,784 - root - DEBUG - Sending data: {"jsonrpc": "2.0", "id": "5", "result": null} 2020-05-03 11:46:15,813 - galaxy.api.jsonrpc - DEBUG - Received 54 bytes of data 2020-05-03 11:46:15,813 - galaxy.api.jsonrpc - INFO - Handling request: id=6, method=ping, params={} 2020-05-03 11:46:15,813 - root - DEBUG - Sending data: {"jsonrpc": "2.0", "id": "6", "result": null} 2020-05-03 11:46:20,827 - galaxy.api.jsonrpc - DEBUG - Received 54 bytes of data 2020-05-03 11:46:20,827 - galaxy.api.jsonrpc - INFO - Handling request: id=7, method=ping, params={} 2020-05-03 11:46:20,827 - root - DEBUG - Sending data: {"jsonrpc": "2.0", "id": "7", "result": null} 2020-05-03 11:46:25,885 - galaxy.api.jsonrpc - DEBUG - Received 54 bytes of data 2020-05-03 11:46:25,885 - galaxy.api.jsonrpc - INFO - Handling request: id=8, method=ping, params={} 2020-05-03 11:46:25,885 - root - DEBUG - Sending data: {"jsonrpc": "2.0", "id": "8", "result": null}

EustaceCS commented 4 years ago

Unlinked v0.0.3 plugin version. Performed a clean plugin install (deleted the folder, copied files from v0.0.4 ). Tried to link it.

Still doesn't work with Google Sign-In.

For usual login + password, it does accept my credentials and does auto-close auth window - and the integration hangs in 'Offline' state. Nor games neither 'IndieGala' selector appears in Galaxy. 'Retry' bounces the integration back to 'Offline' in an instant.

Logs: https://drive.google.com/file/d/1yJYoyifhoDlCngdzun7fxhEfJCr8qOOZ/view?usp=sharing

(I probably don't do it right - v0.0.3 didn't worked for me either...)

kyuuketsukikurai commented 4 years ago

I'm using Google Sign In, as well. Could this be part of the issue?

burnhamup commented 4 years ago

Great work everyone, it does look like the Google Signin and probably Facebook Signin has an issue.

I think I can fix it with a better end_uri_regex

Facebook end uri: https://www.indiegala.com/#_=_ Google end uri: https://www.indiegala.com/#

I'll get this into the next version, but the connection lost issue will probably continue to be broken.

burnhamup commented 4 years ago

Okay - the new version I pushed 0.0.5 attempts to fix this. I'll leave the issue open until I get confirmation from someone

EustaceCS commented 4 years ago

v0.0.5, yesterday, 'Offline' as usual. And today - 'Connection lost'. Permanently. Attempt to reconnect results in 'Connection lost' without login+pass prompt. Restarted Galaxy, tried to re-link my account with the plugin - 'Failed to start' then, after some hiccup: 'Connection lost'. Without login+pass prompt. Logs: https://drive.google.com/open?id=1ZRvsIVPgwzCncjxtlQoo_14Pj_akz2oy

BtencateSphereon commented 4 years ago

v0.0.5. Status offline.

jakopo87 commented 4 years ago

I think it's the bot detection, after changing end_uri_regex to https://www.indiegala.com/library I see this: immagine then I can solve the captch and after navigating to the library it works.

burnhamup commented 4 years ago

Okay - I'm still experimenting with my code. It's looking like calling plugin.lost_authentication() isn't helping at all.

I'm still not 100% sure what to do when I do a library update and get that security check - but if this next version is stable, I'll release it for you all to test.

EustaceCS commented 4 years ago

Not sure if it qualifies as successful connect but for me Login went through - then plugin blinked 'Connected' status at me and went Offline. No games were added to Library.

BtencateSphereon commented 4 years ago

could we get an update on these issues?

burnhamup commented 4 years ago

I've got some ideas that may help. I'm planning on keeping better track of cookies to be less likely to lose the connection. I'm also learned I can use some JavaScript during authentication, so I'm planning on detecting any connection errors and handling them there.

On Fri, May 15, 2020 at 1:48 AM Bram ten Cate notifications@github.com wrote:

could we get an update on these issues?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/burnhamup/galaxy-integration-indiegala/issues/2#issuecomment-629114212, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABEFESVOLUYNTKADD272XK3RRT6UJANCNFSM4MXGCVBA .

MatheusVitor314 commented 4 years ago

v0.0.6 Status offline v0.0.7 Status offline

jonisb commented 4 years ago

v0.0.3 Worked first but stopped working v0.0.4 Worked first but stopped working v0.0.5 Never worked for me v0.0.7 Works again :smiley:

BtencateSphereon commented 4 years ago

v0.0.7 Status offline

all the log says is

2020-05-17 22:22:50,003 - galaxy.task_manager - DEBUG - Task manager jsonrpc server: finished task 1 (pass_login_credentials) 2020-05-17 22:22:50,076 - galaxy.api.jsonrpc - DEBUG - Received 54 bytes of data 2020-05-17 22:22:50,077 - galaxy.api.jsonrpc - INFO - Handling request: id=9, method=ping, params={} 2020-05-17 22:22:50,077 - root - DEBUG - Sending data: {"jsonrpc": "2.0", "id": "9", "result": null} 2020-05-17 22:22:55,104 - galaxy.api.jsonrpc - DEBUG - Received 55 bytes of data 2020-05-17 22:22:55,104 - galaxy.api.jsonrpc - INFO - Handling request: id=10, method=ping, params={} 2020-05-17 22:22:55,104 - root - DEBUG - Sending data: {"jsonrpc": "2.0", "id": "10", "result": null} 2020-05-17 22:23:00,130 - galaxy.api.jsonrpc - DEBUG - Received 55 bytes of data 2020-05-17 22:23:00,130 - galaxy.api.jsonrpc - INFO - Handling request: id=11, method=ping, params={} 2020-05-17 22:23:00,130 - root - DEBUG - Sending data: {"jsonrpc": "2.0", "id": "11", "result": null} 2020-05-17 22:23:05,165 - galaxy.api.jsonrpc - DEBUG - Received 55 bytes of data 2020-05-17 22:23:05,165 - galaxy.api.jsonrpc - INFO - Handling request: id=12, method=ping, params={} 2020-05-17 22:23:05,165 - root - DEBUG - Sending data: {"jsonrpc": "2.0", "id": "12", "result": null} 2020-05-17 22:23:10,210 - galaxy.api.jsonrpc - DEBUG - Received 55 bytes of data 2020-05-17 22:23:10,211 - galaxy.api.jsonrpc - INFO - Handling request: id=13, method=ping, params={} 2020-05-17 22:23:10,211 - root - DEBUG - Sending data: {"jsonrpc": "2.0", "id": "13", "result": null}

Maybe make a version with custom logging to see whats going on?

burnhamup commented 4 years ago

I'm closing this issue since it originally had to do with Google / Facebook login issues, and those have been resolved for the moment.