-
-
Notifications
You must be signed in to change notification settings - Fork 70
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
Can't find binaries on windows + electron-forge #75
Comments
Never used |
The error is not very readable for me, not sure what it is trying to do under the hood. But before we added the steamworks.js to the project it was working. I also verified and all the files mentioned in the stack trace are on the expected locations. |
Hello, I am having the same issue on my released game, which does not use electron-forge - instead it uses electron-webpack and electron-builder. The vast majority of players don't seem to be affected by this bug, and I myself cannot reproduce, but I am getting a few reports. In the affected cases, the file is physically present in the location, and not packed in the .asar for the app. I don't think this info is very helpful, but wanted to add a datapoint since I saw this while trying to debug the issue. |
Hey, I was able to debug what was going on. It turns out that if you are missing the file VCRUNTIME140.dll the native module will fail to load and give this cryptic error message. See: https://stackoverflow.com/questions/41253450/error-the-specified-module-could-not-be-found The solution was to include the latest Visual C++ Redist on the game configuration in the Steamworks admin (installation -> redistributables) so that it automatically installs when the game installs. If you are facing this error, installing the Visual C++ redistributable should solve the problem. Otherwise it is possible this can also be solved if the file is included with steamworks.js together with the library, but given we're publishing on Steam anyway this seems like a much cleaner way to do it, just needs to be documented somewhere. |
Where did you see that this file was missing?
Related #38 |
I didn't actually see that the file was missing. This was a combination of asking someone with the problem to help me debug, and using Dependency Walker (http://www.dependencywalker.com/) to figure out what were the DLLs that were needed by the .node file, Since I hadn't set up my game to automatically install the redist, I suspected that may have been the issue - and changing the setting and asking the player who was helping me debug to reinstall the game actually worked to fix this problem, so I'm fairly confident that was the cause.
I'm not sure why this dependency is needed either, but until that issue is figured out it might be a good idea to add a note to the installation instructions on the README.md that it's needed. |
@mcolotto Awesome! Installing https://learn.microsoft.com/en-us/cpp/windows/latest-supported-vc-redist?view=msvc-170 seems to fix the issue for me. I still have some issues with my setup, but the game starts without an error. |
I can't make it work. |
Hi guys, I think I have solved the problem. I solved JUST COPYING THE FILES "steam_api64.dll" and "steam_api64.lib" in the same directory where "steamworksjs.win32-x64-msvc.node" stands that is "[PROJECTNAME]\resources\app.asar.unpacked\node_modules\steamworks.js\dist\win64" I used this program to check what was the dependencies that was missing "https://github.com/lucasg/Dependencies" and it told me that it was "steam_api64.dll" |
It does solve the problem. The problem now is how to make "steam_api64.dll" and "steam_api64.lib" copy automatically when electron forge make. |
You mean to make the installer with these files inside right? |
Does it work for you to package I packaged the program with the I try to run I try to run |
Have you included in the package the steam_appid.txt with the id of your app (or 480 that is the steam app for test)? |
Thanks. From the article, it should be possible to run |
Fresh project here as I was getting issues with electron-builder I tried electorn-forge. @ceifa what do you use as you said "do not use electron-forge" please? Aside the asar issue, electron-forge works better the electron-builder for me (less issues arounds steam-overlay mostly). |
I was just saying that I never used before. I use electron builder, but for no particular reason. |
Ok no problem I was wondering if you had any particular issue. |
my solution forge.config.js
|
This solution worked for me and is incredibly simple. I will make a pull request to add this to the readme as it seems lots of users are having this issue. |
module.exports = {
packagerConfig: {
asar: {
unpackDir: "node_modules/steamworks.js/dist/**/*"
}
}, this doesn't work with webpack + typescript template, any tips? |
@officialrobert This works for me in my Electron Forge Webpack + ReactJS project: asar: {
unpack: "*.{node,dll,so}"
}, |
Just adding to note, too, that this is almost definitely a developer environment issue now. I have a project that has been building & running and publishing to Steam with no problem for the last couple of weeks. I formatted my computer yesterday, reinstalled what I thought was everything, but must've missed something: the exact same repo that was building 2 days ago was no longer working, giving the exact same error that the OP is showing. My project builds perfectly fine in GitHub Actions Ubuntu and Windows runners, so I know it was definitely something in the dev computer. I installed Visual Studio Community and the Visual Studio Community Build Tools with all the packages/features that seemed relevant to app development, as well as the Steamworks SDK Redist in Steam, restarted my computer, and then things started working again. |
Hey @AlexStormwood Thank you so much! |
I am trying to work on a steam integration for our game on a M2 Mac, but due to the overlay not working (#50) I decided to use the Parallels Desktop instead. But on Windows in Parallels I am getting this error:
We are using electron forge to wrap our app, and this is the error thrown by either
electron-forge start
or by trying to execute the exe fromelectron-forge make
. Is it not supposed to work, or am I missing something?The text was updated successfully, but these errors were encountered: