Bot is remote but callback URL is localhost - azure

I want to debug my azure bot with botframework emulator.
Whenever I try to connect, the emulator tells me the bot is remote but the callback URL is localhost.
How can I change this?
It also complains about my ngrok settings, but I am fairly sure that everything's allright about them, because I downloaded ngrok and pasted the correct path to the .exe in the settings.
How can I fix this problem?
Note that I finally get an internal server error.
My Settings in the bot Framework page (as suggested by JustAShadow) are:

the URL you entered in the box for URL on the emulator is supposed to be for local debugging. I.E you run your bot locally, get the URL for that local running bot, and add that localhost url to your bot emulator. you are emulating an actual bot in a bot framework inside a bot framework emulator!
The emulator is built in order to emulate the Bot framework ENV, so that when you run your bot locally, it understands the type of environment you should be running under.
I.E if you get DocumentDb emulator, you dont connect it to a real database, its just pretending to be azure, not Debugging Azure

Assure the MSID and PW are correct in the web.config when you publish

Related

Cannot set property 'locale' of undefined, not working in replit but at my pc

I get this error on replit but on my pc the bot works well, but i want to host my bot free 24/7.
This is the error
This is my i18n configure in my code
If there is an other website where i can paste my code and host it with express it would also help me.
thx
Repl.it is just not reading the sub-prototype 'locale' from your targetObject you should just try switching hosts :)
Check out Heroku. It's free and you can get 550-1,000 hours of runtime for 0$. Probably the best feature of this hoster is the GitHub integration, so you don't have to upload your bot's code manually, but can connect your GitHub to a project and choose from which branch you want the code.
You can also set it to automatically update your project on Heroku when you push to the selected branch.
Important note: If you host your bot on Heroku, for example, config.json cannot be used. Variables like the bot-token etc. must be set on heroku. The best thing to do is to watch this tutorial, everything is explained there

Google Cloud python project has localhost error

I've been following the instructions for this guide:
https://developers.google.com/gmail/api/quickstart/python
to run a basic program which reads a Gmail inbox.
Basically, the program opens up a new window asking you to login with your gmail account - once that is done, it gives the information back to the program which should print results on the google cloud shell terminal.
Whenever I login with the correct google account, the page shows "localhost refused to connect". For this reason, the rest of the program cannot continue, so the google cloud shell is stuck waiting for the login to occur. Would anyone have any ideas on why this localhost error is happening? Thanks in advance.
Solution
Run the code from your desktop.
The OAuth Flow that you are using requires a web browser. This means the webserver process must be running on your system.
You are trying to run code in Cloud Shell. And it does not have one. If you look at the source code run_local_server() starts a webserver. The server is running on the wrong system.
There are methods to create a public webserver (not using localhost). Then the issue becomes how to start the webserver on Cloud Shell.
Except for experimenting you are using the wrong services (Cloud Shell).

Microsoft Bot Framework testing connection now only results in internal service errors

Whenever I test my bot using the "test connection to your bot" feature, it only response with "internal service error" and a 500 status code. It didn't do this yesterday, and I havent changed anything since then.
What more, the bot works fine when I run it on the bot framework emulator on my local machine.
Whats more, whenever I try to access the logs for my bot in azure, I get an error code saying that my app isn't running, even though according to the azure portal it is.
What's causing this?
Is there any way to fix this?
Is there any way you can share the bot with us (or rather botId) so we can look in the logs?
have you tried talking to your bot in the cloud using the emulator? You can change that localhost endpoint to point to your cloud service and try from there.
Had a similar problem to this. But changing the endpoint did nothing. Linked to the solution we came upon here: https://stackoverflow.com/a/36789806/1152015

Azure Mobile Services on Local IIS rather than IIS Express

OK, I've created an Azure Mobile Services project in Visual Studio 2013.
I run it up as-is, then in the browser I test it by adding a todo item via the simple browser app that seems to get baked into these service projects. It gives me a '201 success' message - brilliant.
I then convert the project from IIS Express to Local IIS as the web host, recompile and try again, and although I get the same smiley face app telling me that everything is OK, when I try and add a todo item I get a 404 error. This is contrary to the Microsoft article that gives these instructions, which clearly says I am able to choose either IIS Express or Local IIS when setting up the project.
My guess is that web.config is missing something when this project runs on the local IIS server.
I'm hoping someone already has a solution before I spend hours trying to work out how to configure IIS for this type of project.
I've already wasted a load of time working through loads of bugs and gotchas with Azure Mobile, and I'm starting to run out of steam - so I'm hoping someone can help me before I go and grab an account at Parse.com
Many thanks in anticipation.
Dean
The easiest approach for your situation might be to just deploy to the cloud, and use that service for your testing. Visual Studio 2013 Update 2 makes it easy to deploy your app and connect to it for remote debugging. It is a little slower than using a local instance, but you are also assured that there will be no surprises when you eventually go live (since you are live the whole time).
That said, we will investigate the issue you are seeing with using IIS directly. Some things you might want to try on your own:
Verify that you can view the web side from your Mac's browser, to make sure that the firewall is letting the requests through.
Try using the "Getting Starting" link from the smiley-face page, to see if the REST endpoints are behaving correctly.

OAuth callback URI changes port number in Azure emulator

I've developed a working solution using Azure SDK October 2012. It connects to another service that uses OAuth. When I move my solution to a machine using Azure SDK 2.1, the OAuth callback fails because the port number has changed.
For example, when I debug the solution it opens a browser at 127.0.0.2:82. Then I connect to the other service, and the callback comes to 127.0.0.2:83, which the browser can't find. Prior to being redirected to the other service, I can see that the controller is looking at the Request object and getting the invalid port # (83) from that.
I'm not a MVC or Azure whiz, but this solution works perfectly under the older version of the SDK. Did something change? btw I've tested this with IE10 and Chrome, so it's not a browser issue.
Just to be clear - I have the exact same solution running on 2 machines. One works, and the other doesn't. So it's not a problem with my code, unless there's something that explicitly needs to change for Azure SDK after October 2012.
The Oauth2 app has been configured to redirect on specific site + port, so either you need to reconfigure the Oauth2 configuration in the OAuthProvider
or else see why the emulator locally is binding to a different port. Maybe the other port is being used by some other site running in the emulator. Sometimes just restarting the emulator does the trick.
See this to understand how the local emulator works.
I was missing the [Authorize] attribute on the controller method that was looking at the Request object. When I added that, the port number problem went away.
Still not sure why it worked on one dev machine and not the other (or with one version of Azure SDK and not the other), but now it works on both, so there you have it.

Resources