Deferred messages were received for a trigger of type OnSpawn with key 0, but that trigger was not r

I hope I'm putting this thread in the right place, apologies if not.

I've scrounged through every unity forum and tried every option available and keep seem to fix this issue but I'm new to unity and haven't been able to fix it for days.

Basically I'm just shooting guns from my client and trying to have the TrailRenderer show up on the server, I thought for a while it was an issue with how I was creating my tracer but when i started putting debug statements around I found that I'm actually running the line that calls the rpc, but then when I do nothing happens, I've tried putting Debug statements in it to see if those will even print but they won't. Im assuming it all has to do with this warning that I keep getting but I have no clue how to fix it. Any help would be great.

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using Unity.Netcode;

public class RaycastWeapon : NetworkBehaviour
    public bool isFiring = false;
    public int fireRate = 25;
    public ParticleSystem muzzleFlash;
    public ParticleSystem hitEffect;
    public TrailRenderer tracerEffect;
    public Transform raycastOrigin;
    public Transform raycastDestination;
    public string weaponName;
    public AudioSource sound;
    Ray ray;
    RaycastHit hitInfo;
    float accumulatedTime;
    public ActiveWeapon.WeaponSlot weaponSlot;
    public int weaponDmg;

    public void StartFiring(){
        isFiring = true;
        accumulatedTime = 0.0f;

    public void UpdateFiring(float deltaTime){
        accumulatedTime += deltaTime;
        float fireInterval = 1.0f / fireRate;
        while(accumulatedTime >= 0f){
            accumulatedTime -= fireInterval;

    public void FireBullet(){
        sound.PlayOneShot(sound.clip, 0.5f);

        ray.origin = raycastOrigin.position;
        ray.direction = raycastDestination.position - raycastOrigin.position;
        if(Physics.Raycast(ray, out hitInfo)){
            hitEffect.transform.position = hitInfo.point;
            hitEffect.transform.forward = hitInfo.normal;
            SpawnBulletServerRpc(ray.origin, hitInfo.point, true);

    private void HandleBulletSpawning(Vector3 origin, Vector3 end, bool hit){
        var tracer = Instantiate(tracerEffect, origin, Quaternion.identity);
        Debug.Log("Bullet Spawned");
        tracer.transform.position = end;

            hitEffect.transform.position = end;
            hitEffect.transform.forward = hitInfo.normal;
            if(hitInfo.collider.tag == "Objective"){
                ObjectiveController obj = hitInfo.collider.GetComponent<ObjectiveController>();
                obj.ObjHealth -= weaponDmg;
                obj.teamColor = transform.root.gameObject.GetComponent<Renderer>().material;


    [ServerRpc(RequireOwnership = false)]
    private void SpawnBulletServerRpc(Vector3 rayOrigin, Vector3 tracerEnd, bool objectHit){
        HandleBulletSpawning(rayOrigin, tracerEnd, objectHit);

        private IEnumerator DespawnTracerAfterLifetime(TrailRenderer trailRenderer)
        yield return new WaitForSeconds(0.25f);
    public void StopFiring(){
        isFiring = false;

I realize the message got cut off in the header: [Netcode] Deferred messages were received for a trigger of type OnSpawn with key 0, but that trigger was not received within within 10 second(s).

Searching the forum for 'Deferred messages' brings up a lot of hits so have a look through those if you haven't already.

Is this error showing up on the server? It sounds like there's a mismatch between the client and server's RaycastWeapon network object. Do they have the same networkObjectId?