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 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 expected behavior in C++ projects, however this is supposed to not be case for BP projects.

Hi zellyman,

Thanks for 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 normal behavior?

It does not work when passing variable by reference to a macro and using Assign or Set value (by ref) nodes. value is changed, client gets notify, 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 starter content and it should be small enough. Thanks!

I reproduced 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 host in project attached below. All you have to do is to launch it as a single player, no need to form connections or anything else. map you launch firstly sets variable gently and prints prove it works well, then it proceeds to set variable through a macro and it fails although 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 code it looks like at first way of setting variable, there is simply added a virtual box in blueprint to directly call repnotify for that variable, which is not happening in second case, simply because repnotify is not defined inside macro but level above (blueprint calling macro) and it cannot find it thus it doesn’t call it.

I did find a workaround, I simply output variable from macro and use regular set outside of it, which is what you can do, macro is already prepared for that. When you add Set behind macro 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 quick reply.

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

Thanks for test project! I see what you were saying now, and I can reproduce behavior here. I have entered a bug report for 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 simple ++/-- operation in blueprints on a replicated variable wont call notify event on listen server - but on client!

What is status of this bug?

Nvm My problem was that I was modifying a actor and not a character I had ownership of. issue was that if I locally modify a variable with repnotify selected, it will call local repnotify function but server will never acknowledge my modification of variable so 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 ++ is NOT firing RepNotify

Hey Genova,

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

It’s a shame this bug still isn’t fixed. I run into 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 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 server by prints and “switch has authority.”

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

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

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

1 Like