使用 gactions 更新操作包总是 returns 请求超时
Update action package with gactions always returns request timeout
我在actions console下创建了一个项目,做了一个智能家居app的测试动作包。我想尝试使用 gactions 上传我拥有的动作包。但是,每次我执行这个命令
./gactions --verbose update --action_package action.json --project my_project_id
结果总是这样:
Unable to update: Patch https://actions.googleapis.com/v2/agents/my_project_id?updateMask=agent.draftActionPackage.actions%2Cagent.draftActionPackage.conversations&validateOnly=false: Post https://accounts.google.com/o/oauth2/token: dial tcp 216.58.200.45:443: i/o timeout
我检查了详细日志,发现它正在从 creds.data
读取一些数据
Reading credentials from: creds.data
然后我注意到 creds.data 中的内容包含访问令牌和到期时间。但是到期时间是7月18日,离现在还有很多天。我不确定这是否会导致超时错误。而且我也不知道如何更新 creds.data 以获得新的访问令牌。
好的。我注意到这个错误的一部分是我的网络问题。但是我能够打开雅虎和其他网站,而更新就是不起作用。不过没关系,我只是换了个 Wi-Fi。
然后我删除了creds.data。并再次执行更新命令,这就出来了。
Gactions needs access to your Google account. Please copy & paste the URL below into a web browser and follow the instructions there. Then copy and paste the authorization code from the browser back here.
Visit this URL:
https://accounts.google.com/o/oauth2/auth?access_type=offline&client_id=237807841406-o6vu1tjkq8oqjub8jilj6vuc396e2d0c.apps.googleusercontent.com&redirect_uri=urn%3Aietf%3Awg%3Aoauth%3A2.0%3Aoob&response_type=code&scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fassistant+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Factions.builder&state=state
Enter authorization code:
然后我按照上面的说明,得到授权码,复制粘贴到控制台,现在一切正常。
我在actions console下创建了一个项目,做了一个智能家居app的测试动作包。我想尝试使用 gactions 上传我拥有的动作包。但是,每次我执行这个命令
./gactions --verbose update --action_package action.json --project my_project_id
结果总是这样:
Unable to update: Patch https://actions.googleapis.com/v2/agents/my_project_id?updateMask=agent.draftActionPackage.actions%2Cagent.draftActionPackage.conversations&validateOnly=false: Post https://accounts.google.com/o/oauth2/token: dial tcp 216.58.200.45:443: i/o timeout
我检查了详细日志,发现它正在从 creds.data
读取一些数据Reading credentials from: creds.data
然后我注意到 creds.data 中的内容包含访问令牌和到期时间。但是到期时间是7月18日,离现在还有很多天。我不确定这是否会导致超时错误。而且我也不知道如何更新 creds.data 以获得新的访问令牌。
好的。我注意到这个错误的一部分是我的网络问题。但是我能够打开雅虎和其他网站,而更新就是不起作用。不过没关系,我只是换了个 Wi-Fi。
然后我删除了creds.data。并再次执行更新命令,这就出来了。
Gactions needs access to your Google account. Please copy & paste the URL below into a web browser and follow the instructions there. Then copy and paste the authorization code from the browser back here.
Visit this URL:
https://accounts.google.com/o/oauth2/auth?access_type=offline&client_id=237807841406-o6vu1tjkq8oqjub8jilj6vuc396e2d0c.apps.googleusercontent.com&redirect_uri=urn%3Aietf%3Awg%3Aoauth%3A2.0%3Aoob&response_type=code&scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fassistant+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Factions.builder&state=state
Enter authorization code:
然后我按照上面的说明,得到授权码,复制粘贴到控制台,现在一切正常。