After deploying the latest version of Firechat, I noticed an error in the console due to the fact that self._sessionId is null on this line. I am not sure exactly why this showed up now, but I think it is because _sessionId is set in _setupDataEvents() which is called with onAuthStateChanged()here and that method may not fire as soon in the 3.x.x SDKs as onAuth() used to fire in the 2.x.x SDKs. So, the enterRoom() call happens first (triggered by the Firechat UI code) and tries to use _sessionId before it is available. The solution is to just define _sessionId earlier. I have a hunch there are still race conditions, but this should be early enough that we won't hit it before the enterRoom() call happens.
After deploying the latest version of Firechat, I noticed an error in the console due to the fact that
self._sessionId
isnull
on this line. I am not sure exactly why this showed up now, but I think it is because_sessionId
is set in_setupDataEvents()
which is called withonAuthStateChanged()
here and that method may not fire as soon in the3.x.x
SDKs asonAuth()
used to fire in the2.x.x
SDKs. So, theenterRoom()
call happens first (triggered by the Firechat UI code) and tries to use_sessionId
before it is available. The solution is to just define_sessionId
earlier. I have a hunch there are still race conditions, but this should be early enough that we won't hit it before theenterRoom()
call happens.