Code Monkey home page Code Monkey 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 jjanuszkiewicz 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  avatar  avatar  avatar  avatar  avatar

comet's Issues

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

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

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

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.

Support *extremely rare* games using the GOG Linux SDK

Is your feature request related to a problem?
No, it is only to bring attention to a very rare edge-case: some GOG games obtained through GOG may be bunding the "steam runtime" native Linux variant of the Galaxy libraries.

The ONE example I have of this is Indivisible. I know of it because I'm the one who bundled it for all platforms, and I insisted on having the Linux native libraries in place "just in case CDPr ever launched Galaxy on Linux". We can all guess how that turned out.

Describe the solution you'd like
If necessary, a native GalaxyCommunication "service" binary for Linux would be nice.

Describe alternatives you've considered
This ticket is only to raise the issue. I haven't considered anything.

Additional context
The current state of the Linux Native bits will require someone to have access to GOG DevPortal.

Lutris moved cache dir

Is your feature request related to a problem? Please describe.
Im using a tmpfs for my cache dir and lutris uses that as default for writing the tokens in it.

Describe the solution you'd like
i saved the location in the ~/.config/lutris/lutris.conf in the lutris section in cache_dir, so it would be possible to read that path and use that as the cache dir for the token

Describe alternatives you've considered
Creating a symlink from .cache/lutris to my cache dir on each boot before comet starts

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!

Achievements reported as being unlocked 3 hours earlier

Describe the bug
Each time I unlock an achievement in the Witcher 3: Wild Hunt, they show up in my activity on gog.com as being unlocked 3 earlier than they actually were. I have only had my game open for 30 minutes, so its not using the time I opened the game.

To Reproduce
Steps to reproduce the behavior:

  1. Unlock an achievement in a game
  2. Go to https://www.gog.com/feed
  3. See time

Expected behavior
It should correctly show how long ago I unlocked the achievement.

System (please complete the following information):

  • OS: Arch Linux
  • Kernel: Linux 6.9.4-arch1-1
  • Architecture: x86_64
  • Time zone: Europe/London

Additional context
image

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

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!

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.

Indivisible [2086192498]

Game

Supported features

  • Leaderboards
  • Achievements
  • Multiplayer

Linux

  • Linux build is available for the game
  • Linux build supports Galaxy features

Additional notes
GalaxyCommunication shim not required.

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;
}

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

Lack of artifacts and non-hidden text in Releases

Congratulations with putting out the first release (0.1.0) of Comet! ๐Ÿ‘

Is your feature request related to a problem? Please describe.
The first & latest release of Comet lacks any artifact to download or any (immediately viewable) text for a change log. This hinders users who are not well versed in any Git repository hosting environment how to download the artifacts manually from the CI solution (GitHub Actions), or how to read a change log (by reading commit messages that were merged for said release).

Describe the solution you'd like
Either manually create releases with the Actions artifacts from said release attached, along with a change log (possibly derived from the merged commit messages). Or automate it through a GitHub Action.

Describe alternatives you've considered
Regarding automation - there is a (still maintained) GitHub Action that could handle releases automatically by packaging artifacts of tagged releases.

Additional context
GitHub used to host an own developed Action for this type of task - but this has been discontinued since 2020. Another possibility could be building something of our own to handle the API requests necessary to achieve such automation.

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.

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?

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?

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.

Refuse to download `desktop-galaxy-overlay` for Linux

Describe the bug
comet allows its Linux runtime to download the Galaxy overlay.

To Reproduce
Steps to reproduce the behavior:

  1. Run Comet's Linux binary with the right tokens, and trigger the overlay command

Expected behavior
If the comet runtime is running on Linux natively, it could be assumed that the intended platform is Linux, not Windows. Since there is no GOG Galaxy Overlay for Linux at present, it should either refuse to download it, explicitly demand that its counterpart (in this case, let's say, Heroic would be calling comet) explicitly tell it that Windows binaries are expected/wanted/requested, or clearly default to Windows with either a confirmation or a clear label that "this platform does not have a native overlay, but there's Proton so here is the other guy".

System (please complete the following information):

  • OS: Linux
  • Architecture: x86_64

Additional context
This is probably the height of pedantry.

  • If comet is run as a native Linux intermediary via Heroic or Lutris, but the game is a Windows game, then yes, downloading the overlay makes sense
  • If comet is run as a native Linux intermediary for Linux-native GOG games, someone runs comet overlay, without any information to the contrary, the gamer could be made to assume the overlay will work with their native game.

It's an issue of communicating what's happening more clearly, in this case. Sorry for being excruciatingly pedantic about this one.

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>

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

Visible Cues when Running Comet using comet_shortcut.sh

Is your feature request related to a problem? Please describe.
Since the transition from calling Konsole to run the script to making it fully terminal independent, the Comet logs are no more visible on their own. When using this in combination with Heroic (when attaching the script), you can only find the logs now through Heroic/Lutris (in the game's logs).

There is currently no visual indication whether a game is working with Comet (as in: Comet found an instance and is properly syncing things up), or if Comet is exiting because of a lack of a connection.

Describe the solution you'd like
I would like to either have:

  • it get a variable (similar to the DEBUG one to enable debug logs) that can enable launching it through a terminal (editable to accommodate multiple types of terminals in use)
  • it show a pop-up window when a connection can be made or when it errors out halting the script entirely
  • multiple packaged shortcut scripts to use with specific terminal (for windowed usage) or none at all (for background usage).

For the latter situation; it would be better to put the credentials elsewhere and have the scripts import it from said file, to not have to edit credentials in multiple scripts.

We know the steps for Konsole (what the Steam Deck uses) from before, and Gnome-Terminal (as found out by @italoghost here) to make separate "KDE" and "GNOME" environments.

Ideally it would be all in one script with the logic there, but I'd argue for practicality and maintenance it would be better to make multiple scripts that the user can choose what to use based on their environment.

Describe alternatives you've considered
Reusing the older comet_shortcut.sh, albeit it is no longer being hosted on the repository anymore.

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

OpenID support

Describe the bug
Some games use an OpenID flag, which isn't currently supported. Luckily for us this seems to be a rather small subset of games.

To Reproduce

  1. Run a game like Quake 2 or Quake 1 (Playfab is involved).
  2. Try to play the Multiplayer game
  3. Observe the error

Expected behavior
We should add support for openid scope when requesting the token

Additional notes
The game logs indicate invalid token, which makes sense given the scope isn't being applied.

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)

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.