-
-
Notifications
You must be signed in to change notification settings - Fork 22k
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
RPC is broken in 4.4 dev2 #96889
Comments
I'm also having the same problem. I used "rpc_config" to try to fix it and it didn't work. |
I tested on one of my projects, having the same issue. git bisect says this was introduced in 154049c. |
CC @rune-scape @godotengine/network |
This may have been fixed by #96586 after |
Can someone provide a minimal reproduction project? I tried setting up one, but wasn't able reproduce the issue in |
also having this issue on my project |
I was able to reproduce on a bigger project, I think I understand what's going on, I'm working on a fix. |
I created a very simple example to test this error. On the first attempts nothing happened, but after testing more than a few times it started printing error messages. extends Control
@rpc("authority", "call_remote", "reliable")
func _send_hello(_msg : String) -> void:
print(_msg)
@rpc("authority")
func _alternative_send_hello(_msg : String) -> void:
print( _msg)
func _ready() -> void:
$Host.button_down.connect(func():
var enet := ENetMultiplayerPeer.new()
enet.create_server(8081)
multiplayer.multiplayer_peer = enet
await multiplayer.peer_connected
print(multiplayer.get_peers())
_send_hello.rpc("Hello")
)
$Conn.button_down.connect(func():
var enet := ENetMultiplayerPeer.new()
enet.create_client("127.0.0.1", 8081)
multiplayer.multiplayer_peer = enet
await multiplayer.connected_to_server
print('Connected! Waiting for message...')) I started two separate instances and when the other one connected, it would automatically receive a message from the server. In other projects, using this version, the error occurred because it called an RPC function that was not the one being called by the script. |
This fixes the issue on my end as well, thank you! |
I will check if it fixes the issue in couple of hours when I get home. In the meantime, thank you guys and @Faless for being so fast to solve this issue! (commenting this from GitHub mobile) |
Hey there, just tested the 4.4 dev2, got the bug, pulled the branch from @Faless and everything is working again, thanks for the great reaction :) |
@jeadhz If you're interested, you can try downloading an artifact build from GitHub, by selecting "Checks" at the top of the PR and clicking on the top entry in the list on the left. Here's a direct link: https://github.com/godotengine/godot/actions/runs/10833526572 scroll to the bottom for the different platforms ... or since it's merged now, wait until the next dev build :) |
Tested versions
Only in 4.4 dev2
In 4.4 dev 1 or 4.3 it doesn't happen
System information
Windows 10, Godot 4.4-dev2
Issue description
This is happening in dev2 (dev1 is fine):

There are 2 issues:
This is what happens in 4.4 dev1 and 4.3:

As you can see, no errors and the project runs fine
ps: I don't know if this may have something to do with it but the editor's autocompletion for
@rpc
is brokenSteps to reproduce
Use a project with networking features in 4.4 dev2
Minimal reproduction project (MRP)
n/a
The text was updated successfully, but these errors were encountered: