I am working towards a chatbot,with wit.ai and facebook messanger as the interface for it,The integrating process went error less and the curl -H gave
{success:true},but the bot does not respond if messaged,I looked all over it,may i know is it because of heroku for which this behaviour is seen,or the deployment platform does not matter at all,what can be the area or part that i may be missing out?
List of things i have already done:
1 create a story over wit.ai
2 a simple nodejs server code printing ("this is a bot").
3 after properly executing,wrote the whole bot.
4 deployed it to heroku
5 in Facebook Developer section,created apps for messanger.
6 setup webhook,after creating a verify_token,it shows "complete"
7 generate page token and put verify_token and page_access_token in heroku dashboard's "config vars"
8 subscribe the page
9 trigger it using curl and chat with the bot;**
*error: bot does not respond in the page
url/webhook -> bad request*
Can anyone give me some suggestions regarding this
I find it highly unlikely that there is a heroku problem. Did you try chatting with the bot without using witai? Also type heroku logs on terminal to see if there are some errors in your application. I used heroku to deploy my chatbot, and it works really well since you can find all the errors in the logs. I am not well versed with witai, but since it is just calling the bot, heroku shouldn't be the one causing the error
Related
I am developing the shopify app according to the tutorial presented on the page (QR create code), however when I am doing tests, when I uninstall it and try to reinstall it I get the following message:
There is no page at this address
Please check the URL and try again, or use the search bar to find what you need. (Attached in the photo)
Photo 404
If you can help me, thank you very much, I feel that it is as if the authentication failed or I had already used the token, the truth is that I do not know about the subject
My project is in node, react
"#shopify/app": "3.3.3",
"#shopify/cli": "3.3.3"
Thanks
This is a shopify_app bug
You need to delete the previous installation Shop from the database then try the install again and it will work.
If you have only one shop in the database quick solution will be the rails console
rails c
Shop.first.destroy
To resolve it permanently you have to register and handle the app_uninstalled webhook however it will not work 100% of the time due to delay. When the user removes the app the Shopify server trigger webhook with delay (2 seconds to 10 minutes)
I'm trying to debug a bot locally on Bot Framework Emulator.
I've installed ngrok and I made it start with the emulator itself (using the settings provided by the framefork).
The bot starts correctly using npm start, so I've putted the URL on Bot Framework Emulator and I checked the debug mode.
As it starts the emulation stops here and looking at the ngrok traffic inspector I got this.
I've already tried to restart the framework, the bot itself and check if ngrok was already running (I couldn't find any clue about this), so any advice would be useful, thanks in advance!
I used to create a teams conversation bot in c#, and when I test it in local environment, I need to use ngrok to expose my service to the internet so that the bot service I created in azure portal can listen.
I used this command ngrok http -host-header=rewrite 3978, then I can get a 'https' url that is the same as localhost:3978 and set this url+'/api/messages' as 'Messaging endpoint'.
By the way, I need to set appId and app secret in appSetting.json with the value of my azure ad application created when creating 'bot channel registration'. I remembered that if I used error appId, ngrok will get 404 error.
=====================UPDATE=========================
As I really can't understand the error, pls compared your actions with mine and provide more details if needed.
I installed Bot Framework Emulator and test it locally. First I installed it, and I followed the tutorial to make the configuration. I used c# as I metioned above, so when my bot program running locally, it will show me the successful website with a url like 'http://localhost:3978/', so I open a bot in emulator like below, then click 'Connect', pls note here, I never did any other configurations such as set environment variable, all actions are included in the screenshot:
After these steps, I can reach it. By the way, if I didn't enter appid and secret, I will get an error 'Unauthorized', if I used wrong id and secret, an 'incorrect' error will appear.
You are using nodejs to compose a bot, so maybe the appId and secret can be found in .env?
I have created a basic C# bot in Azure and have been doing some tests with it. I am able to debug locally and test that the bot works and responds normally, However, Web Chat does not seem to work (either the "test in web chat" within Azure or the embed code provided under "Channels" menu. The bot does not respond and the following can be seen in the browser's console:
botchat.js:20 WebSocket connection to 'wss://webchat.botframework.com/v3/directline/conversations/b00803da186843c08e057a03f1af26d3/stream?watermark=5&t=PdrKaTBDGps.dAA.YgAwADAAOAAwADMAZABhADEAOAA2ADgANAAzAGMAMAA4AGUAMAA1ADcAYQAwADMAZgAxAGEAZgAyADYAZAAzAA.PWqO6rz50wE.O0xFG-RkTZ0.306EPN7-0X_MGGfBUujpWoKN8Xm942hqpn_BVxbRe_M'
failed: Error during WebSocket handshake: Unexpected response code: 400
(anonymous) # botchat.js:20
This happens with any chat bot created in Azure even without any code changes but only when in my company environment, which is behind a proxy. I am almost certain that this is somehow the cause of the problem, but I have no clue why nor how I might approach the proxy team to report the problem nor what I may need to ask them to unblock.
The Question: Am I right to assume that this is a proxy problem or should I investigate something else and, if this is indeed a proxy issue, what do I need to do/ask to unblock to solve it?
Any help is highly appreciated!
This is definitely a Proxy issue, You can talk to your admin team and get these links removed from their firewall settings so you can get access. We do get this issue's in our company we do the same as i have suggested.\
Happy coding!!!
I was trying to set up a prod and dev environments for my bot app with Twilio channels tied to an Azure Bot when I started getting this error on my prod env.
Error: POST to 'https://sms.botframework.com/v3/conversations/..../' failed: [400] Bad Request
Steps taken:
The code is exactly the same between my prod and dev envs
Verified that the configuration parameters are the same among the two.
Checked that Twilio isn't getting any errors.
Routed calls locally to my dev box and looked at the address the msg is being sent.. looks fine.
Next
Will look into what the actual request.. hopefully it will help me figure it out.
Turned out the error was that when wiring up things on Twilio, I missed to correctly point the prod TwiMl App correctly to the right number. This can be done in Phone Numbers > Manage Numbers > Active Numbers
After that you should head to Portal.Azure.com and delete the Twilio channel to then add it again.
That fixed it for me. Cheers! :)
I've deployed a node.js chatbot (built using Microsoft Botbuilder package) as an Azure web app. As seen in the attached image, the conversation in channel emulator(same with web chat) goes on smoothly until there's a db call. The part were the intent handler tries to do db call, the bot responds with the default error text(I didn't understand. Please try again.).
Interestingly, if I type in something random( like a Hello) in response followed by the query again, the bot goes ahead with the db call. This scenario is shown in the attached screenshot.
Strangely, the issue doesn't happen when I work on the bot locally or deploy it outside Azure (say AWS).
My question is how do I figure out what exactly is going wrong here ? I have been going through the logs in the Diagnostic Console(Kudu) of my Azure web app, but no pointers in any of the logs. Any help is appreciated!
edit: Got it fixed by following the steps from this link