Requests in chrome fail with "Err_failed" but only when they are a XHR.
I've been scratching my head with this one for ages. For some reason, XHR requests to valet fail, but loading the page in a new tab works fine.
It's not a cors error, because the options request are marked as failed as well.
Wondering if anyone else is having an issue? Seems to only occur after updating chrome yesterday.
Tried re-installing latest chrome, which did not resolve the issue.
Changed current directory to /Users/user/.composer
Checking composer.json: WARNING
No license specified, it is recommended to do so. For closed-source software you may use "proprietary" as license.
require.beyondcode/expose : exact version constraints (2.0) should be avoided if the package follows semantic versioning
Checking platform settings: OK
Checking git settings: OK
Checking http connectivity to packagist: OK
Checking https connectivity to packagist: OK
Checking github.com oauth access: OK
Checking disk free space: OK
Checking pubkeys:
Tags Public Key Fingerprint: 57815BA2 7E54DC31 7ECC7CC5 573090D0 87719BA6 8F3BB723 4E5D42D0 84A14642
Dev Public Key Fingerprint: 4AC45767 E5EC2265 2F0C1167 CBBB8A2B 0C708369 153E328C AD90147D AFE50952
OK
Checking composer version: You are not running the latest stable version, run `composer self-update` to update (2.1.3 => 2.1.8)
Composer version: 2.1.3
PHP version: 7.4.22
PHP binary path: /usr/local/Cellar/php@7.4/7.4.22/bin/php
OpenSSL version: OpenSSL 1.1.1k 25 Mar 2021
cURL version: 7.78.0 libz 1.2.11 ssl (SecureTransport) OpenSSL/1.1.1k
zip: extension present, unzip present
composer global outdated
Changed current directory to /Users/user/.composer
Legend:
! patch or minor release available - update recommended
~ major release available - update possible
aws/aws-sdk-php 3.193.0 ! 3.196.1 AWS SDK for PHP - Use Amazon Web Services in your PHP project
beyondcode/expose 2.0.0 ! 2.0.2 Create public URLs for local sites through any firewall and VPN.
composer/ca-bundle 1.2.10 ! 1.2.11 Lets you find a path to the system CA bundle, and includes a fallback to the Mozilla CA bundle.
guzzlehttp/psr7 1.8.2 ~ 2.0.0 PSR-7 message implementation that also provides common utility methods
illuminate/collections v8.60.0 ! v8.62.0 The Illuminate Collections package.
illuminate/container v8.60.0 ! v8.62.0 The Illuminate Container package.
illuminate/contracts v8.60.0 ! v8.62.0 The Illuminate Contracts package.
illuminate/filesystem v8.60.0 ! v8.62.0 The Illuminate Filesystem package.
illuminate/macroable v8.60.0 ! v8.62.0 The Illuminate Macroable package.
illuminate/support v8.60.0 ! v8.62.0 The Illuminate Support package.
laravel/vapor-cli dev-fix/default-push 0e72200 The Laravel Vapor CLI
league/flysystem 1.1.5 ~ 2.3.0 Filesystem abstraction: Many filesystems, one API.
league/flysystem-aws-s3-v3 1.0.29 ~ 2.1.0 Flysystem adapter for the AWS S3 SDK v3.x
league/mime-type-detection 1.7.0 ! 1.8.0 Mime-type detection for Flysystem
padraic/phar-updater v1.0.6 = v1.0.6 A thing to make PHAR self-updating easy and secure.
Package padraic/phar-updater is abandoned, you should avoid using it. No replacement was suggested.
psr/container 1.1.1 ~ 2.0.1 Common Container Interface (PHP FIG PSR-11)
ramsey/uuid 4.2.1 ! 4.2.3 A PHP library for generating and working with universally unique identifiers (UUIDs).
symfony/translation v5.3.7 ! v5.3.9 Provides tools to internationalize your application
symfony/var-dumper v5.3.7 ! v5.3.8 Provides mechanisms for walking through any arbitrary PHP variable
vlucas/phpdotenv v5.3.0 ! v5.3.1 Loads environment variables from `.env` to `getenv()`, `$_ENV` and `$_SERVER` automagically.
HOMEBREW_VERSION: 3.2.14
ORIGIN: https://github.com/Homebrew/brew
HEAD: 4e6919b73444e9f9e02ad81d8afc4bbd97533567
Last commit: 4 days ago
Core tap ORIGIN: https://github.com/Homebrew/homebrew-core
Core tap HEAD: 944cb36e2a324ed2cb51d35f9628b64668777cee
Core tap last commit: 2 hours ago
Core tap branch: master
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CASK_OPTS: []
HOMEBREW_EDITOR: nano
HOMEBREW_MAKE_JOBS: 16
Homebrew Ruby: 2.6.3 => /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby
CPU: 16-core 64-bit kabylake
Clang: 13.0.0 build 1300
Git: 2.32.0 => /usr/local/bin/git
Curl: 7.64.1 => /usr/bin/curl
macOS: 11.5.2-x86_64
CLT: 12.5.1.0.1.1623191612
Xcode: 13.0
brew services list
256
Name Status User Plist
blackfire stopped
dnsmasq stopped
httpd stopped
memcached stopped
mysql started user /Users/user/Library/LaunchAgents/homebrew.mxcl.mysql.plist
nginx stopped
php stopped
php@7.2 stopped
php@7.3 stopped
php@7.4 stopped
postgresql stopped
postgresql@12 error user /usr/local/opt/postgresql@12/homebrew.mxcl.postgresql@12.plist
redis started user /Users/user/Library/LaunchAgents/homebrew.mxcl.redis.plist
unbound stopped
brew list --formula --versions | grep -E "(php|nginx|dnsmasq|mariadb|mysql|mailhog|openssl)(@\d\..*)?\s"
curl
cURL support => enabled
cURL Information => 7.78.0
Age => 9
Features
AsynchDNS => Yes
CharConv => No
Debug => No
GSS-Negotiate => No
IDN => Yes
IPv6 => Yes
krb4 => No
Largefile => Yes
libz => Yes
NTLM => Yes
NTLMWB => Yes
SPNEGO => Yes
SSL => Yes
SSPI => No
TLS-SRP => Yes
HTTP2 => Yes
GSSAPI => Yes
KERBEROS5 => Yes
UNIX_SOCKETS => Yes
PSL => No
HTTPS_PROXY => Yes
MULTI_SSL => Yes
BROTLI => Yes
Protocols => dict, file, ftp, ftps, gopher, gophers, http, https, imap, imaps, ldap, ldaps, mqtt, pop3, pop3s, rtmp, rtsp, scp, sftp, smb, smbs, smtp, smtps, telnet, tftp
Host => x86_64-apple-darwin20.4.0
SSL Version => (SecureTransport) OpenSSL/1.1.1k
ZLib Version => 1.2.11
libSSH Version => libssh2/1.9.0
Directive => Local Value => Master Value
curl.cainfo => no value => no value
~/.composer/vendor/laravel/valet/bin/ngrok version
ngrok version 2.3.40
ls -al ~/.ngrok2
total 8
drwx------ 3 user staff 96 22 Mar 2021 .
drwxr-xr-x+ 124 user staff 3968 3 Oct 17:19 ..
-rw------- 1 user staff 61 22 Mar 2021 ngrok.yml
brew info nginx
nginx: stable 1.21.3 (bottled), HEAD
HTTP(S) server and reverse proxy, and IMAP/POP3 proxy server
https://nginx.org/
/usr/local/Cellar/nginx/1.19.3 (22 files, 2.2MB)
Built from source
/usr/local/Cellar/nginx/1.19.4 (25 files, 2.2MB)
Poured from bottle on 2020-11-02 at 14:09:44
/usr/local/Cellar/nginx/1.19.5 (25 files, 2.2MB)
Poured from bottle on 2020-12-01 at 11:25:10
/usr/local/Cellar/nginx/1.19.8 (25 files, 2.2MB)
Poured from bottle on 2021-03-30 at 16:41:02
/usr/local/Cellar/nginx/1.21.1 (25 files, 2.2MB) *
Poured from bottle on 2021-07-19 at 10:57:33
From: https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/nginx.rb
License: BSD-2-Clause
==> Dependencies
Required: openssl@1.1, pcre
==> Options
--HEAD
Install HEAD version
==> Caveats
Docroot is: /usr/local/var/www
The default port has been set in /usr/local/etc/nginx/nginx.conf to 8080 so that
nginx can run without sudo.
nginx will load all files in /usr/local/etc/nginx/servers/.
To start nginx:
brew services start nginx
Or, if you don't want/need a background service you can just run:
/usr/local/opt/nginx/bin/nginx -g 'daemon off;'
==> Analytics
install: 47,001 (30 days), 120,977 (90 days), 518,469 (365 days)
install-on-request: 46,854 (30 days), 120,642 (90 days), 515,889 (365 days)
build-error: 0 (30 days)
brew info php
php: stable 8.0.11 (bottled), HEAD
General-purpose scripting language
https://www.php.net/
/usr/local/Cellar/php/8.0.6_1 (500 files, 77.8MB)
Poured from bottle on 2021-05-14 at 14:55:06
/usr/local/Cellar/php/8.0.8_1 (500 files, 77.9MB)
Poured from bottle on 2021-07-19 at 10:53:15
From: https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/php.rb
License: PHP-3.01
==> Dependencies
Build: httpd, pkg-config
Required: apr, apr-util, argon2, aspell, autoconf, curl, freetds, gd, gettext, glib, gmp, icu4c, krb5, libffi, libpq, libsodium, libzip, oniguruma, openldap, openssl@1.1, pcre2, sqlite, tidy-html5, unixodbc
==> Options
--HEAD
Install HEAD version
==> Caveats
To enable PHP in Apache add the following to httpd.conf and restart Apache:
LoadModule php_module /usr/local/opt/php/lib/httpd/modules/libphp.so
SetHandler application/x-httpd-php
Finally, check DirectoryIndex includes index.php
DirectoryIndex index.php index.html
The php.ini and php-fpm.ini file can be found in:
/usr/local/etc/php/8.0/
To start php:
brew services start php
Or, if you don't want/need a background service you can just run:
/usr/local/opt/php/sbin/php-fpm --nodaemonize
==> Analytics
install: 47,956 (30 days), 150,947 (90 days), 623,181 (365 days)
install-on-request: 47,266 (30 days), 148,540 (90 days), 611,772 (365 days)
build-error: 0 (30 days)
brew info openssl
openssl@3: stable 3.0.0 (bottled) [keg-only]
Cryptography and SSL/TLS Toolkit
https://openssl.org/
Not installed
From: https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/openssl@3.rb
License: Apache-2.0
==> Caveats
A CA file has been bootstrapped using certificates from the system
keychain. To add additional certificates, place .pem files in
/usr/local/etc/openssl@3/certs
and run
/usr/local/opt/openssl@3/bin/c_rehash
openssl@3 is keg-only, which means it was not symlinked into /usr/local,
because macOS provides LibreSSL.
==> Analytics
install: 30,082 (30 days), 30,082 (90 days), 30,088 (365 days)
install-on-request: 24,289 (30 days), 24,289 (90 days), 24,295 (365 days)
build-error: 0 (30 days)
openssl version -a
LibreSSL 2.8.3
built on: date not available
platform: information not available
options: bn(64,64) rc4(16x,int) des(idx,cisc,16,int) blowfish(idx)
compiler: information not available
OPENSSLDIR: "/private/etc/ssl"
nginx: the configuration file /usr/local/etc/nginx/nginx.conf syntax is ok
nginx: configuration file /usr/local/etc/nginx/nginx.conf test is successful
which -a php-fpm
/usr/local/sbin/php-fpm
/usr/sbin/php-fpm
/usr/local/opt/php/sbin/php-fpm -v
PHP 8.0.8 (fpm-fcgi) (built: Jul 12 2021 11:13:48)
Copyright (c) The PHP Group
Zend Engine v4.0.8, Copyright (c) Zend Technologies
with Zend OPcache v8.0.8, Copyright (c), by Zend Technologies
with blackfire v1.56.0~mac-x64-non_zts80, https://blackfire.io, by Blackfire
#
# macOS Notice
#
# This file is not consulted for DNS hostname resolution, address
# resolution, or the DNS query routing mechanism used by most
# processes on this system.
#
# To view the DNS configuration used by this system, use:
# scutil --dns
#
# SEE ALSO
# dns-sd(1), scutil(8)
#
# This file is automatically generated.
#
nameserver 10.13.37.1
sh -c 'echo "------\n/usr/local/etc/nginx/valet/valet.conf\n---\n"; cat /usr/local/etc/nginx/valet/valet.conf | grep -n "# valet loopback"; echo "\n------\n"'
------
/usr/local/etc/nginx/valet/valet.conf
---
3: #listen VALET_LOOPBACK:80; # valet loopback
------
sh -c 'for file in ~/.config/valet/dnsmasq.d/*; do echo "------\n~/.config/valet/dnsmasq.d/$(basename $file)\n---\n"; cat $file; echo "\n------\n"; done'
Clear description of your problem
Requests in chrome fail with "Err_failed" but only when they are a XHR. I've been scratching my head with this one for ages. For some reason, XHR requests to valet fail, but loading the page in a new tab works fine.
It's not a cors error, because the options request are marked as failed as well.
Wondering if anyone else is having an issue? Seems to only occur after updating chrome yesterday. Tried re-installing latest chrome, which did not resolve the issue.
Internal network debug log provides no info.
Expected behavior
Request to succeed
Steps to Reproduce
Possible solution
Firefox works fine š
Diagnosis
sw_vers
valet --version
cat ~/.config/valet/config.json
cat ~/.composer/composer.json
composer global diagnose
composer global outdated
ls -al /etc/sudoers.d/
brew config
brew services list
brew list --formula --versions | grep -E "(php|nginx|dnsmasq|mariadb|mysql|mailhog|openssl)(@\d\..*)?\s"
brew outdated
brew tap
php -v
which -a php
php --ini
nginx -v
curl --version
php --ri curl
~/.composer/vendor/laravel/valet/bin/ngrok version
ls -al ~/.ngrok2
brew info nginx
brew info php
brew info openssl
openssl version -a
openssl ciphers
sudo nginx -t
which -a php-fpm
/usr/local/opt/php/sbin/php-fpm -v
sudo /usr/local/opt/php/sbin/php-fpm -y /usr/local/etc/php/7.4/php-fpm.conf --test
ls -al ~/Library/LaunchAgents | grep homebrew
ls -al /Library/LaunchAgents | grep homebrew
ls -al /Library/LaunchDaemons | grep homebrew
ls -al /Library/LaunchDaemons | grep "com.laravel.valet."
ls -aln /etc/resolv.conf
cat /etc/resolv.conf
ifconfig lo0
sh -c 'echo "------\n/usr/local/etc/nginx/valet/valet.conf\n---\n"; cat /usr/local/etc/nginx/valet/valet.conf | grep -n "# valet loopback"; echo "\n------\n"'
sh -c 'for file in ~/.config/valet/dnsmasq.d/*; do echo "------\n~/.config/valet/dnsmasq.d/$(basename $file)\n---\n"; cat $file; echo "\n------\n"; done'