LoginSignup
4
4

More than 5 years have passed since last update.

Actions on Googleで'final_response' must be set.エラーの対処法

Last updated at Posted at 2018-04-30

Actions on GoogleでSimulatorを使おうと思ったら'final_response' must be set.でハマったのでメモ。

前提

Google Cloud Functionを使わず、Webhookを使って自宅LANのRaspberry Piでやり取りの場合。

これにハマった

Simulatorからテストしようとしても、'final_response' must be set.で起動できない。もちろんGoogle Homeから呼びかけても同じ。
image.png

ログを見てもよくわからず・・・

image.png

サーバーは"500 INTERNAL SERVER ERROR"とあるがよくわからず・・・

image.png

DebugモードにしていたPythonの画面もイマイチわからず・・・

image.png

原因と解決法

結論から。いろいろ試した結果、ラズパイなどローカルのAPIを使おうとすると、API VersionがV2だとダメらしい。
(英語だからちゃんと読んでなかった・・・)
image.png

これを以下のようにV1にしてSAVEすると、いけるようになるんですね。
image.png

V1とV2の違い

V1 & V2 comparisonにありました。認証時、V2になっているとGoogle Cloud Service Account経由になってしまうので、今回のようにローカルでやり取りするときはV1にする必要があるということでしょう。

4
4
4

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
4