2
我目前正在測試出新公司的FireStore,但我總是得到它告訴我一些關於已逾期雲功能與公司的FireStore錯誤「已逾期」
{ Error: Deadline Exceeded
at /user_code/node_modules/firebase-admin/node_modules/grpc/src/node/src/client.js:554:15
code: 16,
metadata: Metadata { _internal_repr: {} },
note: 'Exception occurred in retry method that was not classified as transient' }
同樣的問題,這是我的當前的代碼似乎罰款(和作品時,我把它部署到火力地堡)
const functions = require('firebase-functions');
const admin = require('firebase-admin');
var serviceAccount = require("./xxxxxxxx-firebase-adminsdk.json");
admin.initializeApp({
credential: admin.credential.cert(serviceAccount),
databaseURL: "https://xxxxxxxxx-xxxx.firebaseio.com"
});
exports.registerUser = functions.auth.user().onCreate(event => {
admin.firestore().collection('users').doc(event.data.uid).set({
name: 'Test User',
country: 'USA'
}).catch(error => {
console.log(error);
})
});
這也表明該消息函數返回undefined,預計臨大小或值
「已逾期」是因爲的公司的FireStore限制。 https://stackoverflow.com/a/47844661/4860874 –