custom multiplayer sending rpc to root node instead of node of origin

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

I’m attempting to set up a gateway server and when using the custom multiplayer to connect as a client to the game server I get this error on the game server: _process_rpc: RPC ‘connect_auth’ is not allowed on node /root from: 999591611. Mode is 0, master is 1.

the scripts have the exact same node structure and everything, here’s the client code:

extends Node

const GAME_SERVER_IP = "127.0.0.1"
const GAME_SERVER_PORT = 19382

var client = NetworkedMultiplayerENet.new()
var custom_api = MultiplayerAPI.new()

func _ready():
    connect_to_game_server()

func _process(delta):
    if get_custom_multiplayer() == null:
	return
    if not custom_multiplayer.has_network_peer():
	    return
    client.poll()


func connect_to_game_server():
    client.create_client(GAME_SERVER_IP, GAME_SERVER_PORT)
    set_custom_multiplayer(custom_api)
    custom_multiplayer.set_root_node(self)
    custom_multiplayer.set_network_peer(client)
    client.connect("connection_succeeded", self, "on_connected_to_game_server")
    client.connect("connection_failed", self, "on_connection_failed")

func on_connected_to_game_server():
    print("connected to server")
    yield(get_tree().create_timer(1), "timeout")
    self.rpc_id(1, "connect_auth")

func on_connection_failed():
    print("connection to game server failed")