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

Heroic checks default wine prefix incorrectly when using Crossover on Mac #4369

Open
arielj opened this issue Mar 2, 2025 · 3 comments · May be fixed by #4381
Open

Heroic checks default wine prefix incorrectly when using Crossover on Mac #4369

arielj opened this issue Mar 2, 2025 · 3 comments · May be fixed by #4381
Labels
bug:unconfirmed Someone works on identifying the issue

Comments

@arielj
Copy link
Collaborator

arielj commented Mar 2, 2025

Describe the bug

When a game is configured to use Crossover (the paid version), the game runs inside the bottle and NOT inside a wine prefix.

This code https://github.com/Heroic-Games-Launcher/HeroicGamesLauncher/blob/main/src/backend/launcher.ts#L576 is not taking that into account and attempting to read/create the installed_games file inside the default wine prefix which can leads to either errors if the file cannot be read/created or to incorrect prefix update detection.

Workaround

As a workaround, you can create the installed_games file shown in the error in the logs with the content [].

Add logs

This is not my log, but the error I've seen looks like this:

An exception occurred when launching the game:
Error: ENOENT: no such file or directory, open '/Users/<user>/Games/Heroic/Prefixes/default/installed_games'
    at Object.writeFileSync (node:fs:2368:20)
    at $n (/Applications/Heroic.app/Contents/Resources/app.asar/build/main/main.js:105:1033)
    at Module.Hu [as launch] (/Applications/Heroic.app/Contents/Resources/app.asar/build/main/main.js:11:5586)

With `/Users/<user>/Games/Heroic/Prefixes/default` being the `winePrefix` config of the game (default, not added intentionally by the user) and the wine selected is the paid version of Crossover.

Steps to reproduce

  1. Install a game
  2. Configure it to use Crossover
  3. Run the game
  4. Heroic tries to store the installed game info in the default prefix folder

Expected behavior

Heroic should either create that file inside the bottle OR use a different place to store that information for bottles, but not the configured prefix.

Screenshots

No response

Heroic Version

Latest Stable

System Information

  • OS: any Mac version
  • Heroic Vervion: 2.16.0

Additional information

The issue was introduced by this PR #4027

I don't know if the previous updated detection was working for Crossover bottles before though, but maybe that diff helps to find a solution.

@arielj arielj added the bug:unconfirmed Someone works on identifying the issue label Mar 2, 2025
@koin-kanard
Copy link

I had a similar situation, but it was failing for both Crossover and Whisky.
I created the installed_games file it didn't work in Crossover, but it did work in Whisky, after launching the game in Whisky once it worked on Crossover.

one extra difficulty was the logs didn't have the full path to the installed_games file so i didn't knew where to look before finding this post. it just showed Error: ENOENT: no such file or directory, open '.../installed_games'

@peaz
Copy link

peaz commented Mar 3, 2025

Had the similar issue too. Games does not launch when using it with CrossOver

An exception occurred when launching the game: Error: ENOENT: no such file or directory, open '/Users/<user>/Games/Heroic/Prefixes/default/installed_games' at Object.writeFileSync (node:fs:2368:20) at $n (/Applications/Heroic.app/Contents/Resources/app.asar/build/main/main.js:105:1033) at processTicksAndRejections (node:internal/process/task_queues:95:5) at Module.ff [as launch] (/Applications/Heroic.app/Contents/Resources/app.asar/build/main/main.js:91:6921) at Mc (/Applications/Heroic.app/Contents/Resources/app.asar/build/main/main.js:103:10082) at WebContents.<anonymous> (node:electron/js2c/browser_init:2:83537)

@peaz
Copy link

peaz commented Mar 3, 2025

Also, downgrading to 2.15.2 works again.

@arielj arielj linked a pull request Mar 4, 2025 that will close this issue
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug:unconfirmed Someone works on identifying the issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants