Firestore(4.13.0):内部无法处理的错误

时间:2018-04-20 03:37:00

标签: angularjs firebase ionic-framework google-cloud-firestore google-cloud-functions

我正在使用Firebase功能并在内部使用Firestore。当我尝试使用查询访问collectionRef时,会出现此错误。

let accountRef = firebase.firestore().collection('/accounts');
            accountRef.where("_username", "==", username).get().then((snapshot) => {...})

这是我在Firebase控制台上获得的堆栈

TypeError: Cannot read property 'ns' of null
at Object.load (/user_code/node_modules/firebase/node_modules/grpc/index.js:146:28)
at loadProtos (/user_code/node_modules/firebase/node_modules/@firebase/firestore/dist/index.node.cjs.js:6060:17)
at NodePlatform.loadConnection (/user_code/node_modules/firebase/node_modules/@firebase/firestore/dist/index.node.cjs.js:6084:22)
at FirestoreClient.initializeRest (/user_code/node_modules/firebase/node_modules/@firebase/firestore/dist/index.node.cjs.js:14077:14)
at /user_code/node_modules/firebase/node_modules/@firebase/firestore/dist/index.node.cjs.js:13968:54
at process._tickDomainCallback (internal/process/next_tick.js:135:7)

1 个答案:

答案 0 :(得分:2)

编辑:错误已修复,升级到4.13.1。

降级到4.12,看起来这是js sdk中的一个错误:https://github.com/firebase/firebase-js-sdk/issues/711