steamworks.js icon indicating copy to clipboard operation
steamworks.js copied to clipboard

Mac version crashes when launched from Steam but runs successfully from local .app.

Open singlecolor opened this issue 2 years ago • 5 comments
trafficstars

Hi, we've got a small word game built in React Native + Expo. For the desktop version, we're using webpack + Electron Forge. We've integrated steamworks.js as well. The PC version works fine.

The Mac version runs locally if we launch from the .app directly, with Steam open in the background (so the Steamworks API is at least working). However, if we install + launch from Steam, we get a crash:

mac-crash

It seems like Steam simply can't find the .app file or some other library.

We have uploaded the zip 3 different ways and target the .app at the root level in Steam:

  1. Sending the zipped .app that Electron Forge spits out without any changes
  2. Zipping the loose files including: .app, LICENSE, LICENSES.chromium.html, steam_appid.txt, version.
  3. Same as 2, but copying the steam_appid.txt into the MacOS folder as well.

Notably the PC version also had issues with the zip that Electron Forge spit out, but we resolved this by zipping the loose files ourselves. The zip that Electron Forge spit out for PC actually had a folder at the top level which Steam did not like. So we have a hunch that the Mac version also has some file structure issue.

Any thoughts here? I realize it's possible that this may not be a Steamworks.js issue, but in that case I figure some of you may have had similar experience with Steam setup.

Thanks!

singlecolor avatar Sep 29 '23 19:09 singlecolor

This could be totally unrelated, since our package (Bitburner) doesn't actually use steamworks yet, and we're using electron-packager and not electron forge.

However, we have run into issues with the Mac build so I figured I would share some info on the issues we had with that, in case your issues are related.

  1. When using a windows machine, attempting to build the "Darwin" version which is what we use for Mac tells us we can't do it from Windows due to needing admin permission to create symbolic links: image
  2. With admin permissions, the darwin version is packaged successfully, but zipping it seemed to also require admin permissions, and even when we finally were able to zip it, it did not run for mac users (I don't have info handy for the exact issues).
  3. We had no problems building the packages and zipping them from Linux/WSL (probably from mac is fine as well), and the game runs fine for our mac users now. However, the zipped size of the mac version is over twice as large as the windows and linux versions. image

Snarling avatar Oct 04 '23 12:10 Snarling

Thanks for the info - I did come also across some other threads with issues related to symlinks for this.

We did not try building the Mac version from PC (the failing Mac build was from Mac), and we don't have access to Linux/WSL to try that unfortunately. I am wondering if the Mac zip package is failing due to symlinks now rather than the arrangement of the file structure.

Another person in our Discord server successfully got Mac working via Steamworks SDK's ContentBuilder instead of ZIP upload though, so we may try that next.

singlecolor avatar Oct 04 '23 21:10 singlecolor

Recently we have released a game on Steam, and we also found out that uploading the ZIP via Steamworks web breaks the symlinks. Automating the whole process is quite cumbersome due to the 2FA requirement, so we settled with a build in CircleCI, and manual upload via web for the time being. The Mac version unfortunately has 70% larger size than necessary. Uploading the same zip with symlinks via SteamCMD works.

vsobotka avatar Oct 21 '23 07:10 vsobotka

Also experiencing the same issue with GitHub Actions pipeline

devlsh avatar Oct 21 '23 08:10 devlsh