使用SignIn
实例化conv.ask()
总是失败。当调用登录流程并离开我的应用程序时,我的操作说无响应。
在我的Firebase Functions log
中,下面的json被吐痰了,这可能意味着它已被正确调用,但是出了点问题。我尝试更新Actions on Google
控制台,清除了“目录”页面中的登录设置,在某些不同的帐户中进行了测试,清除了要在我的动作应用中重置的数据,因此。不用说,我在类clientId
中设置了dialogflow
。
我完全不知道这一点。我为Google Assistant
应用程序完成了许多项目,这些项目需要SignIn
Account Linking
流程。但是我仅在这个项目中遇到这种奇怪的行为。我该怎么办? SDK版本为"actions-on-google": "^2.6.0"
。
Response {
"status": 200,
"headers": {
"content-type": "application/json;charset=utf-8"
},
"body": {
"payload": {
"google": {
"expectUserResponse": true,
"systemIntent": {
"intent": "actions.intent.SIGN_IN",
"data": {
"@type": "type.googleapis.com/google.actions.v2.SignInValueSpec",
"optContext": "For account creation"
}
},
"richResponse": {
"items": [
{
"simpleResponse": {
"textToSpeech": "Please do sign in "
}
}
]
}
}
}
}
}
Inside conv.user
{
"raw":{
"locale":"ja-JP",
"userId":"ABwppHGDYgpYn2waeaDyKoMZIqhg4ZxO56vXeAhs-43ZUC6VF3SdCvUGY3L1Vd08eTY_hRLfjrvp4"
},
"storage":{
},
"_id":"ABwppHGDYgpYn2waeaDyKoMZIqhg4ZxO56vXeAhs-43ZUC6VF3SdCvUGY3L1Vd08eTY_hRSfjrvp4",
"locale":"ja-JP",
"permissions":{
},
"last":{
},
"name":{
},
"entitlements":{
},
"access":{
},
"profile":{
}
}
// THIS SEEMS TO BE CALLED according to Firebase Functions Log
app.intent('StartSignIn', (conv) => {
conv.ask(new SignIn('For account creation'));
})
app.intent(INTENT.SignInIntent, (conv, params, signin) => {
console.log('INTENT.SignInIntent is called');
if (signin.status !== 'OK') {
conv.close(`failed`);
return;
}
conv.close('please wait');
});
更新
我通过制作另一个文件夹并进行firebase init
并将其连接到新的Firebase
项目来找出解决方案。主要原因不明,但是通过创建一个新项目可以很好地工作。