mesqueeb / vuex-easy-firestore

Easy coupling of firestore and a vuex module. 2-way sync with 0 boilerplate!
https://mesqueeb.github.io/vuex-easy-firestore
MIT License
233 stars 28 forks source link

cannot read resolve of undefined #353

Open mesqueeb opened 3 years ago

mesqueeb commented 3 years ago

https://github.com/mesqueeb/vuex-easy-firestore/blob/master/src/module/actions.ts#L778

I haven't tracked the cause yet, but sometimes this is undefined.

M0rph3v5 commented 3 years ago

I'm experiencing this as well, can this be handled properly so it doesn't end up throwing the error? (and spam in our error reporting in sentry)

FricoRico commented 3 years ago

We're seeing the same issue too when trying to closeDBChannel in order to switch documents.

mesqueeb commented 3 years ago

I have not yet been able to find the reproduction steps for this issue. Any luck reliably reproducing it? Much appreciated!!

FricoRico commented 3 years ago

After some investigation it seems to happen after a user has been inactive for a couple of minutes. Perhaps Firebase closes the connection when no new requests are made? I'm not familiar with the internal workings.

This seems to be the only reliable reproduction scenario.

M0rph3v5 commented 3 years ago

okay this is pretty bad, it causes everything to stop functioning if the page is kept open long. If we can't fix this soon we'll have to replace the package probably. Any good alternatives?

louisameline commented 3 years ago

No alternative that I know of, but you know you can debug too, right? I'll take a quick look if I can.

riksnelders commented 2 years ago

I know this error happens when navigating away from a page during the loading of the openDBChannel.

I'm also having issues front end not updating when inactive for too long.

Lets say with 2 users User 1 constantly works with a tablet or pc, records keep adding up, as it should User 2 with same page open takes a look at the page then comes back after 15+- mintes and page is missing records compared to User 1