Google Actions:测试库抱怨 Firebase 条款

问题描述

我正在尝试使用 Assistant Conversation Testing Library 为我的 Google Action 实施测试。

问题是执行程序抱怨:“不接受 Firebase 服务条款”我无法接受这些条款 - 无论是在 Actions Console 中还是在 Cloud Platform 中。

两周前它正在工作,突然它停止工作并出现此错误。据我所知,我没有改变任何相关的东西。我也尝试创建一个新的 service_account.json,但这没有帮助。

错误消息/堆栈跟踪:

Starting writePreview From Draft
Error: 9 FAILED_PRECONDITION: Firebase Terms of Service is not accepted. Navigate to your project's overview page on the Actions Console to accept the Terms of Service.
    at Object.callErrorFromStatus (test/node_modules/@grpc/grpc-js/build/src/call.js:31:26)
    at Object.onReceiveStatus (test/node_modules/@grpc/grpc-js/build/src/client.js:244:52)
    at Object.onReceiveStatus (test/node_modules/@grpc/grpc-js/build/src/client-interceptors.js:334:141)
    at Object.onReceiveStatus (test/node_modules/@grpc/grpc-js/build/src/client-interceptors.js:297:181)
    at test/node_modules/@grpc/grpc-js/build/src/call-stream.js:130:78
    at processTicksAndRejections (internal/process/task_queues.js:75:11) {
  code: 9,details: "Firebase Terms of Service is not accepted. Navigate to your project's overview page on the Actions Console to accept the Terms of Service.",metadata: Metadata {
    internalRepr: Map(2) {
      'google.rpc.preconditionfailure-bin' => [Array],'grpc-status-details-bin' => [Array]
    },options: {}
  }
}

源代码:

const { ActionsOnGoogleTestManager } = require('@assistant/conversation-testing');

async function openAction(projectId,invocationName) {
    const testManager = new ActionsOnGoogleTestManager({ projectId: projectId });
    testManager.setTestSurface('SMART_DISPLAY');
    testManager.setSuiteLocale("en-US")
    await testManager.writePreviewFromDraft();

    await testManager.sendQuery(`Talk to ${invocationName}`);
    testManager.assertText("Hello World")
    testManager.assertIntent('actions.intent.MAIN');
}

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)