godot: RPC is broken in 4.4 dev2

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): Screenshot (10) There are 2 issues:

  1. RPC node checksum is failing (don’t know why)
  2. All RPCs are being called with 0 or sometimes 1 argument

This is what happens in 4.4 dev1 and 4.3: Screenshot (11) 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 broken

Steps to reproduce

Use a project with networking features in 4.4 dev2

  1. Run 2 instances of the game
  2. In one, host the game (there should be no errors yet)
  3. Join the game in the second one and there’s where all errors should appear

Minimal reproduction project (MRP)

n/a

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 2
  • Comments: 15 (6 by maintainers)

Most upvoted comments

I’ve opened https://github.com/godotengine/godot/pull/96915 which fixes the issue (at least in my tests, including the one mentioned by @QJPG ).

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.

image image

I was able to reproduce on a bigger project, I think I understand what’s going on, I’m working on a fix.

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 😃

I spent the last 4 hours trying to compile Godot but for some strange reason I am not able to compile it (I’m new to C++, git and visual studio) Big thanks to stfufane and Cykyrios for testing it, based on their comments I will say the issue was fixed

@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 😃

I can still reproduce this in v4.4.dev.custom_build [2c136e617]. Edit: I see a few more commits made their way into master, so still reproducible in 18cdfb81.

I tested on one of my projects, having the same issue. git bisect says this was introduced in 154049ce1792a6e12b990e0a414a6c084c3b91c5.