Search Unity

The owner requests produce errors: "Only the owner can invoke a ServerRPC that requires ownership!"

Discussion in 'Netcode for GameObjects' started by sahanich1, Mar 27, 2023.

  1. sahanich1

    sahanich1

    Joined:
    Dec 9, 2020
    Posts:
    6
    I'm working on a multiplayer vr app for quest 2.

    Sometimes after a while after the application starts, the NetworkBehaviour components that are on the player object start flooding the console with errors: "Only the owner can invoke a ServerRPC that requires ownership!"

    However, it is the owner that tries to call these requests.

    In this case, the character completely freezes, i.e. no network data is transmitted over it anymore.

    I would appreciate your help in solving this problem!

    Unity version: 2021.3.16.f1
    Netcode version: 1.1.0
    Unity Transport version: 1.3.1

    photo_2023-03-27_11-56-05.jpg
     
  2. RikuTheFuffs-U

    RikuTheFuffs-U

    Unity Technologies

    Joined:
    Feb 20, 2020
    Posts:
    440
  3. sahanich1

    sahanich1

    Joined:
    Dec 9, 2020
    Posts:
    6
    Thank you for your reply!
    I wanted to avoid to set RequireOwnership attribute to False because these calls were made on behalf of the owner of the object. And I was looking for the error elsewhere.

    As a result, somewhere on the forums I found advice to change the order of the NetworkObject components on the player object, and this solved the problem.
     
    RikuTheFuffs-U likes this.