{"action":"created","issue":{"url":"https://api.github.com/repos/Microsoft/BotBuilder/issues/4212","repository_url":"https://api.github.com/repos/Microsoft/BotBuilder","labels_url":"https://api.github.com/repos/Microsoft/BotBuilder/issues/4212/labels{/name}","comments_url":"https://api.github.com/repos/Microsoft/BotBuilder/issues/4212/comments","events_url":"https://api.github.com/repos/Microsoft/BotBuilder/issues/4212/events","html_url":"https://github.com/Microsoft/BotBuilder/issues/4212","id":298683385,"number":4212,"title":"Testing bot via WebChat","user":{"login":"pchilappagari","id":36673931,"avatar_url":"https://avatars3.githubusercontent.com/u/36673931?v=4","gravatar_id":"","url":"https://api.github.com/users/pchilappagari","html_url":"https://github.com/pchilappagari","followers_url":"https://api.github.com/users/pchilappagari/followers","following_url":"https://api.github.com/users/pchilappagari/following{/other_user}","gists_url":"https://api.github.com/users/pchilappagari/gists{/gist_id}","starred_url":"https://api.github.com/users/pchilappagari/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pchilappagari/subscriptions","organizations_url":"https://api.github.com/users/pchilappagari/orgs","repos_url":"https://api.github.com/users/pchilappagari/repos","events_url":"https://api.github.com/users/pchilappagari/events{/privacy}","received_events_url":"https://api.github.com/users/pchilappagari/received_events","type":"User","site_admin":false},"labels":[{"id":429202607,"url":"https://api.github.com/repos/Microsoft/BotBuilder/labels/Node.js%20SDK","name":"Node.js SDK","color":"6eff54","default":false},{"id":586707988,"url":"https://api.github.com/repos/Microsoft/BotBuilder/labels/WebChat","name":"WebChat","color":"5319e7","default":false}],"state":"open","locked":false,"assignee":{"login":"FranciscoPonceGomez","id":16775093,"avatar_url":"https://avatars0.githubusercontent.com/u/16775093?v=4","gravatar_id":"","url":"https://api.github.com/users/FranciscoPonceGomez","html_url":"https://github.com/FranciscoPonceGomez","followers_url":"https://api.github.com/users/FranciscoPonceGomez/followers","following_url":"https://api.github.com/users/FranciscoPonceGomez/following{/other_user}","gists_url":"https://api.github.com/users/FranciscoPonceGomez/gists{/gist_id}","starred_url":"https://api.github.com/users/FranciscoPonceGomez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FranciscoPonceGomez/subscriptions","organizations_url":"https://api.github.com/users/FranciscoPonceGomez/orgs","repos_url":"https://api.github.com/users/FranciscoPonceGomez/repos","events_url":"https://api.github.com/users/FranciscoPonceGomez/events{/privacy}","received_events_url":"https://api.github.com/users/FranciscoPonceGomez/received_events","type":"User","site_admin":false},"assignees":[{"login":"FranciscoPonceGomez","id":16775093,"avatar_url":"https://avatars0.githubusercontent.com/u/16775093?v=4","gravatar_id":"","url":"https://api.github.com/users/FranciscoPonceGomez","html_url":"https://github.com/FranciscoPonceGomez","followers_url":"https://api.github.com/users/FranciscoPonceGomez/followers","following_url":"https://api.github.com/users/FranciscoPonceGomez/following{/other_user}","gists_url":"https://api.github.com/users/FranciscoPonceGomez/gists{/gist_id}","starred_url":"https://api.github.com/users/FranciscoPonceGomez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FranciscoPonceGomez/subscriptions","organizations_url":"https://api.github.com/users/FranciscoPonceGomez/orgs","repos_url":"https://api.github.com/users/FranciscoPonceGomez/repos","events_url":"https://api.github.com/users/FranciscoPonceGomez/events{/privacy}","received_events_url":"https://api.github.com/users/FranciscoPonceGomez/received_events","type":"User","site_admin":false}],"milestone":null,"comments":1,"created_at":"2018-02-20T17:34:39Z","updated_at":"2018-02-23T21:24:31Z","closed_at":null,"author_association":"NONE","body":"## Bot Info\r\n* SDK Platform: Node.js\r\n* Active Channels: Web Chat\r\n* Deployment Environment: Azure Bot Service\r\n## Issue Description\r\n<!-- Describe your issue, question, or feature request -->\r\nI registered a simple chat bot on Azure. The bot is running on one of our local servers which has a public facing NAT. I have the server listening on port 3978 but when I test this out in WebChat, it says message couldn't be sent to the bot.\r\n\r\nHere's messaging endpoint URL I specified on Azure : \r\n\r\nhttps://X.X.X.X:3978/api/messages (X.X.X.X is the IP that's publicly accessible )\r\n\r\n## Code Example\r\n<!-- The bot code that reproduces the issue -->\r\n```javascript\r\nvar restify = require('restify');\r\nvar builder = require('botbuilder');\r\nvar https = require('https');\r\nvar httpsOptions = {\r\nkey: fs.readFileSync('key.pem'),   //Self-generated \r\ncert:fs.readFileSync('key.cert')\r\n}\r\nserver.listen(process.env.port||3978, 'x.x.x.x',  function () {   //x.x.x.x is the private IP of the server\r\n   console.log('%s listening to %s', server.name, server.url); \r\n});\r\n\r\n// Create chat connector for communicating with the Bot Framework Service\r\nvar connector = new builder.ChatConnector({\r\n    appId : \"msappid\",  //app id and password generated during bot registration on Azure\r\n    appPassword:\"mspasswd\"\r\n});\r\n\r\n// Listen for messages from users \r\nserver.post('/api/messages', connector.listen());\r\n\r\n// Receive messages from the user and respond by echoing each message back (prefixed with 'You said:')\r\nvar bot = new builder.UniversalBot(connector, function (session) {\r\n    console.log(session.message.text);\r\n    session.send(\"You said: %s\", session.message.text);\r\n});\r\n```\r\n## Reproduction Steps\r\n1. Run node test.js on server\r\n2. Test in Web Chat by typing any text\r\n\r\n## Expected Behavior\r\nExpect to see \"You said : hi\" in Web Chat window\r\n\r\n\r\n## Actual Results\r\nCouldn't send;\r\nFrom the logs: \r\nThere was an error sending this message to your bot.\r\n\r\n\r\nThere's no error code or explanation as to why it failed. A couple of questions : \r\n\r\nIs port 3978 necessary once we deploy the bot?\r\nIs the messaging endpoint format correct? Do we need to specify the port and /api/messages suffix\r\nDo we need to specify the server's IP  address in server.listen() call?\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/Microsoft/BotBuilder/issues/comments/368142674","html_url":"https://github.com/Microsoft/BotBuilder/issues/4212#issuecomment-368142674","issue_url":"https://api.github.com/repos/Microsoft/BotBuilder/issues/4212","id":368142674,"user":{"login":"FranciscoPonceGomez","id":16775093,"avatar_url":"https://avatars0.githubusercontent.com/u/16775093?v=4","gravatar_id":"","url":"https://api.github.com/users/FranciscoPonceGomez","html_url":"https://github.com/FranciscoPonceGomez","followers_url":"https://api.github.com/users/FranciscoPonceGomez/followers","following_url":"https://api.github.com/users/FranciscoPonceGomez/following{/other_user}","gists_url":"https://api.github.com/users/FranciscoPonceGomez/gists{/gist_id}","starred_url":"https://api.github.com/users/FranciscoPonceGomez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FranciscoPonceGomez/subscriptions","organizations_url":"https://api.github.com/users/FranciscoPonceGomez/orgs","repos_url":"https://api.github.com/users/FranciscoPonceGomez/repos","events_url":"https://api.github.com/users/FranciscoPonceGomez/events{/privacy}","received_events_url":"https://api.github.com/users/FranciscoPonceGomez/received_events","type":"User","site_admin":false},"created_at":"2018-02-23T21:24:31Z","updated_at":"2018-02-23T21:24:31Z","author_association":"MEMBER","body":"Hi pchilappagari,\r\n\r\nYou don't need to specify the port in your endpoint. I am not sure if you have to have in the code. I will verify this.\r\n\r\nThe Bot Framework also requires that the x.509v3 certificate exposed by your endpoint be current and valid. Most of the checks for \"current and valid\" are standard checks for server certs: the CN must match the hostname, it must not be expired, it must not be listed in a CRL, it must have the correct set of EKUs, etc.\r\n\r\nMost importantly, your cert must chain to a root certificate authority trusted by Microsoft. The latest list of these CAs is available here: http://social.technet.microsoft.com/wiki/contents/articles/31634.microsoft-trusted-root-certificate-program-participants-v-2016-april.aspx\r\n\r\nFor more information on deploying your bot, see: https://docs.microsoft.com/en-us/bot-framework/deploy-bot-overview\r\n\r\nhttps://stackoverflow.com/questions/40888489/bot-framework-without-azure-possible\r\nhttps://stackoverflow.com/questions/44558760/deploy-bot-in-local-iis-and-incle-it-in-custom-chat-in-a-webpage/44571251#44571251"}}
{"actor":{"display_login":"FranciscoPonceGomez"}}