Thread assert error message when using SmartFoxServer

I am just starting out using SmartFoxServer and am trying to make a very basic "game" where "characters" (cubes) get spawned into a 3D space. I've got this working, but the following line of code seems to be causing a lot of errors to pop up when the 2nd player joins the room.

UnityEngine.Object remotePlayer = Instantiate(remotePlayerPrefab, new Vector3(50, 5, 50), new Quaternion(0,0,0,1));

I get errors like the following and can't figure out why this code would cause this, but this is the only code executed when a user joins the room and the error doesn't happen if I comment it out.

!Thread::EqualsCurrentThreadID (m_AllocThread) !Thread::EqualsCurrentThreadID(GetPersistentManager().GetMainThreadID()) && mode != kCreateObjectDontRegisterInstanceID !Thread::EqualsCurrentThreadID(GetPersistentManager().GetMainThreadID()) m_ThreadCheck && !Thread::EqualsCurrentThreadID(m_ThreadID)

I'll think this Link help you

Make sure you're running your Smartfox client in queue mode; otherwise, the Smartfox callbacks (e.g. onUserEnter) will be called by another thread. If one of those callbacks in turn calls Unity functions like Instantiate(), bad things may happen.