Issues with several errors

Greetings, Photon-People,

I am working on a college project and we have decided to use Photon Cloud with PUN for networking.

However, we keep getting the same errors over and over:

PHOTON ERROR: This should never be possible: Two PhotonViews with same ID registered? ID=2 CapitalShip(Blue) and CapitalShip(Red)
This occurs when we enter the room. We have two ships, and even though the inspector shows us that they have a different view ID, we get the error.

Can't find GO in instantiation list. Object: Bullet(Clone) (UnityEngine.GameObject)
This occurs when we engage in a battle with other players, and shoot bullets to one another.

ERROR: Illegal destroy request on view ID=2002 from player/actorNr: 2 view= orgPlayer=Player71725
This also occurs during battles.

We dont understand where these errors come from. We are trying to shoot players with bullets and then destroying the bullets and explosions using the following functions:

Only the owner of the object tries to destroy it, for certain.

Anyone able to shed some light on these errors? It would be greatly appreciated.

Looking forward to your awnser,


  • Tobias
    I can't say exactly in your case but we might be able to find the cause eventually.
    a) You need to play the same builds of the game against each other. So, if you change the GOs in the scene and let this change play against an older client, this will break.
    b) You need to make sure the scene is loaded completely before RPCs are applied. If you change scenes regularly, apply a LevelPrefix and while loading the new scene, set IsMessageQueueRunning to false. Read: ... #_messageQ
    c) This could also be a problem with the scene object view IDs and prefabs. Usually, the PhotonView Inspector should fix those automatically but if you disable the Inspector (setting it to debug) won't run our scripts on them. If you change prefabs' IDs or add new PhotonViews to those, the Editor could get confused. The next PUN version should fix this.
  • Hi, thanks for the quick reply!

    I am pretty sure that A and B don't apply to us. We are working with our project in dropbox, and it is getting synced constantly. We are also using the IsMessageQueueRunning with loading our level.

    I guess that C is our issue, so we will paciently wait untill that comes around.
  • Tobias
    I posted a more recent PUN version for other reasons but returning to this topic, I wonder if this helps you too.

    Please check this post and test the attached package:
    Make sure the import of the .cs stuff is complete and replaces all your PUN files.
    Open your scene with the new PUN code loaded and inspect a few game objects with PhotonViews.

    Let me know if this affects your problems or doesn't change anything.
  • Worked like a charm, thanks a lot!
  • Tobias
    Good to read it helped :)
    Thanks for the update.
  • Mishaps
    getting similar issues "Two PhotonViews with same ID registered" and "Received OnSerialization for view ID 1000. We have no such PhotonView! "
    No probs first game I connect to after load but I get these errors every time on the second game i connect to.

    I tried importing the package with the fix but didn't seem to help. Any idea when the next version of PUN will be out with the fixes?
  • Tobias
    Mishaps: Do you use isMessageQueueRunning?
    Set it false when you get the RPC/trigger to change the level. Then load and set it to true again to receive incoming data again in the new level.
    When you change levels, you also destroy and load a lot of game objects that might send updates. This might require some adjustment to get right.
  • Mishaps
    Thanks Tobias. I haven't used isMessageQueueRunning yet but I'm only using one scene. I'm not sure where I could use it without blocking my prefabs and RPCs from loading over the network anyway?
    When I start a multiplayer game I just change some gui stuff run a matchmaker. Its fine on the first game I connect up (just loads a couple of prefabs over the network and sends one RPC). I exit to the main menu and leave the room and disconnect. Then I re-connect again, get two players in a room again and get those errors. No idea why this happens only on the second game? I thought photon should clean up everything when you leave a room or disconnect. In Javascript and Unity 4 if that helps.
    Spent a few days on this but I couldn't reproduce the same issues in the marco-polo tutorial so I guess the cause is something I'm doing lol. Tomorrow I'll try re-using the marco-polo code more directly and see if the prob goes away. Anything else you could think of would be helpful! cheers!
  • Tobias
    Sorry for the late reply. We've been on holidays/vacations. Happy new year, by the way :P

    The isMessageQueueRunning value is only helping if you switch scenes or load assets for a while. Otherwise, you can skip setting it.

    The errors "Two PhotonViews with same ID registered" and "Received OnSerialization for view ID 1000. We have no such PhotonView!" both have to do with viewIDs. If you use PhotonNetwork.Instantiate, they should not really happen, so something must be different from what we usually do / test.

    If you could send me a repro project, this could really help identify the issue.
  • Mishaps
    Not sure about Morgaza but my issues were resolved by switching from single-secene to a multi-scene setup :D
    If you still want to see the original issue you can get the repo project here: viewtopic.php?f=17&t=2300. Using standard photon instantiate so no idea why it was happening. Since changing scenes fixed everything I'm guessing it was not cleaning up something it was suppose to?
  • Tobias
    Yes, changing rooms should clean up everything in the scene, so it should work the way you planned it.
    I will take a look. Working on improved viewID assignment, too.