Laravel Valet Share Error: "dial tcp [...] no such host" - laravel

I just installed Laravel Valet. Everything works perfectly, except for the site sharing function.
After typing
valet share
Terminal returns the following output, right before Ngrok opens:
grep: /Users/myname/.config/valet/Nginx/myurl*: No such file or directory
Ngrok gives me a public URL, but my browser returns a page with title Failed to complete tunnel connection and error message dial tcp: lookup myurl.test on 192.168.0.1:53: no such host.
How do I solve this?

Solution for laragon
If you are using any VPN, then turn it off and then reload laragon.

Related

GRPC server on Mac not working when using laptop's actual IP address instead of localhost

I am following the GRPC tutorials here https://grpc.io/docs/languages/python/.
In greeter_client.py over here - https://github.com/grpc/grpc/blob/master/examples/python/helloworld/greeter_client.py, instead of using
with grpc.insecure_channel('localhost:50051') as channel:
(the above code works fine), I use the following -
with grpc.insecure_channel('XX.XX.XX.XX:50051') as channel:
where XX.XX.XX.XX is my laptop's public IP address from https://www.whatsmyip.org/.
I get this error
raise _InactiveRpcError(state)
grpc._channel._InactiveRpcError: <_InactiveRpcError of RPC that terminated with:
status = StatusCode.UNAVAILABLE
details = "failed to connect to all addresses; last error: UNKNOWN: ipv4:XX.XX.XX.XX:50051: Failed to connect to remote host: Connection refused"
debug_error_string = "UNKNOWN:failed to connect to all addresses; last error: UNKNOWN: ipv4:XX.XX.XX.XX:50051: Failed to connect to remote host: Connection refused {created_time:"2022-12-29T23:18:44.033798+00:00", grpc_status:14}"
does anyone know why this happens? I think this might be a MacOS issue. Mine is a MacOS Monterey, and I have the firewalls all disabled, so I am not sure what else I should be doing. Is this expected behaviour?
Turns out, the best way to deal with this is by using ngrok. The steps would be something like -
Download ngrok (can use brew install ngrok)
Set up forwarding using something like ngrok tcp 50051
Once you click 'enter', there will be a field under Forwarding, which you should then use. Remember to remove the tcp://

Facing this error when i upload laraval app to live server

This error occur when i trying to hit api from live server.But locally api running correctly. I got this error
cURL error 28: Failed to connect to testapi.certccie.com port 443: Connection timed out (see https://curl.haxx.se/libcurl/c/libcurl-errors.html)
Here we uploaded error image
https://i.stack.imgur.com/MKUZn.png
Maybe this is because of your host that your host dont access to certccie.com.
Try on another host.

Laravel Dusk Testing has an error on the server Curl error thrown for http POST to /session with params

I would like to ask me to try the following instructions on Plesk Server:
php artisan dusk
The following error will occur:
1) Tests\Browser\ExampleTest::testBasicExample
Facebook\WebDriver\Exception\WebDriverCurlException: Curl error thrown for http POST to /session with params: {"desiredCapabilities":{"browserName":"chrome","platform":"ANY","chromeOptions":{"binary" :".\/vendor\/laravel\/dusk\/bin\/chromedriver-linux","args":["--disable-gpu","--headless","--no-sandbox"," --verbose","--window-size=1024,768"]}}}
Failed connect to localhost:9515; Connection refused
/var/www/vhosts/fanswoo.com/fanswoo-framework/vendor/facebook/webdriver/lib/Remote/HttpCommandExecutor.php:292
/var/www/vhosts/fanswoo.com/fanswoo-framework/vendor/facebook/webdriver/lib/Remote/RemoteWebDriver.php:126
/var/www/vhosts/fanswoo.com/fanswoo-framework/tests/DuskTestCase.php:43
/var/www/vhosts/fanswoo.com/fanswoo-framework/vendor/laravel/dusk/src/Concerns/ProvidesBrowser.php:192
/var/www/vhosts/fanswoo.com/fanswoo-framework/vendor/laravel/framework/src/Illuminate/Support/helpers.php:754
/var/www/vhosts/fanswoo.com/fanswoo-framework/vendor/laravel/dusk/src/Concerns/ProvidesBrowser.php: 193
/var/www/vhosts/fanswoo.com/fanswoo-framework/vendor/laravel/dusk/src/Concerns/ProvidesBrowser.php:93
/var/www/vhosts/fanswoo.com/fanswoo-framework/vendor/laravel/dusk/src/Concerns/ProvidesBrowser.php:64
/var/www/vhosts/fanswoo.com/fanswoo-framework/tests/Browser/ExampleTest.php:22
I suspected that the Chrome Driver could not be executed, so I used the following command to detect:
./vendor/laravel/dusk/bin/chromedriver-linux
The return is as follows:
Starting ChromeDriver 2.43.600233 (523efee95e3d68b8719b3a1c83051aa63aa6b10d) on port 9515
Only local connections are allowed.
Indicates that ChromeDriver can be opened normally.
The code can also be detected on the local computer. Only when the dusk command is executed in Plesk Server will the error occur. May I ask what God should I continue to do or what to modify? Thank you!
The server specifications are as follows:
CentOS 7.5
PHP 7.1
DB SQLite3
Laravel Version 5.7
ChromeDriver Version 69
If you able to start chromedriver successfully, now try to access the below url with respective port.
http://localhost:{port}/status
For e.g., in above message, the server started on port 9515. Access the url in browser, http://localhost:9515/status
You should get above message indicating server is accessible with hostname as localhost
If your are not able access, then fix the specific issue

Docker For Mac / Lando: cannot cURL external webservice

I am testing out Lando for a new local dev setup.
Everything has gone well so far but I am running into an error that I don't get on my old Vagrant/VM environment, but do with Lando.
We have part of the site that uses Guzzle to fetch data from a web service. On Lando, I get a cURL error:
cURL error 7: Failed to connect to webservice.internalsite.com port 80: No route to host
How can I resolve this? When I try to ping that url, it says "Destination host unreachable". I am using Docker For Mac if that factors in.

This site can’t be reached:localhost refused to connect

I am trying to open the index of my C:\xampp\htdocs folder, but when I try:
localhost:8000
or
localhost:8000/index
It shows:
This site can’t be reached
localhost refused to connect.
Search Google for localhost 8000 index
How can I open index of htdocs folder on my browser?
Even when I tried :
localhost:8000/wordpress
It showed same error:
This site can’t be reached
localhost refused to connect.
I don't understand what is the problem?
make sure you have xampp turn on, also check if thers any error xampp shows
make sure your are using right port ie. localhost:80000 u can check it with config file

Resources