Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

CSDM force-quits Steam when running games on another computer #996

Open
NorskNoobing opened this issue Jan 8, 2025 · 3 comments
Open

CSDM force-quits Steam when running games on another computer #996

NorskNoobing opened this issue Jan 8, 2025 · 3 comments
Labels
cs-bug CS bug next-release-resolved This issue will be solved in the next release

Comments

@NorskNoobing
Copy link

Describe the bug

When running a game via Steam on another computer (computer1), and trying to download Valve demos via CSDM on computer2, then Steam would force-quit on computer2 and no information/error message is given to the user. This happened to me when ArchiSteamFarm (ASF) was unknowingly running games in the background.

The behavior described above can be seen in the following video:
https://github.com/user-attachments/assets/5bdf204d-83d7-4d50-98bb-3f6ebb78b2e0

Demo links

No response

Steps to reproduce

  1. Have a game running through Steam on computer1, or have a game running via ASF (essentally running on another computer).
  2. Open CSDM and Steam on computer2, and press download on the Valve demos page.
  3. See Steam force-closing, and CSDM has no error message (only a generic error).

Expected behavior

I would expect the demo download to be unsuccessful, but I don't want Steam to force-quit on computer2, and I'd also want CSDM to show an error message like: A Steam game is currently running on another computer. Please exit the game on that computer before trying to download Valve demos.

In the current implementation Steam just force-quits, and no information/error message is given by the CSDM application.

How often does this bug happen?

Every time

Log file

Wed, 08 Jan 2025 13:07:07 GMT | LOG | renderer | WS:: message with name "fetch-last-valve-matches-start" received from server
Wed, 08 Jan 2025 13:07:07 GMT | LOG | server | WS:: message with name fetch-last-valve-matches and uuid 861ec10a-c19f-4f70-b200-aa07d98c10e7 received from renderer process
Wed, 08 Jan 2025 13:07:09 GMT | LOG | renderer | WS:: message with name "fetch-last-valve-matches-steam-id-detected" received from server
Wed, 08 Jan 2025 13:07:09 GMT | LOG | server | boiler exit with code 3
Wed, 08 Jan 2025 13:07:10 GMT | ERROR | server | Error while fetching last Valve matches
Wed, 08 Jan 2025 13:07:10 GMT | ERROR | server | Error: Error while communicating with the GC
    at ChildProcess.<anonymous> (C:\Users\Daniel\AppData\Local\Programs\cs-demo-manager\resources\src\node\boiler\start-boiler.ts:98:25)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
Wed, 08 Jan 2025 13:07:10 GMT | LOG | renderer | WS:: message with name "fetch-last-valve-matches-error" received from server

Environment information

  • Version: 3.11.0
  • OS: win32 x64 10.0.22631
  • Electron: 33.2.1
  • Chrome: 130.0.6723.137

Additional context

No response

@NorskNoobing
Copy link
Author

NorskNoobing commented Jan 8, 2025

CSDM essentially doesn't handle this pop-up, which would show up when launching the game manually on computer2:
image

@akiver
Copy link
Owner

akiver commented Jan 8, 2025

Unfortunately, it looks like it's not possible to know if a Steam account is in-game before initializing a connection with the Steamworks API used to retrieve last matches. (tested with https://github.com/akiver/boiler-writter used by CS:DM)

Notes:

  • Calling SteamAPI_Init while a game is running on another computer simply shows a "waiting for game to exit" dialog and kills the Steam process a few seconds later.
  • It could be possible to detect if a Steam account is in-game using the Steam web API but it's not reliable since it would work only for public profiles.

If someone finds a way to do it, please bump this issue.

Please understand that it's an edge case and the best thing ATM is to improve the error message which is done in 097fa6b

@akiver akiver removed the wontfix label Jan 8, 2025
akiver added a commit to akiver/cs-demo-manager.com that referenced this issue Jan 8, 2025
@akiver akiver added the next-release-resolved This issue will be solved in the next release label Jan 8, 2025
@akiver
Copy link
Owner

akiver commented Jan 8, 2025

@akiver akiver removed the bug label Jan 24, 2025
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
cs-bug CS bug next-release-resolved This issue will be solved in the next release
Projects
None yet
Development

No branches or pull requests

2 participants