Accessed None "Add to Viewport" at start of game (Dedicated server)

I’m running into a weird issue here… It only happens on the client if I have Dedicated server on.
It’s giving me this error

And here’s the blueprint including where it’s called

It’s not doing anything though, everything works fine, it’s just showing this error for some reason.

I have the same blueprint structure for when you click buttons and the menu changes, and when I do that I get no errors. This only happens with the main menu right as I click Play to launch the game. However it also happens if I change the first menu to appear to any of the other menus that I have, so it seems to be some kind of issue with setting the menu reference variable before the game launches properly?

I have tried adding a delay at various points in the stream but it doesn’t help.
It happens on Standalone mode as well.

Edit: this is all in the game instance BP.

I’m noticing the error refers to the instance…

Where are you creating & adding the widget to the viewport?? …is it inside the instance?

It is, forgot to say that in the OP

ok - that makes sense

Remember the primary function of the instance is to save variables, etc from level to level

I would suggest creating the widget and adding it to viewport in another BP (possibly the player controller for example)

This should eliminate the problem

Also keep in mind, all BP’s can get a valid reference to the game instance on event begin play by “get game instance” and casting to it. So if it’s just a matter of having an immediate valid reference, this may also work for you.

But generally speaking, I would keep widget creation in Character BP, Controller, Level BP

Hope this helps !