Why am I unable to receive RPC calls from a dedicated server?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Revery42

I have two Godot projects, one for the client game and one for the server that performs all of the game state logic. A remote function is to be called using rpc_id() by the server after a connection is established. I do not expect an issue with the project code itself, as when testing on the local network within the editor for both projects everything works fine. I suspect the issue lies with the generated .pck file used when exporting for a Linux server. I went so far as running Wireshark to confirm that I was receiving relevant packets when the RPC was sent. The packets are making it back from the server, but no incoming RPCs are being detected in the Godot Network Profiler. Could there be some security setting that is stopping external RPCs from being called? Could it be that exporting to a .pck is somehow interfering with Godot’s attempts to find the matching node that contains the remote function?

  • Make sure to open the port RPC uses in the firewall and router. Although I assume this isn’t the issue since you are receiving the packets
  • I believe the RPC are done on the main thread, so make sure your main thread isn’t busy

godot_dev_ | 2023-01-06 16:44

Thanks for the advice, but because I am able to receive the RPC on an internal network setup successfully, and am also able to see the packets when testing with an external dedicated server, I am ruling these things out. I did also disable my firewall with no luck.

Revery42 | 2023-01-07 04:21

:bust_in_silhouette: Reply From: Revery42

Realized this issue was caused by a differing Godot version between the client (v3.3.2) and the Linux server build (previously v3.5.1), d’oh! After ensuring they match, the project worked as expected.