Git Product home page Git Product logo

comet's Introduction

Hi ๐Ÿ‘‹

You can contact me through social media links connected to this profile

"Believe you can and you're halfway there." - Theodore Roosevelt

comet's People

Contributors

commandmc avatar imlinguin avatar jonboylecoding avatar kevin-wijnen avatar purplebar0 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

comet's Issues

Crash if a game exits prematurely

Tested on Absolute Drift (Windows version over Proton Experimental), exiting the game within the menus works fine, but closing it with SIGTERM crashes Comet.

40661
Accepting connection
INFO:handler:handle_message:Header 1|3
INFO:notification_pusher:handling_connection:started
INFO:notification_pusher:notification_message:2|2
INFO:notification_pusher:subscribing to chat, presence, friends
INFO:handler:handle_auth_request:authenticated the user redacted
INFO:handler:handle_message:responded with 1|4
INFO:handler:handle_message:Header 2|3
INFO:handler:handle_subscribe_topic:stub:friends
INFO:handler:handle_message:responded with 2|4
INFO:notification_pusher:notification_message:2|4
INFO:notification_pusher:subscribed_to:chat
INFO:handler:handle_message:Header 2|3
INFO:handler:handle_subscribe_topic:stub:presence
INFO:handler:handle_message:responded with 2|4
INFO:notification_pusher:notification_message:2|4
INFO:notification_pusher:subscribed_to:presence
INFO:handler:handle_message:Header 2|3
INFO:handler:handle_subscribe_topic:stub:chat
INFO:handler:handle_message:responded with 2|4
INFO:handler:handle_message:Header 1|15
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/home/serg/builds/comet/comet/main.py", line 86, in <module>
    asyncio.run(con_handler.handle_connection())
  File "/usr/lib/python3.11/asyncio/runners.py", line 190, in run
    return runner.run(main)
           ^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/asyncio/runners.py", line 118, in run
    return self._loop.run_until_complete(task)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/asyncio/base_events.py", line 653, in run_until_complete
    return future.result()
           ^^^^^^^^^^^^^^^
  File "/home/serg/builds/comet/comet/handlers.py", line 131, in handle_connection
    await self.handle_message(header_size_bytes)
  File "/home/serg/builds/comet/comet/handlers.py", line 198, in handle_message
    self.connection.sendmsg([res_header_data_size, res_header_data, res.data])
BrokenPipeError: [Errno 32] Broken pipe
ERROR:asyncio:Unclosed client session
client_session: <aiohttp.client.ClientSession object at 0x7f8f47958c90>
ERROR:asyncio:Unclosed connector
connections: ['[(<aiohttp.client_proto.ResponseHandler object at 0x7f8f479260b0>, 15330.591777046)]', '[(<aiohttp.client_proto.ResponseHandler object at 0x7f8f479256a0>, 15330.763322233)]', '[(<aiohttp.client_proto.ResponseHandler object at 0x7f8f47925940>, 15333.26935718)]']
connector: <aiohttp.connector.TCPConnector object at 0x7f8f47958e10>
ERROR:asyncio:Unclosed client session
client_session: <aiohttp.client.ClientSession object at 0x7f8f47b32cd0>

Rust rewrite

The work has already begun and is available on separate branch https://github.com/imLinguin/comet/tree/rust

Why?

I had to rewrite comet nevertheless, as current code-base has some wrong assumptions and is not offline ready at all.
That said I might as well switch to the language I'm learning at the moment.

Planned features

While I'm keeping track of supported calls in the README, here's the list of what else will be possible with new comet.

  • Stats and achievements while offline
  • Complete offline mode - disable sync to GOG services

Other ideas

Crazy ideas that I might work on someday

  • Decky loader plugin for displaying achievements "natively" on Steam Deck
  • Overlay support - still need to do research on this

If you have any other cool ideas, don't hesitate to share them.
Thanks for interest in the project!

Current compatibility

Hi! I wanted to test Comet in its current state with games installed using nicohman/wyvern.

Obtaining access token, refresh token (using underscore in README.MD, please fix) and user ID was easy enough reading ~/.config/wyvern/wyvern.toml, which worked:

INFO:comet_main:started listening on port 9977

However, starting a game (Cyberpunk 2077) gave the same results as Comet not running. This leads me to believe the launcher is also involved in establishing a session.

Will it be possible to play without a launcher? Have I made a mistake in testing?

Can't build on nixos, protoc not found

Hello, I have been trying to build comet rust rewrite on nixos and haven't been able to.

The problem is the protoc binary not working on nixos, so I have been trying to force the build script to use the one from nixos with no luck.

Is there any way to set a way to force a custom protoc binary with an environmental variable?

Build error in question:

       >   process didn't exit successfully: `/build/source/target/release/build/comet-85bbf36aabd27783/build-script-build` (exit status: 1)
       >   --- stderr
       >   codegen failed: parse and typecheck
       >
       >   Caused by:
       >       0: using protoc parser
       >       1: failed to spawn command `"/build/cargo-vendor-dir/protoc-bin-vendored-linux-x86_64-3.0.0/bin/protoc" "-Iproto" "--descriptor_set_out=/build/protobuf-parseAZvrrH/descriptor.pbbin" "--include_imports" "proto/gog.protocols.pb.proto" "proto/galaxy.protocols.webbroker_service.proto" "proto/galaxy.protocols.overlay_for_peer.proto" "proto/galaxy.protocols.communication_service.proto" "proto/galaxy.common.protocols.peer_to_server.proto" "proto/galaxy.common.protocols.peer_to_peer.proto" "proto/galaxy.common.protocols.peer_common.proto" "proto/galaxy.common.protocols.connection.proto"`
       >       2: No such file or directory (os error 2)

I already tried to force it to use a different protoc binary with no luck.

This is my current nix derivation for it so if somebody with nix knowledge sees this might be able to do it:

{ pkgs, ... }:
with pkgs;
rustPlatform.buildRustPackage rec {
  pname = "comet-gog";
  version = "e313c8a";

  src = fetchFromGitHub {
    owner = "imLinguin";
    repo = "comet";
    rev = "62bcdd89d09d914edec6d2201891f292527d7b28";
    hash = "sha256-CZDx5vgWuG58yaoVvbfOASoULM1HnQxTmVWLa63ci9Q=";
    fetchSubmodules = true;
  };

  PROTOC = "${protobuf}/bin/protoc";
  PROTOC_INCLUDE = "${protobuf}/include";
  nativeBuildInputs = [ protobuf ];

  cargoLock.lockFile = src + /Cargo.lock;
}

Game Compatibility table in Wiki + possible automation

Context

As discussed previously, I am interested into helping maintain (with the library of GOG games I do own) a game compatibility sheet for Comet, to let users know which features do and do not work via Comet.

With this, it was suggested to use the Wiki as the information source for either Steam Deck specific or game compatibility issues/statuses.

This approach however would lead to:

  • No "proper" source control, or prior checkups, over the Wiki's contents when new information is added
  • No current standard has been set or agreed upon for Game Compatibility Reports, potentially leading to incomplete or messy reports of compatibility

Proposal

My proposal to the above context and issues consists out of two parts:

Use Pull Request and GitHub Actions for adding pages to the Wiki

Using Pull Requests would help with checking if any new pages or edits to pages are of acceptable quality, and prevents overwriting someone else's reports without new evidence.

While the label documentation could be used for labelling additions and edits to the Wiki, it would not automate any changes to the Wiki. Nor is there any basis of editing Wiki pages in the codebase.

That's why I would recommend using automation such as GitHub Wiki Action to have:

  • The Wiki pages in the codebase for (offline) documentation.
    • The documentation for GitHub Wiki Action suggests the path can be changed. It would be possible to either have the docs/ path become the Wiki root, or to separate it into docs/wiki.
  • Automate changing the Wiki based on approved Pull Requests without the need of manual editing/copy & pasting.
  • This may make it easier for outside sources (such as game launchers like Heroic or Lutris) to scrape/download the Wiki information to compile it for possible information (such as a Game Compatibility status for GOG Galaxy specific features (Achievement support, Leaderboard support etc.) through Comet).

If there's interest in automating the Wiki in this way, I would be happy to introduce the automation through a Pull Request as a Proof of Concept.

Game Compatibility Report Standard

To keep tabs on game compatibility, the idea of keeping game compatibility reports in this repository seems like a good one to implement (until Heroic/Lutris/another tool would

For maintaining an easy to read compatibility sheet, I would suggest the following standard to be implemented as a table in the Wiki:

  • Game Title (hyperlinked to the GOG storefront page)
  • Game Version
  • Comet Version
  • GalaxyCommunication.exe Service Required (Yes/No)
  • GOG Galaxy Features Supported (Achievements, Leaderboard)
  • Notes/Details

I'm not sure which other features of GOG Galaxy Comet would support (would Stats support be considered different from Leaderboard support?), but this seems like a good baseline for (initial) game compatibility support reports.

Example table

Legend

๐ŸŸฉ = Yes/Supported
๐Ÿ”ฒ = Not Required / Not Present
โŒ = Defective/Not Working

Game Title Game Version Comet Version GalaxyCommunication.exe Service Required GOG Galaxy Features Notes
Cuphead Version 1.3.4 (8/19/2022) commit 55e4025 ๐ŸŸฉ Yes ๐ŸŸฉ Achievements ๐Ÿ”ฒ Leaderboard GalaxyCommunication.exe service required for game to start communicating with GOG. Otherwise, Achievements won't work. No Leaderboards present in-game.
Absolute Drift Version 5f6049d (6/26/2023) commit 55e4025 ๐Ÿ”ฒ No ๐ŸŸฉ Achievements โŒ Leaderboard Achievements do work. Leaderboard support incomplete; errors out on retrieving and updating stats from GOG Galaxy servers. Leaderboards should work fine when not using the GOG Galaxy leaderboards. You can change the leaderboards in Settings > Your Data Rights.

SSL Certificate Verification error

When running Windows-based games through Proton (tested on 7.0 and Experimental) via the Heroic launcher, the following error tends to happen:

1)(deck@steamdeck comet_pyinstaller_version)$ ./main --from-heroic
INFO:comet_main:started listening on port 9977
INFO:comet_main:waiting for connection
45925
Accepting connection
Traceback (most recent call last):
  File "aiohttp/connector.py", line 980, in _wrap_create_connection
  File "asyncio/base_events.py", line 1050, in create_connection
  File "asyncio/base_events.py", line 1080, in _create_connection_transport
  File "asyncio/sslproto.py", line 529, in data_received
  File "asyncio/sslproto.py", line 189, in feed_ssldata
  File "ssl.py", line 944, in do_handshake
ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify 
failed: unable to get local issuer certificate (_ssl.c:1131)

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "main.py", line 87, in <module>
  File "asyncio/runners.py", line 44, in run
  File "asyncio/base_events.py", line 616, in run_until_complete
  File "comet/handlers.py", line 91, in handle_connection
  File "comet/api/notification_pusher.py", line 34, in setup
  File "aiohttp/client.py", line 779, in _ws_connect
  File "aiohttp/client.py", line 536, in _request
  File "aiohttp/connector.py", line 540, in connect
  File "aiohttp/connector.py", line 901, in _create_connection
  File "aiohttp/connector.py", line 1206, in _create_direct_connection
  File "aiohttp/connector.py", line 1175, in _create_direct_connection
  File "aiohttp/connector.py", line 982, in _wrap_create_connection
aiohttp.client_exceptions.ClientConnectorCertificateError: Cannot connect to host 
notifications-pusher.gog.com:443 ssl:True [SSLCertVerificationError: (1, '[SSL: CE
RTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer cer
tificate (_ssl.c:1131)')]
[14660] Failed to execute script 'main' due to unhandled exception!

This has been tested on several games:

The Windows versions of these games running will give the SSL certificate verification error from the get-go.

If any further testing is needed for debugging, please let me know. I'll happily cooperate to get this sorted.

Note: This is done on a PyInstaller-packaged version of Comet as I try to make it compatible for Steam Deck users via Heroic. See #9.

Support the overlay

At least on Windows and Mac it's doable.
Requires opening named pipe connections to one of the pipes \\.\pipe\Galaxy-{PID}-CommunicationService-Overlay
I assume the connection there is also protobuf encoded.

As for Windows games running on Mac and Linux this would require some sort of proxy to let wine process talk with the pipes from "native" world.

Need some input on possibilities and feedback if this feature would be viable

Check-list

  • Enable overlay for native Windows and Mac builds
  • Consider a solution for Wine problem

Protobuf issues on Pop_OS 22.04

New to Comet, but when I downloaded it and installed the requirements, the program crashed every time I tried to run it. Googling the error message indicated the protobuf library as the main culprit, upgrading to 4.24.3 resolved the issue. Not sure exactly which version the initial install pulled the first time, but it might be a good idea to pin the requirements file to 4.24.3 or later

Online Multiplayer Compatibility Information

As I've not seen it mentioned here anywhere yet, except for tangentially related questions (for #11 and #14):

Is there any information available on GOG Galaxy's multiplayer capabilities being compatible with Comet instead of GOG Galaxy (i.e. No Man's Sky)? Or is that out of scope for the project?

Baldur's Gate 3

While testing Baldur's Gate 3 I found that game may initialize multiple connections to Galaxy, one from Larian launcher and one for game itself. This is sort of heads up for people who tried using comet with it.
Comet is currently able to handle one connection at the time

Added an AUR package

Good job on the Rust rewrite! Just wanted to let you know I've created an AUR package for it, comet-gog-git (comet was already taken so had to go with comet-gog). For now link time optimization has to be explicitly disabled because sqlx fails to build with it.

STONKS-9800: Stock Market Simulator not connecting to Comet

Context

During testing compatibility of several of my GOG library games, I did find another game (similar to Cuphead's previous status) that does not connect to GOG through Comet: STONKS-9800: Stock Market Simulator.

Issue Analysis

Similar to Cuphead previously, Comet wouldn't connect with the game. After installing GalaxyCommunication.exe in its prefix, it still did nothing. (No logs are made when having Comet running and starting or closing the game.)

The game using an older GOG SDK seems unlikely, as the game is an Early Access game that started its first public release on GOG last year on July 17, 2023.

Looking in the game's files, some noteworthy files (and its MD5 hashes) are:

  • steam_api64.dll

I am not sure if this is just a leftover DLL from its Steam release, or whether the GOG Galaxy SDK is used to route the Steamworks API calls to GOG Galaxy.

I would not assume the latter hindering the connection to Comet as Yakuza 0 seems to have this Steam->GOG routing setup and functions just fine through Comet.

MD5 hash: 6b4ab6e60364c55f18a56a39021b74a6

  • Galaxy64.dll

Seems to be the normal DLL used for GOG Galaxy communications.

MD5 hash: 54f895617d80efa2c0bdc764b38af835

  • GOG.dll

I could not find a lot of information on this DLL, but it seems to be used by other games as well such as Skyrim and Witcher 3. I have tested neither yet, whether they do work through Comet.

MD5 hash: 2f1fa17e6c3921d706a9b5e4e491872b

  • libGalaxy.dylib

Seems to be another library from the GOG SDK. Not sure what this is used for.

This library seems to be empty, at 0 B?

MD5 hash: d41d8cd98f00b204e9800998ecf8427e

Witcher 3 "My rewards" section require gog galaxy

Hi, have some issues with My Rewards in Witcher 3. I want to use cross progression for switch/PC. When enter My rewards, there is a banner - "Open GOG Galaxy 2.0 and start the game".
I downlaod Heroic (MacOS), installed the game.
Before launch: comet --token <token> --refresh-token <token>. --user-id <user>
Logs seems fine, but i can't access my rewards section.

Accepting connection
INFO:handler:handle_message:Header 1|3
INFO:notification_pusher:handling_connection:started
INFO:notification_pusher:notification_message:2|2
INFO:notification_pusher:subscribing to chat, presence, friends
INFO:handler:handle_auth_request:authenticated the user <user>
INFO:handler:handle_message:responded with 1|4
INFO:handler:handle_message:Header 2|3
INFO:handler:handle_subscribe_topic:stub:friends
INFO:handler:handle_message:responded with 2|4
INFO:notification_pusher:notification_message:2|4
INFO:notification_pusher:subscribed_to:chat
INFO:handler:handle_message:Header 2|3
INFO:handler:handle_subscribe_topic:stub:presence
INFO:handler:handle_message:responded with 2|4
INFO:notification_pusher:notification_message:2|4
INFO:notification_pusher:subscribed_to:presence
INFO:handler:handle_message:Header 2|3
INFO:handler:handle_subscribe_topic:stub:chat
INFO:handler:handle_message:responded with 2|4
INFO:notification_pusher:notification_message:2|4
INFO:notification_pusher:subscribed_to:friends
INFO:handler:handle_message:Header 1|15
INFO:handler:handle_message:responded with 1|16
INFO:handler:handle_message:Header 1|23
INFO:handler:handle_message:responded with 1|24

Thanks, for such amazing tools!

Support complete offline mode

Allow users to specify that they don't want to upload achievements, stats and leaderboards back to GOG.
Some people asked me this personally. I believe it's a nice addition to consider

It is not possible to support this fully offline as we need to load the data at least once

Check-list

  • Add ability to disable achievements upload
  • Add ability to disable stats upload
  • Add ability to disable leaderboards upload
  • Add ability to export the data for easy access and management in external tools
  • Add ability to import previously exported data

Error handling

While testing, I found that two common scenarios print a traceback rather than a descriptive error message, and it results in Comet aborting operation, which is obviously not ideal for a daemon.

  1. notifications-pusher.gog.com and gameplay.gog.com are not reachable (no Internet connection, hosts blocked, etc.)
INFO:comet_main:started listening on port 9977
41173
Accepting connection
Traceback (most recent call last):
  File "/usr/lib/python3.11/site-packages/aiohttp/connector.py", line 980, in _wrap_create_connection
    return await self._loop.create_connection(*args, **kwargs)  # type: ignore[return-value]  # noqa
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/asyncio/base_events.py", line 1085, in create_connection
    raise exceptions[0]
  File "/usr/lib/python3.11/asyncio/base_events.py", line 1069, in create_connection
    sock = await self._connect_sock(
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/asyncio/base_events.py", line 973, in _connect_sock
    await self.sock_connect(sock, address)
  File "/usr/lib/python3.11/asyncio/selector_events.py", line 634, in sock_connect
    return await fut
           ^^^^^^^^^
  File "/usr/lib/python3.11/asyncio/selector_events.py", line 674, in _sock_connect_cb
    raise OSError(err, f'Connect call failed {address}')
ConnectionRefusedError: [Errno 111] Connect call failed ('0.0.0.0', 443)

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/home/redacted/builds/comet/comet/main.py", line 86, in <module>
    asyncio.run(con_handler.handle_connection())
  File "/usr/lib/python3.11/asyncio/runners.py", line 190, in run
    return runner.run(main)
           ^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/asyncio/runners.py", line 118, in run
    return self._loop.run_until_complete(task)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/asyncio/base_events.py", line 653, in run_until_complete
    return future.result()
           ^^^^^^^^^^^^^^^
  File "/home/redacted/builds/comet/comet/handlers.py", line 90, in handle_connection
    await self.notification_pusher.setup()
  File "/home/redacted/builds/comet/comet/api/notification_pusher.py", line 34, in setup
    self.connection = await self.session.ws_connect(self.url)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/aiohttp/client.py", line 779, in _ws_connect
    resp = await self.request(
           ^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/aiohttp/client.py", line 536, in _request
    conn = await self._connector.connect(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/aiohttp/connector.py", line 540, in connect
    proto = await self._create_connection(req, traces, timeout)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/aiohttp/connector.py", line 901, in _create_connection
    _, proto = await self._create_direct_connection(req, traces, timeout)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/aiohttp/connector.py", line 1206, in _create_direct_connection
    raise last_exc
  File "/usr/lib/python3.11/site-packages/aiohttp/connector.py", line 1175, in _create_direct_connection
    transp, proto = await self._wrap_create_connection(
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/aiohttp/connector.py", line 988, in _wrap_create_connection
    raise client_error(req.connection_key, exc) from exc
aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host notifications-pusher.gog.com:443 ssl:default [Connect call failed ('0.0.0.0', 443)]
ERROR:asyncio:Unclosed client session
client_session: <aiohttp.client.ClientSession object at 0x7fdf9dddd850>
ERROR:asyncio:Unclosed client session
client_session: <aiohttp.client.ClientSession object at 0x7fdf9dddd990>
  1. Outdated token values
INFO:comet_main:started listening on port 9977
38489
Accepting connection
INFO:handler:handle_message:Header 1|3
INFO:notification_pusher:handling_connection:started
INFO:notification_pusher:notification_message:2|2
INFO:notification_pusher:subscribing to chat, presence, friends
Error obtaining user data
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/home/redacted/builds/comet/comet/main.py", line 86, in <module>
    asyncio.run(con_handler.handle_connection())
  File "/usr/lib/python3.11/asyncio/runners.py", line 190, in run
    return runner.run(main)
           ^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/asyncio/runners.py", line 118, in run
    return self._loop.run_until_complete(task)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/asyncio/base_events.py", line 653, in run_until_complete
    return future.result()
           ^^^^^^^^^^^^^^^
  File "/home/redacted/builds/comet/comet/handlers.py", line 131, in handle_connection
    await self.handle_message(header_size_bytes)
  File "/home/redacted/builds/comet/comet/handlers.py", line 162, in handle_message
    res = await self.handle_auth_request(message_data)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/redacted/builds/comet/comet/handlers.py", line 214, in handle_auth_request
    res_data.user_id = int(user_info["galaxyUserId"])
                           ~~~~~~~~~^^^^^^^^^^^^^^^^
TypeError: 'NoneType' object is not subscriptable
ERROR:asyncio:Unclosed client session
client_session: <aiohttp.client.ClientSession object at 0x7fe9a8f39a50>
ERROR:asyncio:Unclosed connector
connections: ['[(<aiohttp.client_proto.ResponseHandler object at 0x7fe9a8f25630>, 12558.577621949)]', '[(<aiohttp.client_proto.ResponseHandler object at 0x7fe9a8f25470>, 12558.622148064)]']
connector: <aiohttp.connector.TCPConnector object at 0x7fe9a8f39a90>
ERROR:asyncio:Unclosed client session
client_session: <aiohttp.client.ClientSession object at 0x7fe9a94e24d0>
Exception ignored in: <function ClientResponse.__del__ at 0x7fe9a8fff420>
Traceback (most recent call last):
  File "/usr/lib/python3.11/site-packages/aiohttp/client_reqrep.py", line 811, in __del__
  File "/usr/lib/python3.11/site-packages/aiohttp/connector.py", line 178, in release
  File "/usr/lib/python3.11/site-packages/aiohttp/connector.py", line 663, in _release
  File "/usr/lib/python3.11/site-packages/aiohttp/client_proto.py", line 63, in close
  File "/usr/lib/python3.11/asyncio/sslproto.py", line 112, in close
  File "/usr/lib/python3.11/asyncio/sslproto.py", line 619, in _start_shutdown
  File "/usr/lib/python3.11/asyncio/base_events.py", line 727, in call_later
  File "/usr/lib/python3.11/asyncio/base_events.py", line 740, in call_at
  File "/usr/lib/python3.11/asyncio/base_events.py", line 519, in _check_closed
RuntimeError: Event loop is closed

Expose interface for third party integrations

We need some sort of interface for communication between third party apps and comet in order to communicate updates like achievements, useful for external overlays.

  • Expose an interface from Comet
  • Develop Decky Loader plugin as an example integration

Cyberpunk My rewards don't unlock.

Still says to launch using galaxy 2.0 to receive the unlocks.

(Does get the expansion working though, did you know that comet is the only way to play the gog version with the dlc right now? The game crashes if the galaxy services dlls are present, and without them the dlc doesnt appear, they drm'd it! So thanks for letting me play)

Add a flag to exit when all connections close

I believe such feature could be useful for usage as a wrapper in apps that have no direct management of comet.

I'm thinking of flag like -q and --quit.

The flow

  1. Comet started with a quit flag, waits for connection
  2. Game client connects to comet
  3. Game client disconnects from comet after some time
  4. Comet checks if there are no other connections and exits

Steam Deck Compatibility

Context

Steam Deck users can not easily use Comet due to SteamOS using an immutable filesystem. To allow Python's pip to be installed, users would have to unlock the filesystem. The changes made to said file system could be wiped in a future update, making it unsuitable for long-term use.

Proposal

To get around this issue, I have been tinkering with using PyInstaller to package the application into a bootable executable for immutable file systems.

To get a bootable executable, do the following steps:

  • Installing the requirements of Comet
  • Moving the api, classes, proto folders and the handlers.py script into a single folder called comet
  • Running pyinstaller main.py
  • Go into the newly created dist/main folder, and simply run ./main.

Current Issues

While the application boots fine on Steam Deck by calling it with ./main --from-heroic, it seems to currently fail at SSL Certificate verification (#8).

Once this issue has been resolved, I will create a Pull Request to deal with the GitHub Actions automation for building Steam Deck-compatible releases along with instructions how to use it on Steam Deck.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.