new-public-messages calls the syncronous version of getSSB() and then checks for an error. Unfortunately, this means that if the browser is running exceptionally slowly (such as in a resource-constrained environment), new-public-messages can end up trying to run SSB.db.query() on an SSB object which doesn't have a db yet. The err check needs to also check for the presence of SSB.db and retry if it's not initialized yet.
new-public-messages calls the syncronous version of
getSSB()
and then checks for an error. Unfortunately, this means that if the browser is running exceptionally slowly (such as in a resource-constrained environment), new-public-messages can end up trying to runSSB.db.query()
on anSSB
object which doesn't have adb
yet. Theerr
check needs to also check for the presence ofSSB.db
and retry if it's not initialized yet.