Casting to server events don't fire from client

I think it’s best to just show you…

http://puu.sh/tzYOO/05aef32191.png

I have this bit running locally on my client.

“Server Leave Vehicle” should fire from server, but it doesn’t fire at all. I have only tested this in PIE so I don’t know how it’ll fare in standalone mode.

EDIT: It might not fire any casted events from client at all.

Hello ,

I have a few questions for you that will help narrow down what issue it is that you are experiencing.

Quick questions:

  1. Can you reproduce this issue in a clean project?
  2. If so, could you provide a detailed list of steps to reproduce this issue on our end?
  3. Could you provide screen shots of any other blueprints/settings that may be involved with this issue?
  4. Could you also be sure to list off what types of blueprints you are using when running the logic? (Not all blueprints exist of the server and/or client)
  1. Yes, I have attached a clean project where the issue is reproduced. There’s a cube with a green “?” icon I’ve placed down. Walk towards it and press spacebar to trigger an event. 2 print strings should happen: Overlapping actor, confirming that the character is actually overlapping with the replicated actor and a green “do something” print string which is fired from the server. If you try to perform the action from the client that print string doesn’t fire.
  2. Might be easier to just look at the Blueprint setup, but you just call any event that’s ran on server outside its own blueprint from client. It won’t fire.
  3. See the attached images for my blueprint setup.
  4. In the example project I’ve used the default third person character pawn which is set to replicate. I’ve also made a simple overlapping blueprint for the pawn to interact with. Which is also set to replicate.

Interacting actor:

http://puu.sh/tBtTD/441e8c4af8.png

Logic in the pawn:

http://puu.sh/tBtZM/245e869ed1.png

And here’s the clean project where I reproduced the issue. All I’ve used was the third person example so I could use the pawn to move around and interact.

And here’s the project, generated in 4.15p2. I had to use Dropbox because attachments have a 5.2MB limit.
[link text][3]

After taking a look at your project it appears that the actor does not have an owning client. I have posted a warning from the logs below. An easy way to give the actor an owning client would be to spawn it from an actor that already exists on the client. You could then reference it through that actor. I tested this by spawning ReplicatedBP from the third person character and was able to get the custom event to run as expected. I hope that this information helps.

Warning: “LogNet:Warning: UIpNetDriver::ProcesRemoteFunction: No owning connection for actor ReplicatedBP2. Function DoSomething will not be processed.”

Make it a great day

Isn’t that a bug? Net Load on Client is checked, so that actor should be there on client too no? This wasn’t an issue in previous versions at the very least.

Hey ,

This is not a bug and intended behavior of UE4 and its networking framework. In order for any Actor to replicate from Client->Server, the Actor needs to be owned by a client. Because your ReplicatedBP Actor starts in the world, it isn’t owned by any client, and therefore results in the warning telling you that “No owning connection” could be found and the remote function won’t be called. Or, more simply, the function wont be called because the Actor who is trying to call a replicated function isn’t owned by anything that can call a replicated function.

You will need to make sure that any Actors sending client->server replication calls are owned by something that can manage to send those function calls.

You can also spawn these Actors from the server side, such as in the Game Mode, and then manage the overlap completely on the server side, and then call down to the client(s) with whatever logic you want to have when they overlap.

There is a lot of documentation on the workings of UE4’s networking framework. Here is some of it:

https://docs.unrealengine.com/latest/INT/Gameplay/Networking/
https://docs.unrealengine.com/latest/INT/Gameplay/Networking/Blueprints/
https://docs.unrealengine.com/latest/INT/Resources/ContentExamples/Networking/
https://wiki.unrealengine.com/Replication
https://wiki.unrealengine.com/4_13%2B_Network_Guide
http://cedric.bnslv.de/Downloads/UE4_Network_Compendium_by_Cedric_eXi_Neukirchen.pdf

I get it now, thanks!