Running Bot emulator through docker containers - docker

I have a working bot that interacts normally with the bot emulator.When I added docker support the emulator stopped interacting with the bot.
I read that I should un check the "bypass ngrok for local addresses" in the emulator settings and configure ngrok.
I have trouble understanding what I should do, I downloaded ngrok.exe and it opened a command line under the name "ngrok.exe".
The path for the running project is :"http://localhost:32768/api/messages".
How should I configure ngrok so the emulator will start interacting with the bot ?
Any other approaches would be good to..

I was able to get my docker container to work with my emulator finally, so I'll show you what I had to change to get it to work!
Using: Emulator 4.2.1, ngrok, and a sample echo bot:
Place the ngrok.exe file where you can find it. Mine's in a folder on my desktop. Then open the emulator. In the bottom left, there is a cog wheel for the emulator settings:
That page will open ... emulator settings. In this page, use the browse button to navigate to and select your ngrok.exe file:
I found that it did not matter for me whether or not I checked the 'Bypass' box.
Note (here's what saved me): localhost is mapped to my ipv4
I ran ipconfig /all in my command prompt to get my IPv4, and then went back to the emulator. In the configuration for my bot, where I was supposed to put in my end point (typically https://localhost:3978/api/messages), I replaced the word 'localhost' with my IPv4:
After I did that, I was able to talk to my bot:

Related

Is it possible debug iOS Chrome on Windows 10?

As the title says, I need to debug a website opened with mobile Chrome on an iOS device (iPod, iPad etc.) on Windows 10. I have successfully set up iOS Safari debugging on Windows 10 via Chrome DevTools (GitHub repo , helpful comment). I would love to do the same thing except with Chrome or Firefox and not Safari. Is it even possible?
Yes it is. You'll need node first and (web inspector enabled on iOS>Settings>Safari) then...
Install weinre sudo npm -g i weinre (or) npm i -g weinre
Run weinre weinre --boundHost YOUR_IP:PORT
When it runs copy paste the following script to your code
<script src="http://YOUR_IP_ADDRESS:PORT/target/target-script-min.js"></script>
Connect your iOS device via USB
Go to http://YOUR_IP_ADDRESS:PORT/client/ from your browser (your pc) where you want to debug and you'll see your device.
Error in Step 2
If you see any error in step 2, first check your IP via ipconfig and then bound a similar IP with a free port that is not being used. For example my local ip is 192.168.1.5 so I used the same with a free port - 192.168.1.5:4576
Error in Step 5
If you can't see your device try adding a name myDevice to the script in Step 3 as follows
<script src="http://YOUR_IP_ADDRESS:PORT/target/target-script-min.js#myDevice"></script>
Then in Step 5, when reaching your device add the device name to the URL as
http://YOUR_IP_ADDRESS:PORT/client/#myDevice
SUCCESS
If everything runs fine, you'll be able to inspect your code, read indexedDB, session and localStorage and see outputs in Console among other dev tools.
I found this link very helpful.
No other answer or article on web is more straight forward than this: washamdev
It's a verbose article so I cannot put everything here. Hope the link does not break.

Jenkins not accessible with http://<hostname>:8080 in Windows server 2012

I have installed Jenkins in Windows server 2012 64-bit machine and want to make it available in internal network.
I have added --httpListenAddress to 0.0.0.0 and restarted Jenkins and tried to access it with http://hostname:8080 but no page shows up(though It showing Jenkins icon in URL bar). However http://localhost:8080 works fine.
Further I checked the firewall inbound rule for the Jenkins but seems it has no issues.
I tried to catch the listening ports with "netstat -aon | find /i "8080" and found <host ip address>:8080 FIN_WAIT_2 which sign towards that the request is stuck(May be I am wrong).
I am clueless what exactly is blocking to use hostname with jenkins. Please share your solution if you already fixed this issue.
You might try adding a Windows Firewall rule. Go to Windows Firewall, Advanced Configuration, Inbound Rules rule and create an Allow rule for the specific version of java.exe you have installed.
This worked for us with the drawback that every time you upgrade Java, you must also modify the firewall rule. This is because Java creates a new subfolder for every version. We've tried using %JAVA_HOME% in firewall rules but it doesn't seem to work. We were on Windows Server 2012R2 at the time.
Similar answer here: https://stackoverflow.com/a/17479566/7752
On the server open a new command prompt and type
ipconfig
You should get a list of ips. Open a browser and type each up followed by 8080 for e.g.
http://202.123.2.1:8080
If Jenkins opens up, from another computer ping the ip and see if you can get a ping reply
ping 202.123.2.1
If you get a ping reply, you can access jenkins from any pc on the network by typing in the ip and port number.
Now to get to the hostname,you need to edit your host file
c:\Windows\System32\Drivers\etc\hosts
Type in the ip followed by the hostname
202.123.2.1 jenkins
If you can't get through, you need to open port 8080. See https://www.vultr.com/docs/how-to-open-a-port-in-windows-firewall-on-windows-server-2012
You cannot access from outside the machine because Jenkins Service does not have credentials to use that machine, only from localhost is accessible.
This is how to enter the credentials in Jenkins service.
In the Windows search bar, type services then enter.
Then scroll down to Jenkins and double-click on it.
In Jenkins Properties, select the tab "Log On".
Select Check box "This account"
Update your username and password.
Voila! Now Jenkins web can connect to the Jenkins machine via Jenkins service.

React native not running on localhost

React native stopped working, whenever I run it now (no matter which project) I get the error could not connect to development server |
ensure the following
node server is running and available on the same network - run npm start from react native root.
Node server url is correctly set in appdelegate
URL : http://localhost:8081/index.ios.bundle? platform=ios&dev=false
Please ensure you have done the following
1) run server using
npm start
2) if you are using actual device , make sure you are connected to same network
3) for android: run the following command and try again
adb reverse tcp:8081 tcp:8081
I was face same problem while running in physical device.
I did as below:
Open terminal and check your local ip address.
Shake device(android) click on dev settings
Click "Debug server host & port for device" under debugging
type local ip address and port number.
note: cross check in browser ip along with port number.
I usually just run npm start in my terminal. (OSX) I assume it would be the same on Windows
npm start
To debug on a real device:
On iOS - open the file AppDelegate.m and change localhost to the IP address of your computer. Shake the device to open the development menu with the option to start debugging.
let jsCodeLocation = NSURL(string: "http://{{YOUR IP ADRESS}}:8081/index.bundle?platform=ios")
On Android, you can open dev menu on the device and select Dev Settings, then update Debug server host for device setting to the IP address of your computer.

Error when testing app from mobile device - ERR_CONNECTION_REFUSED

After upgrading to OSX Yosemite, I can no longer test my app on a mobile device by using my development machine's (MacBook Pro) IP address. For example, I used to be able to view a Rails app on a phone by going to http://192.168.0.4:3000, but now I get the following error:
ERR_CONNECTION_REFUSED
I get the same error when testing an AngularJS app using the grunt server running at http://192.168.0.4:9000
Any help will be greatly appreciated.
It could help to bind the server to your local IP, like
rails s -p9000 -b192.168.0.4
to start your rails app
Consider giving a try to Pow. Its pretty simple to install, and a great solution to share a local development across multiple devices.
Like it explains in their homepage, you can install it with just :
curl get.pow.cx | sh. To prevent any errors, install in Terminal app outside a Tmux session.
And just symlink your app :
cd ~/.pow
ln -s /path/to/myapp
You can access your app at http://myapp.dev/, and at http://myapp.[your ip address].xip.io from another device.
Not a direct response to your issue, but an alternative to setting yourself a configuration in your preferences.
Turn IPv6 off. It Prevented me from connecting to my localhost from other computers on my LAN. And, with the newer versions of OSX there is no way to turn it off in the Network Preferences Panel so you have to do it from terminal.
Open Terminal and enter to turn it off:
networksetup -setv6off Wi-Fi
And this to turn it back on:
networksetup -setv6LinkLocal Wi-Fi
If you are connected via Ethernet or something else just run this command to list the available options:
networksetup -listallnetworkservices
and replace "Wi-Fi" with the appropriate device.
I don't have a mac, but that seems to be the server not accepting connections, if that is the case, it's only accepting localhost connections, try binding de server to accept all connections or bind it to 0.0.0.0 ip
Can you access that IP from Browser? are you sure your IP is in the same range with 192.168.0.4? It is your mobile device connected on the same network? Maybe you used internet sharing before update to Yosemite and now is off?
I think your IP address changed. Telnet from console(terminal) your I.P. port. If 192.168.0.4 is your real Ip then maybe add(as root or via sudo) an entry in /etc/host file an entry as 127.0.0.1 192.168.0.4. Restart network or reboot. Also you can try nmap ( on ip to see open ports). Nmap has been ported to OSX just google for installer.

GWT dev mode ipad

Hi, I'd like to run my gwt project in dev mode and open it on my i pad. How can I do this? I tried to replace the local-host part with my pcs ip address and open the website, but it doesn't work.
If you are using eclipse, the Jetty server binds on the localhost interface only, meaning that it will not serve request when the address is not localhost even if the specified IP is on the same machine. To allow connection from other computers (or iPads) you need to modify this addres in the launch configuration.
Open your launch configuration:
Run --> Run Configurations... --> Web Application --> [YourApplication]
Open the Arguments tab and in the first text box (Program arguments) add the following argument:
-bindAddress [your ip address]
ex: -bindAddress 192.168.1.200
see this post
There is NO WAY to use the dev mode for iOs, because there is no dev-mode plugin for iOS.
You can enable the Super Dev Mode. This will enable a really fast compiler.
update
As mentioned: -bindAddress 0.0.0.0 may be helpful to bind the jetty to any IP.
Your ipad and the system must be connected via Network (LAN).

Resources