Microsoft Bot 框架:HTTP 状态代码 InternalServerError
Microsoft Bot Framework: HTTP status code InternalServerError
我有几个机器人,直到今天早上都没有任何问题。我在机器人门户上收到以下警告消息:
We've revised our security protocol. Update to Bot Builder 3.5+ or compatible security configuration by July 31, 2017 to keep your bot working.
所以我使用 npm install –save botbuilder
将 botbuilder 框架升级到 3.8.3
自从我升级后,一个机器人停止工作,但另一个工作正常。我收到的错误消息是 There was an error sending this message to your bot: HTTP status code InternalServerError
。该机器人在机器人模拟器上运行良好,但在部署到 Azure 后就不行了。所以这甚至不是代码问题。考虑是否是 Microsoft 服务器问题,我的其他机器人工作正常。可能出了什么问题?
我发现了问题,我的机器人现在又恢复了 运行ning。显然是一些部署问题。
我先 运行 以下命令:
azure site log tail botsitename
我收到一条错误消息:
Application has thrown an uncaught exception and is terminated:
Error: Cannot find module './dialogs/Prompt'
at Function.Module._resolveFilename (module.js:469:15)
at Function.Module._load (module.js:417:25)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (D:\home\site\wwwroot\node_modules\botbuilder\lib\logger.js:3:16)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
因此,我删除了根目录中的 node_modules
文件夹并重新安装了 npm
。这让我的机器人复活了! :)
我有几个机器人,直到今天早上都没有任何问题。我在机器人门户上收到以下警告消息:
We've revised our security protocol. Update to Bot Builder 3.5+ or compatible security configuration by July 31, 2017 to keep your bot working.
所以我使用 npm install –save botbuilder
3.8.3
自从我升级后,一个机器人停止工作,但另一个工作正常。我收到的错误消息是 There was an error sending this message to your bot: HTTP status code InternalServerError
。该机器人在机器人模拟器上运行良好,但在部署到 Azure 后就不行了。所以这甚至不是代码问题。考虑是否是 Microsoft 服务器问题,我的其他机器人工作正常。可能出了什么问题?
我发现了问题,我的机器人现在又恢复了 运行ning。显然是一些部署问题。
我先 运行 以下命令:
azure site log tail botsitename
我收到一条错误消息:
Application has thrown an uncaught exception and is terminated:
Error: Cannot find module './dialogs/Prompt'
at Function.Module._resolveFilename (module.js:469:15)
at Function.Module._load (module.js:417:25)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (D:\home\site\wwwroot\node_modules\botbuilder\lib\logger.js:3:16)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
因此,我删除了根目录中的 node_modules
文件夹并重新安装了 npm
。这让我的机器人复活了! :)