Odd error, Failed to network-remove on player join

Options
I am testing out my game by running two versions on the same machine and I get a weird error when the second client connects to the game. Here is the error:

Failed to 'network-remove' GameObject. Client is neither owner nor masterClient taking over for owner who left: View (0)37 on PickUpFullHelm (scene)

Now what is weird is that I get this error for all objects that have been spawned in, as well as a few objects that are not spawned. Everything is working an I have no errors with the actual game play, this just seems like an odd error to be thrown randomly. Any ideas on what is going on?

Comments

  • Hi @CorvaNocta,

    the error states that you are trying to remove a networked object somehow, but it fails because of the mentioned reason (client is neither owner nor MasterClient). Can you confirm that you don't use PhotonNetwork.Destroy(...) in the Joining-Process of the second client?

    How are those objects instantiated? Do you instantiate them at runtime by using PhotonNetwork.Instantiate(...) or are those objects already placed in the scene?
  • CorvaNocta
    Options
    Thanks for the reply! I am searching through my code but I haven't found anywhere that uses the PhotonNetwork.Destroy () outside of specific functions like when I kill a monster. I don't see anywhere that it should be calling Destroy when a player connects so I'm a little confused.

    That's the extra weird part, it throws the error for some items that are instantiated with PhotonNetwork.Instantiate () and items that are placed in the scene before I run the game. They do however all have scripts with the PhotonNetwork.Destroy in them. I'm just not sure why it would try to call it when I join with a new player. Its odd