-
Notifications
You must be signed in to change notification settings - Fork 19
[MacOS] Cannot create_host() (error 20) or join_host() (error 25) on macOS #9
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
Comments
Can confirm - this error happens on my Mac too (macOS 14 on M1 Pro) |
These error combinations confirm that steam sockets is null. I don't use Mac, but perhaps I should confirm that Steam is initializing correctly before calling these functions. I'll check if we have a similar problem on godotsteam. |
FWIW GodotSteam picks up user personas and lobbies perfectly fine. |
The bug happens in Macbook M2 Pro also. |
This is still happening. Is there any way to fix the MacOS build? |
Currently, no. It seems to be an issue with ENet and not this repo. If you just using only using gdscript, then you out of luck for now I'm afraid. In C# there are more options: Even Steamworks.Net doesn't work on macOS, its a damn shame, but it is what it is. I don't have enough C++ knowledge to try fix it :( |
Update 0.2.0 change steam api to steam flat api trying to solve this problem. |
It still doesn't work on my mac : same error. |
I am also getting a Cannot host... 2 error after fixing the framework files folder locations |
sorry before I updated windows worked normally, mac os gave error 2 before updating, and after updating |
Can also confirm that the issue persists after the update, let me know if I can help you debug on MacOS @scriptsengineer |
@Lucas-gronlund I would appreciate it if you would like to try to debug it, I don't have a Mac and that prevents me from checking what is happening here. |
I'm happy to help test on a Mac. What do you need me to do? |
@scriptsengineer do you want to hop on a Zoom and figure this out together? I'd love to figure this out as it would help speed up my development and not need to push to my Steamdeck to test out Steam connections |
@jordanmichaelrushing Thank you for your attention, but I am currently very busy with external work, and I also don't have a Mac (which is why the bug is still open) |
I came across this issue a couple of days ago, as I've also run into the same issue, on an M4-based MacBook Pro, an Intel-based MacBook Pro, and an Intel-based Hackintosh. I managed to build the plugin and tinker a bit with some of the surface-level code to see that my build was actually "working", but I'm new and/or rusty with everything involved, so I don't know where to go from here. I can confirm that the @scriptsengineer is there anything I can do to help move the issue along? I could try out experimental builds and provide you with logs or such, or like @jordanmichaelrushing suggests, we could hop on a screen sharing session if you have time (I might be able to flex around your busy schedule), and you could try to debug stuff through one of my setups? |
@garbagemule It seems very useful to me to try to see the differences between godotsteam, confirming that in godot steam the sockets work on mac? |
@scriptsengineer Yes, that's my observation at least - kind of. The I'm making a huge assumption here that What's odd to me is how it works perfectly fine on Windows. Could it be some sort of linking/library issue on the macOS builds? |
@scriptsengineer After a bit of faffing around, I managed to compile GodotSteam with MultiplayerPeer, and I inserted a call to |
@garbagemule |
Finally found this thread and realized it's causing my issues as well. Does this mean that if we export our projects they will also not run for Macs? @garbagemule is there anything that we can do to help you debug this? I would love and try and get this figured out |
@scriptsengineer I'm not sure if anything needs to be done to "initialize" the Steam SDK, but I'm guessing as long as the binaries are properly linked/available, the functions in the header files should "just work". Do you know if there's a way to confirm that the build process works as intended and that the correct libraries and binaries are being used? I've already forgotten most of the stuff I had to do to get stuff working, but I recall having to rename some binaries for the build script to pick them up. I'm not sure if I used the right ones, though. I'm also not sure if the signing process is necessary for anything other than pacifying GateKeeper (my builds were very dangerous according to macOS 😁), but I skipped that part. @TristanLMartin That's correct. We currently can't build projects that will run on macOS using this plugin. At this point in time, I think the biggest issue is that there is a huge knowledge gap between "people on macOS" and "people with Godot/Steam/C++ know-how", as well as a "hardware gap", if you will. I don't know enough about GodotSteam, the SteamSDK, and the building/linking process to effectively troubleshoot the problem, and @scriptsengineer doesn't have the necessary hardware to run experiments on. With our powers combined, we could probably figure something out, but it would be a long and arduous effort. An asynchronous workflow is definitely way too slow here. Maybe our best bet is to "recruit" one of the macOS-savvy folks over at the GodotSteam project and ask them to take a look? |
@garbagemule @TristanLMartin Possibilities already raised:
|
And are we confident that it's not also an issue on Linux? It seems so strange that it would be a MacOS only issue |
Updated for version 0.2.3 I hope that someone who has a mac will test for myself, Nessa versão updatei a geração de arquivos do mac para não ter assinatura, because in another lib (Inventory system) this problem was reported and then this update all returned to working normally on the mac. https://github.com/expressobits/steam-multiplayer-peer/releases/tag/addon-0.2.3 |
Just did a quick test and same issue so far, would love to see if @garbagemule has the same issue, I will try and test it a bit more tomorrow and see if it is having an issue in the same place or something different |
So far, this problem still exists. |
No luck with 0.2.4 for me either 🙁 I just took another nose dive into the various code bases (GodotSteam with the MultiplayerPeer module and steam-multiplayer-peer), but unfortunately I don't have anything significant to report back with. My goal going in was to try to figure out A) if there is any sort of runtime setup/linking going on, and B) if there are discrepancies in the build configuration. Feel free to skip the fenced section of my ramblings 😛 First, runtime setup/linking. I think I'd need a much better understanding of "how stuff loads" in Godot to be able to really dig more into things. It looks like the primary "hook" is the This was a good segue to the build configurations. It looks like the MultiplayerPeer module in GodotSteam just kind of "inherits" the Steam SDK setup from the GodotSteam module itself. It uses an SCsub file rather than an SConstruct file, which I'm assuming just means it's a sub-module of sorts. It just seems to add a couple of .cpp files to the build configuration (ref), which I assume isn't significant. The GodotSteam module itself also has an SCsub file, and it adds The GodotSteam GDExtension and steam-multiplayer-peer have similar SConstruct files, but the former uses a nested folder structure for the compiled binaries (ref). I tried replicating that in steam-multiplayer-peer, but it didn't help (assuming I did it right). One thing I noticed was a discrepancy between the At this point I feel like I know just a little bit more, but it's not enough to make any headway, and I still feel like I'm stuck at square one. My usual approach in a situation like this is to cut away as much complexity as possible and try to create a minimal working setup and build from there. In this case, I think it would be a Godot extension that uses the Steam SDK to get a user's steam ID and nothing else. If I can make that work, I think I've successfully interfaced with Steam, and perhaps I'd know enough to try to properly debug steam-multiplayer-peer. But I've never made a Godot extension, I've never worked with the Steam SDK, and I'm not particularly fond of or savvy at C++, so a minimal project like this is a pretty big undertaking in and of itself. @scriptsengineer would this be something you'd be able to make? As long as it's super small (as little code as possible) and works on Windows and/or Linux, I would perhaps be able to work from there. It's just the whole starting up an extension and writing the C++ that's jarring to me 😁 |
Alright, I ended up actually trying to make an extension myself. Turns out the Godot documentation is pretty darn good, so I had the tutorial C++ GDExtension project up and running pretty quickly. I don't know that I've found any root causes, but I have made some headway! After getting the tutorial extension running in a brand new project as per the instructions, I decided to try taking a stab at the Steam SDK. I set things up much like how it's done in steam-multiplayer-peer and the GodotSteam GDExtension, but I stripped the Then I added the GodotSteam GDExtension 4.4 from AssetLib, and everything still worked. But then I added I have documented the process and the sample project here: https://github.com/garbagemule/tutorial-gdextension-with-steam I'm no longer convinced that it's purely a matter of library linking (the tutorial extension works as long as the GodotSteam GDExtension is not invoked), but perhaps instead some sort of conflict between two "components" trying to work with the Steam API at the same time. I'm assuming there is no such conflict on Windows, since it all seems to work fine there, but if someone can modify my project to also support Windows, perhaps we have a fairly "complete" minimal sample project to pass over to someone with more knowledge of the Steam API and/or macOS? |
I thought the issue occurs when instantiating the SteamMultiplayerPeer, not when calling SteamInit or even creating a steam lobby, those seem to work for me with the GDExtension. It seems strange that an issue is happening for you when calling Steam.steamInit For me I'm able to successfully call SteamInit, create a lobby, and then it returns an error for can't create when calling SteamMultiplayerPeer.new() |
Tested both on macOS and windows. On Widows everything works well with same code

The text was updated successfully, but these errors were encountered: