UNET Player Object Creation Error: Failed to spawn server object

I am attempting to create a player object for a connecting client. I have set the PlayerPrefab variable to be an empty object with a NetworkIdentity attached to it. The issue is that once the client connects, the player object is created on the server but the client gets this error:

Failed to spawn server object
UnityEngine.Networking.NetworkIdentity:UNetStaticUpdate(). 

I am not sure if there is something that I have set up incorrectly on the server or client in order to get this error. The client does connect to the server and switch scenes successfully just before this happens.

So for anyone else dealing with this problem, I found my solution. I have my client and server code in two separate projects which was an issue because the player prefabs for the client and server must share the same meta file in order to work. This could also be the case for any networked object someone might want to create through NetworkServer.Spawn() but I have not tested it personally. Good luck to anyone dealing with a similar issue.