RepNotify callback not run on server in blueprints despite assertion from team that it is supposed to

Steps to reproduce:

  1. Create replicated variable set to RepNotify
  2. Create function on the repNotify callback that prints a string or something
  3. Add breakpoint to node you just made
  4. Set debug filter to “Listen Server” from “All Worlds”
  5. Observe that breakpoint never breaks when variable is changed via method of your choice
  6. Set debug filter to “client_1” from “Listen Server”
  7. Observe that breakpoint is now hit

My understanding is that this is the expected behavior in C++ projects, however this is supposed to not be the case for BP projects.

Hi zellyman,

Thanks for the report! I was able to reproduce this in 4.6.1, but it appears that it has already been fixed internally and should behave as expected in 4.7. Thanks!

Hey guys, I’m using 4.7.3 with blueprints and I’m facing this situation
Is it a bug or the normal behavior?

It does not work when passing the variable by reference to a macro and using Assign or Set value (by ref) nodes. The value is changed, the client gets the notify, the server does not. Version 4.7.5

Hi vipeout,

I haven’t been able to reproduce this issue in 4.7. Can you set up a test project and attach it here? Use a new blank project without the starter content and it should be small enough. Thanks!

I reproduced the exact same issue on a fresh 4.7.6 project without starter content. I’m downloading 4.8.1 right now to verify whether it works there or not.

RepNotify is not called on the host in the project attached below. All you have to do is to launch it as a single player, no need to form connections or anything else. The map you launch firstly sets the variable gently and the prints prove it works well, then it proceeds to set the variable through a macro and it fails although the value is changed.

You can also check whether it works with a function instead of macro or with ‘Assign’ node instead of ‘Set val (by ref)’. For me it’s broken in all those cases.

From the code it looks like at the first way of setting variable, there is simply added a virtual box in the blueprint to directly call repnotify for that variable, which is not happening in the second case, simply because the repnotify is not defined inside the macro but the level above (blueprint calling the macro) and it cannot find it thus it doesn’t call it.

I did find a workaround, I simply output the variable from the macro and use regular set outside of it, which is what you can do, the macro is already prepared for that. When you add the Set behind the macro the second way also works, although it’s quite problematic solution - expect everyone to remember to put set behind your macro so it works.

Thank you for the quick reply.

UPDATE: 4.8.1 also fails to call RepNotify on host. Migrated the project to new version, ran it, the same problem.

Thanks for the test project! I see what you were saying now, and I can reproduce the behavior here. I have entered a bug report for the issue (UE-18081) and I’ll let you know when I see an update on it. Thanks again!

Bug still exists in 4.9.1 Using the simple ++/-- operation in blueprints on a replicated variable wont call the notify event on the listen server - but on the client!

What is the status of this bug?

Nvm My problem was that I was modifying a actor and not a character I had ownership of. The issue was that if I locally modify a variable with repnotify selected, it will call the local repnotify function but the server will never acknowledge my modification of the variable so the repnotify on server and other clients will not be called.

Make sure you have ownership of your objects before you modify them.

On 4.10, i confirm the ++ is NOT firing the RepNotify

Hey Genova,

You can check the status of the issue here: Unreal Engine Issues and Bug Tracker (UE-18081)

It’s a shame this bug still isn’t fixed. I run into the same issue and now have to create a whole workaround just because of it.

Come on, guys, let’s get this fixed. This is still broken in 4.18.3 I believe. I have a very helpful little mini-macro I’d like to write, but I need to be able to set w/ notify on a variable passed by reference.

Incidentally, there was previously a bug on my project due to this problem, too. It took quite a while to figure out that the increment wasn’t working as expected.

+1 its still a thing. 4.18

Still a thing in 19.2 - Ive spent way too many hours trying to track an inventory bug down due to this >_<…

I think I’m getting this issue.

In Game State, I have an event called “Battleship Destroyed” which is confirmed executing on the server by prints and “switch has authority.”

I have Gamemode listening for the repnotified variable. No callback on server :frowning:

Confirmed working without using “incrementint” node. Something is wrong with the increment node; if I use the increment node, only the client receives OnRepNotify callback for some reason.

Still a problem in 4.25.2 ! Increment and decrement of a integer do not trigger the repnotify on the server. This made me lose so much time before I found out this problem, please fix!

1 Like