Environment
OS: MacOS 12.6
mkcert version: 1.4.4
Server: localhost
Client: Chrome 105.0.5195.125
What you did
mkcert -install
mkcert {$domainName}
What went wrong
Works well on firefox & safari but not on chrome when accessing my react app on $domainName:3000 using command line:
HTTPS=true DISABLE_ESLINT_PLUGIN=true SSL_CRT_FILE=~/Documents/$domainName.pem SSL_KEY_FILE=~/Documents/$domainName-key.pem npm run start
I've been able to make my app work on chrome when disableing wifi on my laptop. It looks like chrome is trying to resolve from internet (and fails) before resolving from my localhost.
I've finally found on some other post about meteor app.
Just prefix the command-line with HOST=0.0.0.0
Related
I'm very new to Gatsby and have just started reading up on the website's tutorial here. However, I'm having some trouble running the gatsby develop command as it throws an error and displays only this message and nothing else:
Looks like develop for this site is already running, can you visit http://://localhost:8000 ? If it is not, try again in five seconds!
When I click on http://://localhost:8000, the page just says localhost refused to connect.
Below is the output of gatsby info -C:
System:
OS: macOS High Sierra 10.13.6
CPU: (4) x64 Intel(R) Core(TM) i5-2415M CPU # 2.30GHz
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 14.4.0 - ~/.nvm/versions/node/v14.4.0/bin/node
npm: 6.14.5 - ~/.nvm/versions/node/v14.4.0/bin/npm
Languages:
Python: 2.7.14 - /usr/local/bin/python
Browsers:
Chrome: 85.0.4183.102
Safari: 11.1.2
npmPackages:
gatsby: ^2.24.54 => 2.24.54
npmGlobalPackages:
gatsby-cli: 2.12.94
I've also tried uninstalling and installing the gatsby-cli, but the issue persists. Also checked if anything's running on port 8000 using lsof -i TCP:8000, but nothing came up.
If someone could shed some light as to where the issue's coming from, I'd greatly appreciate it!
PS: I tried running gatsby build and gatsby serve, and encountered no problems.
This is because of the port of the OS firewall. You can easily fix it by adding a port to the default Gatsby running command (in your package.json):
gatsby develop -p 8001
Note the -p flag, as you can see in the documentation it change Gatsby's running port. Of course, you can change the 8001 for any desired (and unused) port. Changing it won't affect the Gatsby project because it will readapt the GraphQL playground to it.
Most likely you'd have to open port 8000 on the firewall.
On OSX this should be pfctl & /etc/pf.conf.
I'm trying to set up local https with gatsbyjs. I followed gatsby's instructions including setting up Certutil via brew install nss.
I then run, $ npm run develop -- --https.
When I open https://localhost:8000/ in Chrome I get ERR_SSL_PROTOCOL_ERROR and in Firefox I get Error code: SSL_ERROR_RX_RECORD_TOO_LONG.
Any help on this would be appreciated.
OK, today is the day. I finally started (again) to use TDD.
I notice that this thing called Dusk has appeared. Great, browser testing.
The only problem is that I get this:
Failed connect to localhost:9515; Connection refused
I did chmod 777 on the chromedriver files and still get the error.
My dev server is a Centos vm. Is this the problem?
Edit:
I think I am making some progress:
yum install GConf2
Now I get:
cannot find Chrome binary
EDIT
I am back on this now.
php artisan dusk gives me:
Facebook\WebDriver\Exception\UnknownServerException: unknown error: cannot find Chrome binary
(Driver info: chromedriver=2.28.455506 (18f6627e265f442aeec9b6661a49fe819aeeea1f),platform=Linux 3.10.0-327.3.1.el7.x86_64 x86_64)
If I do this:
./vendor/laravel/dusk/bin/chromedriver-linux
I get this:
Starting ChromeDriver 2.28.455506 (18f6627e265f442aeec9b6661a49fe819aeeea1f) on port 9515
Only local connections are allowed.
Any ideas?
Mick
Try running: ./vendor/laravel/dusk/bin/chrome-linux
If you see:
Starting ChromeDriver 2.28.455506 (18f6627e265f442aeec9b6661a49fe819aeeea1f) on port 9515 (or whatever port you are using)
Only local connections are allowed. Then it is working. I also had to install the google-chrome binary:
How to install 64-bit Google Chrome on 64-bit RHEL/CentOS 7
The other thing to install is Xvfb. Then you can run this command in a new terminal: Xvfb :0 -screen 0 1280x960x24 &
This is supposed to be the way to run this. I however, have not been able to get this to work. I am hoping someone can also add some input here.
Update:
I got his to work. Make sure that nothing is running as root.
When trying to configure a Remote Python Interpreter in Pycharm using Docker I get the following error:
com.github.dockerjava.api.excepion.DockerClientException: Enabled TLS
verification (DOCKER_TLS_VERIFY=1) but certificate path
(DOCKER_CERT_PATH) '/Users/me/.docker/machine/machines/default'
doesn't exist.
I've $export DOCKER_TLS_VERIFY=0 but with no difference.
I've manually created '/Users/me/.docker/machine/machines/default' but with no joy.
I've deinstalled and reinstalled both Docker and Pycharm but still get the same error.
I'm on a Mac OSX 10.12.1
Pycharm 2016.3
Full disclosure: I use vagrant and virtual box on my mac too.
Any pointers would be appreciated.
Kevin
I fixed it as follows:
Obtain socat (if not already installed)
e.g. brew install socat
Then: socat TCP-LISTEN:2375,reuseaddr,fork UNIX-CONNECT:/var/run/docker.sock
Then in pycharm/docker config:
Api URL: tcp://localhost:2375
Many thanks to the following found on:
https://youtrack.jetbrains.com/issue/IDEA-153973
If you have been using docker-machine for Mac to support PyCharm or the "socat" hack to access Docker API - It is no longer necessary with PyCharm EAP (https://www.jetbrains.com/pycharm/nextversion/) — You can set your remote debugger API_URL directly to: unix:/var/run/docker.sock (supporting debug mode, and the environment runs a lot faster, when not using VirtualBox).
There is a no-questions-asked 30 day trial of EAP before that update goes live (some time this month)
I have a couple of dev machines. One works, the other doesn't.
Setup that doesn't work:
Host: quad
Firefox: 13.0.1
Ubuntu: 12.04 Desktop
Ruby: 1.8.7 (2011-06-30 patchlevel 352)
RubyGems: 1.8.15
Selenium-WebDriver: 2.24.0
Proxy: 192.168.1.70:8118
Setup that does work:
Host: dev
Firefox: 13.0
Ubuntu: 12.04 Desktop
Ruby: 1.8.7 (2011-06-30 patchlevel 352)
RubyGems: 1.8.24
Selenium-WebDriver: 2.22.2
Proxy: 127.0.0.1:8118
In the setup that doesn't work (host quad) Firefox will pop up but then log an error regarding an unexpected 503 response (I use Privoxy and on the machine that doesn't work I make the proxy available to the whole LAN, so my proxy is 192.168.1.70:8118).
Firefox opens and doesn't close when the Ruby script crashes. So I've been able to use that Firefox instance to surf the internet. That works fine. So Firefox is able to start up and go through Privoxy just fine. The Privoxy 503 page never shows up on the Firefox I'm seeing pop up only in the logs.
I've also tried this script (on host quad) with Chrome. Same error in the logs but Chrome never pops up a window for me. I assume this is due to the difference in the way proxies are handled by the 2 browsers.
On host dev, this script works fine. The script works without error when the proxy is 127.0.0.1:8118 (it's local Privoxy). Since the Privoxy on host quad is available to the whole LAN I changed the proxy setting on host dev to 192.168.1.70:8118. Once I did this I ran the script on host dev and got the Privoxy error in the terminal but Firefox opened and executed the rest of the script as if the error never happened.
My assumption is that this is a subtle difference in my setup that is causing issues. But I don't know if it is Firefox 13.0.1. vs 13.0 or my version of RubyGems or my version of Selenium-WebDriver.
I figure that ideally I should have the same setup on both machines. But which setup is better? I'd prefer to be able to work with the latest Firefox just because I get sick of telling the Update Manager in Ubuntu to not execute all the Firefox updates every day. And when I run apt-get update/upgrade I don't want to have to manually remove all of the Firefox updates. That said, if the best setup is to use Firefox 10, Ruby 1.8.7, RubyGems ... then I'll just go setup some VM that I don't bother running apt-get update/upgrade on so I have a more stable environment.
Thanks
Turns out it was a forward setting in Privoxy. I had to setup forwarding for 127...*/ in /etc/privoxy/config. I had already setup forwarding for 192.168../ and thought that was fine since the Proxy IP was 192.168.1.70 but it wasn't good enough.