Closed momander closed 5 years ago
I found a few problems with this issue:
Oh, one more data point: most of my website visitors do not trigger code that reads or writes to Firestore. So most of the visitors who trigger the verifyNotFailed exception only run this code in their browsers:
var firebaseConfig = {
...
};
firebase.initializeApp(firebaseConfig);
let db = firebase.firestore();
db.enablePersistence({experimentalTabSynchronization:true});
EDIT: Fixed link to github issue.
Thanks for the report. This seems to be a regression in iOS 12.2 which is being tracked by https://github.com/firebase/firebase-js-sdk/issues/1670 and https://bugs.webkit.org/show_bug.cgi?id=197050. The only workaround for now is to not enable persistence.
Sorry to hear about the problems you're running into. The issues described appear very similar to 2 problems that were reported recently:
AsyncQueue is already failed: The transaction was aborted, so the request cannot be fulfilled.
sounds very similar #1642. Interesting that it also happens on Windows in your case -- how often are Windows devices affected, compared to Android?Note that these two are separate issues with different causes, but they are triggered in a very similar manner -- sending the app to the background may result in a failure. This seems consistent with the way only some of the users experience the issue.
Can you please provide some additional info?
firebase.firestore.setLogLevel('debug')
). If they contain any sensitive data, feel free to send them over email to varconst at google.com. Especially on iOS, I hope logs would help to determine whether the issue here is indeed #1670.My apologies; I don't have access to either an iOS 12.2 device or a Windows machine. I tried to reproduce the error on a virtual Windows machine on lambdatest.com, but was not able to.
Environment
Describe the problem
About a quarter of my website visitors using iOS 12.2 and Safari 12.1 get this error, or about 400-500 out of 1,700 visitors. I have not heard any reports of failing functionality yet, but they are getting uncaught Javascript exceptions which are tracked by Google Analytics.
Steps to reproduce:
Sorry, I don't have access to an iOS 12.2 device. I only see the hundreds upon hundreds of these errors in the log.
Relevant Code:
When the exception occurs, the Javascript call stack is: documentVisibilityHandler() which called enqueueAndForget() which called enqueue() which called verifyNotFailed() where the exception occurred
Sometimes (less often) the call stack is: handleDelayElapsed() which called enqueueAndForget() which called enqueue() which called verifyNotFailed() where the exception occurred
Sometimes (less often) the call stack is: windowUnloadHandler which called enqueueAndForget() which called enqueue() which called verifyNotFailed() where the exception occurred
Other clients:
This error also occurs very occasionally in Windows and Android clients. When this happens, there is a better error message:
Error: FIRESTORE (5.9.4) INTERNAL ASSERTION FAILED: AsyncQueue is already failed
or
Error: FIRESTORE (5.9.4) INTERNAL ASSERTION FAILED: AsyncQueue is already failed: The transaction was aborted, so the request cannot be fulfilled.
My code to log Javascript errors in Google Analytics:
My Firebase configuration: