我已经部署了一个Cloud函数来更新一些聚合数据,但是
错误:无法从修复值中解码类型:{"integerValue":"3"}在exports.aggregateReceivedRatings.functions.firestore.document.的DocumentSnapshot.get (/user_code/node_modules/firebase-admin/node_modules/@google-cloud/firestore/src/document.js:372:17) at DocumentSnapshot._decodeValue D
我有一个谷歌云功能,它可以将状态信息从Firebase实时数据库同步到Firestore数据库(如here所解释的)。以下是链接示例中的相关Cloud Functions代码: const functions = require('firebase-functions');
const admin = require('firebase-admin');
admin.initializeApp();
// Since this code will be running in the Cloud Functions enviornment
// we cal
如何使用visual代码firebase-database 触发器函数进行调试?我尝试了仿真器,但是当我调用它时,我得到了一个错误
functions debug myMethod
C:\functions\functions>functions debug createUserChat
ERROR: Error: Function myMethod in location us-central1 in project myProject does not exist
at C:\Users\Dev\AppData\Roaming\npm\node_modules\@google-cl
我有一个包含以下dockerfile的.net核心应用程序接口项目: FROM mcr.microsoft.com/dotnet/aspnet:5.0.0-buster-slim AS base
WORKDIR /app
EXPOSE 443
FROM mcr.microsoft.com/dotnet/sdk:5.0 AS build
WORKDIR /src
COPY ["API/API.csproj", ""]
RUN dotnet restore "./API.csproj"
COPY . .
WORKDIR "/src/.
我想在我的DialogFlow机器人中使用Firestore,但是它显示了某些错误。这是我的index.js代码:
function writeToDb () {
console.log(`Inside writeToDb`);
// Get parameter from Dialogflow with the string to add to the database
const databaseEntry = {
'eMail':'shashank@gmail.com'
};
console.log(
我想在安装了kubectl但尚未配置的docker容器上运行命令。
在我的本地机器上,我对kubectl进行了身份验证,并将其配置为与Google Cloud上的kubernetes集群通信。
如果我运行以下命令:
docker run mycontainerimage kubectl get pods
我将得到响应:
invalid configuration: no configuration has been provided
如何将kubernetes凭证/配置传递到本地计算机上运行的docker镜像中?谢谢!
在尝试使用云函数仿真器时,我收到一条消息,指出: function ignored because the firestore emulator does not exist or is not running 我试着在这里提到:(Firestore/Firebase Emulator Not Running)。 我的函数/package.json如下所示: {
"name": "functions",
"description": "Cloud Functions for Firebase",
"scrip
我正在使用谷歌的人工智能平台训练机器学习模型使用自定义码头形象。为了不修改地运行现有代码,我想在容器中挂载一个GCS桶。
我认为实现这一目标的一种方法是将gcloud安装到身份验证中,并将gcsfuse安装到容器中。我的Dockerfile如下所示:
FROM nvidia/cuda:10.1-cudnn7-runtime-ubuntu18.04
WORKDIR /root
# Install system packages.
RUN apt-get update
RUN apt-get install -y curl
# ...
# Install gcsfuse.
RUN echo
我试图通过使用sendNotification和firebase函数来创建一个node.js函数,但不幸的是,我目前陷入了困境。我从未收到发件人的通知,当我查看Firebase函数日志时,我看到一个错误:
ReferenceError: context is not defined
at exports.sendNotification.functions.database.ref.onWrite.event (/user_code/index.js:9:32)
at Object.<anonymous> (/user_code/node_modules/firebase-func
在编写一个在创建用户时触发的简单示例函数时出现以下错误。
代码:
exports.createUser = functions.firestore
.document('users/{userId}')
.onCreate((snap, context) => {
const newValue = snap.data();
const name = newValue.name;
//....do some stuff here
});
错误描述:
Error: Cloud function needs to be called with
因此,我想把通知从一个设备推送到另一个设备,我使用的是防火墙云函数,当然,在我搜索的时候,我发现有一种新的方法可以从消防站检索id,但是无论如何,没有人很好地解释了--这里是node.js index.js,我得到了以下错误:
TypeError: Cannot read property 'pharmacien_id' of undefined
at exports.sendCommandes.functions.firestore.document.onWrite.event (/user_code/index.js:8:35)
at Object.<anony
我正在尝试复制指南。
我没事,直到我需要打电话:
import * as gcs from '@google-cloud/storage';
import * as functions from 'firebase-functions';
export const onFileChange = functions.storage.object().onFinalize(object => {
// this line throws a TypeScript Error
const destBucket = gcs.bucket(fileBuck
在exports.onDataAdded.functions.database.ref.onCreate.event (/user_code/index.js:5:28)处,TypeError:无法读取未定义的属性'val‘。(/user_code/node_modules/firebase-functions/lib/cloud-functions.js:112:27) at next (原生) at /user_code/node_modules/firebase-functions/lib/cloud-functions.js:28:71 at __awaiter (/user
云修复-云函数:TypeError: collectionRef.child不是一个函数
我正在使用Cloud函数来更新Cloud的父集合中的注释号,所以当注释添加时,云函数可以自动更新注释号。
云修复-云函数:TypeError: collectionRef.child不是对象上的函数(/user_code/index.js:23:33)。(/user_code/node_modules/firebase-functions/lib/cloud-functions.js:112:27) at next (原生) at /user_code/node_modules/firebase-fun
我正在尝试从firebase云函数访问数据。
我有一组用户(就像一组聊天),每个组都有密钥。
我试图在云函数中访问这个组:
admin.database().ref('/GroupUsers/${groupKey}').once('value');
并得到以下错误:
Error: Firebase.child failed: First argument was an invalid path: "/GroupUsers/${groupKey}". Paths must be non-empty strings and can