ceifa / steamworks.js

A steamworks implementation for nw.js/electron games
MIT License
419 stars 66 forks source link

require('steamworks.js').electronEnableSteamOverlay() silently crashes electron client #112

Open saintflow47 opened 1 year ago

saintflow47 commented 1 year ago

Hi there, I have run into a huge issue I am not sure how to solve. In general, my electron app works, the steam integration works.

However, I have one client/machine where the following line silently crashes and closes the whole app

require('steamworks.js').electronEnableSteamOverlay()

I have no idea what happens there on that client. there is no kind of log anywhere of what happens and whatever i tried, i have not been successful in getting any info about what happens. If anybody has any insight of what i could try to at least view some kind of error, it would be very much appreciated!

The machine is running Windows 10 and Steam version 1689034492 (should be most recent Steam Version as of 08/01/2023)

That same machine did not have these issues when i used electron 20 instead of electron 25.

versions "dependencies": { "@capacitor-community/electron": "^4.1.2", "backtrace-node": "^1.2.0", "chokidar": "~3.5.3", "electron-is-dev": "~2.0.0", "electron-log": "^5.0.0-beta.25", "electron-serve": "~1.1.0", "electron-store": "^8.1.0", "electron-unhandled": "~4.0.1", "steamworks.js": "^0.3.0" }, "devDependencies": { "@electron/rebuild": "^3.2.13", "electron": "^25.2.0", "electron-builder": "^24.4.0", "typescript": "~4.8.4" }

Thanks for your time, i am really out of ideas for this one.

Edit: Even putting that line into a try/catch block does not change any behaviour. it neither throws anything, nor prevents the crash from happening.

Edit2: I have tried to narrow down working and non working electron versions. up to version 21.4.4 is working starting at version 22.0.0 is crashing silently (which is still present in version 25.2.0)

Crashing silently like that is a very scary issue for me and i think if we cannot get to the bottom of this, using any electron version above 21.4.4 is like a disaster waiting to happen as soon as an app releases like that.

ceifa commented 1 year ago

Can you try using the electronEnableSteamOverlay with a true flag as first argument?

require('steamworks.js').electronEnableSteamOverlay(true)
saintflow47 commented 1 year ago

Hey there, I just tried that, did not make any difference sadly

saintflow47 commented 1 year ago

Just leaving this here for reference: https://www.electronjs.org/blog/electron-22-0#stack-changes

In theory, this changelog must contain something that leads to this silent crash under certain circumstances.