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

MacOS "can't open dynamic library / not found in the current scope" errors #23

Open
ismettaha opened this issue Aug 15, 2024 · 2 comments

Comments

@ismettaha
Copy link

After installing the plugin, I was unable to use SteamMultiplayerPeer. I resolved the issue by updating three lines in the steam-multiplayer-peer.gdextension file. Specifically, I added "macos.framework" to the paths of the lines that began with macos.debug, macos.release, and macos.universal. Additionally, I had to remove the ".framework" extension from the release and debug lines.

After making these changes, I encountered errors stating, "... can't be opened because Apple cannot check it for malicious software." To resolve this, I had to manually open each file within the macos.framework directory through Finder to approve.

I am not opening a pull request because I'm unsure if this is an acceptable solution. Thank you.

Updated Lines:
macos.debug = "macos/macos.framework/libsteam-multiplayer-peer.macos.template_debug"
macos.release = "macos/macos.framework/libsteam-multiplayer-peer.macos.template_release"
.
.
.
macos.universal = { "macos/macos.framework/libsteam_api.dylib": "" }

Godot Version: v4.2.2.stable.official [15073afe3]
Steam Multiplayer Peer Version: 0.1.1
OS: MacOS Sonoma 14.4.1

@dev-bre
Copy link

dev-bre commented Aug 15, 2024

yeah I had the same issue. Even fixing the file path, the library still fails on create_host call for me with error code 20

@kafk3d
Copy link

kafk3d commented Sep 14, 2024

yeah I had the same issue. Even fixing the file path, the library still fails on create_host call for me with error code 20

same problem here, godot 4.3 on macos, fixed the paths but got error on create_host with code 2
windows is working

func _on_lobby_created(conn, id) -> void:
	print("Lobby creation attempt. Result: ", conn)
	if conn == 1:
		lobby_id = id
		print("Lobby ID: ", lobby_id)
		print("Creating host...")
		var my_name : String = Steam.getPersonaName()
		if len(my_name) > 17:
			my_name = my_name.substr(0,17) + '...'
		Steam.setLobbyData(lobby_id, "name", (my_name+"'s Lobby"))
		Steam.setLobbyJoinable(lobby_id, true)
		multiplayer_peer = SteamMultiplayerPeer.new()
		print("multiplayer_peer: ", multiplayer_peer)
		var error = multiplayer_peer.create_host(8004)
		print("Host creation result: ", error)
		if error != OK:
			print("Error code: ", error)
			multiplayer_peer.close()
			Steam.leaveLobby(lobby_id)
			SignalBus.display_error.emit("ERROR CREATING HOST CLIENT\nCODE: " + str(error))
			return
		multiplayer.set_multiplayer_peer(multiplayer_peer)
		players[1] = {"name": my_name, "id": Steam.getSteamID()}
		Steam.allowP2PPacketRelay(true)
		_transition_to_lobby()
	else:
		SignalBus.display_error.emit('ERROR CREATING STEAM LOBBY\nCODE: '+str(conn))

logs:

Initializing Steam...
Steam init result: { "status": 0, "verbal": "" }
Steam init result: true
Steam API initialized successfully
Lobby creation attempt. Result: 1
Lobby ID: 109775243920987967
Creating host...
multiplayer_peer: [Wrapped:0]
Host creation result: 2
Error code: 2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants