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:
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.
I have several of my development web sites on my Mac, each set up as virtual hosts in Apache. For example: example.dev, example2.dev, example3.dev. (I know we're not supposed to use .dev anymore, but I'll do that for my next project.)
I have an iPhone tethered via USB and would like to access the *.dev sites via Safari for testing.
I can access Apache's main directory via the Mac's IP address or .local, but I can't figure out hot to get to the virtual hosts; it throws a 404. Is there a way to get the iPhone to use the same DNS settings as the Mac?
One thing you can do is to install dnsmasq on your mac.
First install dnsmasq:
brew install dnsmasq
Run the configuration command it asks you to, which may look similar to this:
cp /usr/local/opt/dnsmasq/dnsmasq.conf.example /usr/local/etc/dnsmasq.conf
Now you can edit the configuration at /usr/local/etc/dnsmasq.conf. Add the following line: (I put mine right below the line that says "#address=/double-click.net/127.0.0.1")
address=/*.dev/192.168.1.10
192.168.1.10 is your private ip address
Now restart the dnsmasq service
sudo brew services restart dnsmasq
Hope this works for you.
I am facing strange issue on chrome while debugging local ASP.NET application on chrome. I am not able to open localhost without https. With Https it's giving error: Your connection is not private NET::ERR_CERT_COMMON_NAME_INVALID.
It was working on chrome till last update & is working on firefox & IE.
There is also no option in advanced setting to skip error & visit site.
Please help.
Finally banging head on desk for two days I found this setting in chrome://flags/ to Allow invalid certificates for resources loaded from localhost.
finally no disable all certificate error, only for localhost. Adding answer for someone struggling with same issue.
We have found that the best (and only) way to override Chrome is to type the phrase thisisunsafe at the Chrome generated webpage that blocks you. Just type the text directly to the page; there will be no text entry box.
We have servers on an internal network which use SSL but which are not externally signed and this is the only way to get to them.
Just when the page loads, don't click on page and type: thisisunsafe.
Page will automatically refresh and will load the content.
You can copy this tag and add to Google Chrome shortcut to bypass this warning permanently.
--ignore-certificate-errors
Updated - March 2020: Adding the above tag to Google Chrome shortcut does not work anymore. In order to temporarily turn off or bypass this annoying warning from Google Chrome, to go chrome://flags and search for this following entry:
Allow invalid certificates for resources loaded from localhost
After that, enable the option and restart your Google Chrome browser. By doing so, you can bypass the alert as long as you want until you turn off the option.
Source: Fix Your Connection Is Not Private Error In Your Browser
There is a short explanation over at serverfault as to what changed in the RFC spec to cause this. One of the suggestions is to use or add the IP address (presumably 127.0.0.1) to the name 'localhost' for the DNS property of the self-signed cert.
If you use the dotnet core tool: dotnet dev-certs https --trust (or run the export per instructions in devcontainer.json) the localhost certificate generated will use only the name 'localhost'.
But there are other options for generating self-signed certs including Powershell. But...rather than follow the older syntax, use Example #9 as found on the New-SelfSignedCertificate docs:
New-SelfSignedCertificate -Subject "localhost" -TextExtension #("2.5.29.17={text}DNS=localhost&IPAddress=127.0.0.1&IPAddress=::1")
This appears to resolve the cert error in Chrome (96.0.4664.45). It's necessary to close and re-open Chrome after generating the new cert and incorporating it into your web project or container.
I ran into this error and my problem turned out to be Charles (it's a web debugging proxying app). I needed to install a SSL Proxy Certificate for Charles.
Go to Help menu
SSL Proxying -> Install Charles Root Certificate
Open Keychain Access and enable/allow it
If you don't use Charles then obviously this answer doesn't help you at all.
I had similar problem when I tried to use my self signed certificate and run my xhtml app in browser under https and with tomcat. What I did:
in java's RE dir (usually Program Files\Java\jre1.8.0_202\bin) there is keytool and in command line I used this:
keytool -genkey -alias example -keyalg RSA -sigalg SHA256withRSA -keysize 2048 -validity 3650 -keystore "C:\yourdir\yourkeystore.jks" -ext san=dns:localhost,dns:yourdesktophostname,ip:127.0.0.1,ip:::1
Answer questions to create certificate which is created for 10 years, SHA-2 and what Chrome needs more: san(SubjectAlternateName).
I added below lines to tomcat's server.xml (usually Program Files\Apacha Software...\conf:
<Connector port="yourportnumber" protocol="org.apache.coyote.http11.Http11NioProtocol"
maxThreads="150" SSLEnabled="true"
compression="on" scheme="https" secure="true"
keystoreFile="conf/yourkeystore.jks"
keystorePass="yourpassword"
SSLVerifyClient="none" SSLProtocol="TLSv1.2"/>
Restart Tomcat.
Open the localhost address in Chrome browser (https:\localhost:yourport). It will tell "Not secure" at left side of address line and https crossed out Click on it and in that window press on certificate (invalid). It opens the certificate window and press on Details tab and press on copy to file button. Create crt file as instructed.
Open up Chrome Settings > Show advanced settings > HTTPS/SSL > Manage Certificates. Select Trusted Roots tab and import the crt file here. Edit this certificate and mark all check boxes.
Restart Chrome
It's 2022 now and web everywhere is using https protocol. Sooner or later the hacks and workarounds in this post will become more and more annoying or not work anymore. If you are developing web applications, even for testing, you will need to either get a free SSL certificate or issue your own certificate for in-house uses.
For free certificates, there are three popular web sites providing this service:
https://www.sslforfree.com/
https://letsencrypt.org/
https://zerossl.com/
If you're developing a local web application for your company intranet, you should generate your own SSL certificate using OpenSSL with the information below.
If you would like to generate your own certificates for different purposes, using the latest OpenSSL tool (version 3.0 series) becomes very convenient and relatively easy, too. Just follow the steps listed on this SocketTools page.
https://sockettools.com/kb/creating-certificate-using-openssl/
I have just completed and make our internal web server and application free of security warnings on any browsers. Once you've got familiar with the simple commands and you will be able to expand the OpenSSL uses to other web application projects.
I was trying to run my first .net Core web app in chrome and had same error. Using Version 84.0.4147.135 of Chrome.
To Resolve (quick fix),
When you run the application you will see two options 'Advanced' and 'Back to safety' on page, shown by chrome browser.
Click Advanced button, it will show you 'Proceed to localhost(unsafe)'. Click that and your application should work.
(I know above one is not a actual fix. The actual resolution is about adding localhost certificate as trusted root certificate.)
If you want to install certificate - When you will see error and if you click on error - 'NET::ERR_CERT_AUTHORITY_INVALID' it will show you certificate. Copy that and install into trusted root. I tried that however it didn't resolved my issue. I will update it if get resolution to this.
Just figured out how to solve this! Click on the Debug tab in the top menu and click on Debug Properties (right below Options), then scroll down and uncheck Enable SSL. Now try debugging your application again and it should work! It may take a minute to load but it definitely solves the problem...
I also had the same problem. By default Chrome uses google.com which didn't work for me but google.com.bd worked for me(I live in Bangladesh). So if u live in for example in the UK, google.com.uk might work.
Go to this link it will help,
https://superuser.com/questions/169014/chrome-set-search-bar-to-google-co-uk-not-google-com
For angular apps using ng serve, you might have something like this in your package.json file:
"start:windows": "ng serve --port 44470 --ssl --ssl-cert %APPDATA%\\ASP.NET\\https\\%npm_package_name%.pem --ssl-key %APPDATA%\\ASP.NET\\https\\%npm_package_name%.key",
Go to that folder, e.g. C:\Users\{username}\AppData\Roaming\ASP.NET\https, and delete the .key and .pem files for your project. Next time you run it should regenerate them correctly.
Has anyone successfully installed and configured 'prax' https://github.com/ysbaddaden/prax ? I have tried configuring it on multiple pc but no success.
There is pow but it works only on OSX. If any other alternative please share.
First, install Prax and configure your apps as stated on its GitHub.
To know if actually is working, ping to a desire app.
ping myapp.dev
It should ping to your loopback (127.0.0.1). If this is not your case, check again.
Then follow this steps:
1) Restart your server
2) Restart your browser. If you are using Chrome, you might need to clear the cache (as stated on: https://github.com/ysbaddaden/prax/issues/51 and Pow domains not loading in Chrome)
3) Launch the app:
http://myapp.dev/
It is important that the first time you use the http:// prefix.
If you are using Rails (which server Webrick defaults to port 3000, you should add this port to the URL, (I couldn't figure it out how to avoid this):
http://myapp.dev:3000/
check on firefox.I had same problem in chrome, then I switched to firefox and It was working.