Hi everyone,
For the past few days I’m struggling with a very odd behavior in UE.
This code that I’m sharing here, kicks me out of the server with this error (some times it doesn’t prints that):
LogRep: Error: Rejected RPC function due to access rights. Object: InteractManagerComponent /Game/Game/Maps/FirstPersonMap.FirstPersonMap:PersistentLevel.BP_PlayerCharacter_C_1.InteractionManager, Function: Server_Interact
Now it’s gets even weirder, because when my friend is joining my session and calling this function nothing happens. But when he host the game and I call that function it kicks me out instantly.
This happens when launching the package game, and hosting a listen server on Steam online subsystem.
In editor everything works, this happens only in packaged game.
I really need some help I tried everything that I know to try to solve this but nothing works.
I can’t find anything online as well about this error.
The input mapping is assigned using Lyra’s experience definition. Any other input that call a Server RPC works good.
Code:
InteractionManager = CreateDefaultSubobject<UInteractManagerComponent>(TEXT("InteractionManager"));
// Adding this in the PlayerCharacter CPP init function.
// This component is set to replicates by default.
UFUNCTION(BlueprintCallable, Category="Interaction")
void Interact(); // This function calls Server_Interact. Just that nothing else.
UFUNCTION(BlueprintCallable, Category="Interaction")
void EndInteraction();
UFUNCTION(Server, Reliable, Category="Interaction", WithValidation)
void Server_Interact();
UFUNCTION(Server, Reliable, Category="Interaction", WithValidation)
void Server_EndInteraction();
bool UInteractManagerComponent::Server_EndInteraction_Validate()
{
return true;
}
bool UInteractManagerComponent::Server_Interact_Validate()
{
return true;
}
void UInteractManagerComponent::Server_Interact_Implementation()
{
// There's nothing in the function, no logic at all.
}
void UInteractManagerComponent::Server_EndInteraction_Implementation()
{
// There's nothing in the function, no logic at all.
}
Before that logs no errors.
[2024.11.18-19.25.54:143][ 46]LogRep: Error: Rejected RPC function due to access rights. Object: InteractManagerComponent /Game/Game/Maps/FirstPersonMap.FirstPersonMap:PersistentLevel.BP_PlayerCharacter_C_1.InteractionManager, Function: Server_Interact
[2024.11.18-19.25.54:755][118]LogNet: NMT_CloseReason: (Server Disconnect Reasons) 76561198000134776:7777
[2024.11.18-19.25.54:755][118]LogNet: - ObjectReplicatorReceivedBunchFail
[2024.11.18-19.25.54:756][118]LogNet: UChannel::ReceivedSequencedBunch: Bunch.bClose == true. ChIndex == 0. Calling ConditionalCleanUp.
[2024.11.18-19.25.54:756][118]LogNet: UChannel::CleanUp: ChIndex == 0. Closing connection. [UChannel] ChIndex: 0, Closing: 0 [UNetConnection] RemoteAddr: 76561198000134776:7777, Name: SteamNetConnection_0, Driver: Name:GameNetDriver Def:GameNetDriver SteamNetDriver_0, IsServer: NO, PC: BP_PlayerController_C_0, Owner: BP_PlayerController_C_0, UniqueId: STEAM:MyUserNameHere [0x11000015ED08BDB]
[2024.11.18-19.25.54:756][118]LogNet: UNetConnection::Close: [UNetConnection] RemoteAddr: 76561198000134776:7777, Name: SteamNetConnection_0, Driver: Name:GameNetDriver Def:GameNetDriver SteamNetDriver_0, IsServer: NO, PC: BP_PlayerController_C_0, Owner: BP_PlayerController_C_0, UniqueId: STEAM:MyUserNameHere [0x11000015ED08BDB], Channels: 28, Time: 2024.11.18-19.25.54
[2024.11.18-19.25.54:757][118]LogNet: UNetConnection::SendCloseReason:
[2024.11.18-19.25.54:757][118]LogNet: - Result=ControlChannelClose, ErrorContext="ControlChannelClose"
[2024.11.18-19.25.54:757][118]LogNet: UChannel::Close: Sending CloseBunch. ChIndex == 0. Name: [UChannel] ChIndex: 0, Closing: 0 [UNetConnection] RemoteAddr: 76561198000134776:7777, Name: SteamNetConnection_0, Driver: Name:GameNetDriver Def:GameNetDriver SteamNetDriver_0, IsServer: NO, PC: BP_PlayerController_C_0, Owner: BP_PlayerController_C_0, UniqueId: STEAM:MyUserNameHere [0x11000015ED08BDB]
[2024.11.18-19.25.54:757][118]LogNet: Error: UEngine::BroadcastNetworkFailure: FailureType = ConnectionLost, ErrorString = Your connection to the host has been lost., Driver = Name:GameNetDriver Def:GameNetDriver SteamNetDriver_0
[2024.11.18-19.25.54:758][118]LogNet: Warning: Network Failure: GameNetDriver[ConnectionLost]: Your connection to the host has been lost.
[2024.11.18-19.25.54:758][118]LogNet: NetworkFailure: ConnectionLost, Error: 'Your connection to the host has been lost.'
[2024.11.18-19.25.54:758][118]LogLoadingScreen: Showing loading screen when 'IsShowingInitialLoadingScreen()' is false.
[2024.11.18-19.25.54:758][118]LogLoadingScreen: We have pending travel (the TravelURL is not empty)
[2024.11.18-19.25.54:762][118]LogLoadingScreen: Loading screen showing: 1. Reason: We have pending travel (the TravelURL is not empty)
[2024.11.18-19.25.54:764][119]LogGlobalStatus: UEngine::Browse Started Browse: "/Game/Maps/L_MainMenu?closed"
[2024.11.18-19.25.54:764][119]LogNet: Browse: /Game/Maps/L_MainMenu?closed
[2024.11.18-19.25.54:764][119]LogNet: Connection failed; returning to Entry
DefaultEngine.ini
[OnlineSubsystem]
DefaultPlatformService=Steam
bHasVoiceEnabled=True
[OnlineSubsystemSteam]
bEnabled=true
SteamDevAppId=480
bInitServerOnClient=true
[/Script/OnlineSubsystemSteam.SteamNetDriver]
NetConnectionClassName="OnlineSubsystemSteam.SteamNetConnection"
[/Script/Engine.GameEngine]
+NetDriverDefinitions=(DefName="GameNetDriver",DriverClassName="OnlineSubsystemSteam.SteamNetDriver",DriverClassNameFallback="OnlineSubsystemUtils.IpNetDriver")
// This is a plugin for proximity chat that use a different net driver.
[/Script/Engine.NetDriver]
+ChannelDefinitions=(ChannelName=OnsetVoip, ClassName=/Script/OnsetVoip.OnsetVoipDataChannel, StaticChannelIndex=3, bTickOnCreate=true, bServerOpen=true, bClientOpen=true, bInitialServer=true, bInitialClient=true)