2017-07-20 4 views
2

Googleのアクションのデモを作成しています。gactions update:サーバーからHTTPが返されませんでした。

./gactions --verbose test --action_package action.json --project chatbot-36b55 

私は次のエラー取得しています::次のコマンドを実行している場合

Checking for updates... 
Successfully fetched update metadata 
Finished checking for updates -- no updates available 
Pushing the app for the Assistant for testing... 
POST /v2/users/me/previews/chatbot-36b55:updateFromAgentDraft?updateMask=previewActionPackage.actionPackage.actions%2Cpre 
viewActionPackage.actionPackage.conversations%2CpreviewActionPackage.actionPackage.types%2CpreviewActionPackage.startTime 
stamp%2CpreviewActionPackage.endTimestamp HTTP/1.1 
Host: actions.googleapis.com 
User-Agent: Gactions-CLI/2.0.7 (linux; amd64; stable/6f4c996f8ee63dc5760c7728f674abe37bfe5fc4) 
Content-Length: 329 
Content-Type: application/json 
Accept-Encoding: gzip 
{"name":"users/me/previews/chatbot-36b55","previewActionPackage":{"actionPackage":{"actions":[{"fulfillment":{"conversati 
onName":"HelloWorld"},"intent":{"name":"actions.intent.MAIN"},"name":"MAIN"}],"conversations":{"HelloWorld":{"name":"Hell 
oWorld","url":"http://35.189.xx.xx/"}}},"name":"users/me/previews/chatbot-36b55"}} 
Reading credentials from: creds.data 
ERROR: Failed to test the app for the Assistant 
ERROR: Request contains an invalid argument. 
Field Violations: 
# Field Description 
1   URL is invalid 'http://35.189.xx.xx/' 
2017/07/20 14:42:50 Server did not return HTTP 200 

を私はアクションのパッケージを作成するために、the stepsを追いました。 これは私のactions.jsonファイルです:

{ 
    "actions": [ 
    { 
     "name": "MAIN", 
     "fulfillment": { 
     "conversationName": "HelloWorld" 
     }, 
     "intent": { 
     "name": "actions.intent.MAIN" 
     } 
    } 
    ], 
    "conversations": { 
    "HelloWorld": { 
     "name": "HelloWorld", 
     "url": "http://35.189.xx.xx/" 
    } 
    } 
} 

が、私はこれをテストするように設定し、HTTPSを持っている必要がありますか?それが問題なのであれば、誰でもその周りをどのように乗り越えることができますか?

答えて

0

urlパラメータのhttps://developers.google.com/actions/reference/rest/Shared.Types/ConversationFulfillment状態でのドキュメントは:

The HTTPS endpoint for the conversation (HTTP is not supported).

また、URLは公共のインターネットからアクセス可能でなければなりません(あなたが正当な理由のために、完全なIPアドレスは表示されませんので、私ができますこれが本当であるかどうかを伝えないでください)。

いずれにせよ、ngrokのようなものを使用してHTTPSエンドポイントを作成し、35.189.x.xホストへのトンネルを保護することができます。これにより、パブリックDNSエントリとHTTPSエンドポイントが得られます。アクションとともにngrokを使用する方法の詳細については、https://developers.google.com/actions/tools/ngrokも参照してください。

+0

私はHTTPSリンクで同じ問題があります。 ex "https://google.com" – tieorange

+0

@tieorange - この場合、同じ問題が何であるかはわかりません。なぜgoogle.comをURLとして指定するのかわからないからですactions.jsonファイル。あなたが自分のSOの質問を作成し、可能な限りあなたの問題について多くの詳細を投稿した場合、それが最良かもしれないように思えます。 – Prisoner

関連する問題