Я работаю над приложениемactJS, использующим create -act-app и firestore.
Когда я пытаюсь получить метку времени сервера при добавлении документа в firestore, набрав
await firebase.firestore()
.collection('messages')
.add({ timestamp: firebase.firestore.FieldValue.serverTimestamp() });
Я получаю следующую ошибку в случайное время.Иногда это работает, иногда нет.Документ не заканчивается записью в firestore.
index.cjs.js:175 Uncaught Error: FIRESTORE (5.8.0) INTERNAL ASSERTION FAILED:
AsyncQueue is already failed: Error: FIRESTORE (5.8.0) INTERNAL ASSERTION FAILED: Unknown FieldValue {"localWriteTime":{"seconds":1548602883,"nanoseconds":762000000},"previousValue":null,"typeOrder":3}
at fail (index.cjs.js:175) at JsonProtoSerializer.toValue (index.cjs.js:6976) at index.cjs.js:7726 at Array.map ()
at JsonProtoSerializer.toCursor (index.cjs.js:7725)
at JsonProtoSerializer.toQueryTarget (index.cjs.js:7558)
at JsonProtoSerializer.toTarget (index.cjs.js:7650)
at PersistentListenStream.watch (index.cjs.js:16906)
at RemoteStore.sendWatchRequest (index.cjs.js:17859)
at RemoteStore.listen (index.cjs.js:17814) at SyncEngine. (index.cjs.js:19354)
at step (tslib.es6.js:197)
at Object.next (tslib.es6.js:127)
at fulfilled (tslib.es6.js:80)
at fail (index.cjs.js:175)
at AsyncQueue.verifyNotFailed (index.cjs.js:8735)
at AsyncQueue.enqueue (index.cjs.js:8682)
at AsyncQueue.enqueueAndForget (index.cjs.js:8671)
at index.cjs.js:16850
at StreamBridge.wrappedOnMessage (index.cjs.js:16801)
at StreamBridge.callOnMessage (index.cjs.js:7992)
at index.cjs.js:8267
at W. (index.cjs.js:8210)
at W.push../node_modules/@firebase/webchannel-wrapper/dist/index.esm.js.e.Lb (index.esm.js:860)
at W.push../node_modules/@firebase/webchannel-wrapper/dist/index.esm.js.e.dispatchEvent (index.esm.js:815)
at X.push../node_modules/@firebase/webchannel-wrapper/dist/index.esm.js.X.ud (index.esm.js:3682)
at $c.push../node_modules/@firebase/webchannel-wrapper/dist/index.esm.js.e.dg (index.esm.js:3431) at $c.push../node_modules/@firebase/webchannel-wrapper/dist/index.esm.js.e.ue (index.esm.js:3320)
at R.push../node_modules/@firebase/webchannel-wrapper/dist/index.esm.js.e.Yc (index.esm.js:1875)
at R.push../node_modules/@firebase/webchannel-wrapper/dist/index.esm.js.e.Fd (index.esm.js:1771)
at R.push../node_modules/@firebase/webchannel-wrapper/dist/index.esm.js.e.hg (index.esm.js:1733)
at R.push../node_modules/@firebase/webchannel-wrapper/dist/index.esm.js.e.Me (index.esm.js:1690)
at R.push../node_modules/@firebase/webchannel-wrapper/dist/index.esm.js.e.mg (index.esm.js:1685)
at V.push../node_modules/@firebase/webchannel-wrapper/dist/index.esm.js.e.Lb (index.esm.js:860)
at V.push../node_modules/@firebase/webchannel-wrapper/dist/index.esm.js.e.dispatchEvent (index.esm.js:815)
at V.push../node_modules/@firebase/webchannel-wrapper/dist/index.esm.js.e.se (index.esm.js:2840) at V.push../node_modules/@firebase/webchannel-wrapper/dist/index.esm.js.e.eg (index.esm.js:2836)
at V.push../node_modules/@firebase/webchannel-wrapper/dist/index.esm.js.e.te (index.esm.js:2832)
Я обнаружил этот поток на github firebase, который утверждает, что решил проблему, однако после обновления до firebase SDK5.8.0 и firebase tools 6.3.0 ошибка все еще сохраняется.
Кто-нибудь еще имел эту ошибку или кто-нибудь знает, как ее исправить?
Заранее спасибо!