reverb: wss connection failure for secure local site

Reverb Version

1.0.0-beta6

Laravel Version

11.3.1

PHP Version

8.3

Description

I have a Laravel 11 project. Servers are managed locally with Herd. I have secured my site. Everything works beautifully except Reverb - which is wonderful, btw!

 WebSocket connection to 'wss://my-site.test/app/xjdam3dnj7kmzzviunel?protocol=7&client=js&version=8.4.0-rc2&flash=false' failed: echo.js:6

in my .env

PUSHER_APP_ID=xxxx
PUSHER_APP_KEY=xxxxx
PUSHER_APP_SECRET=xxxx
PUSHER_HOST=
PUSHER_PORT=443
PUSHER_SCHEME=https
PUSHER_APP_CLUSTER=eu

VITE_APP_NAME="${APP_NAME}"
VITE_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
VITE_PUSHER_HOST="${PUSHER_HOST}"
VITE_PUSHER_PORT="${PUSHER_PORT}"
VITE_PUSHER_SCHEME="${PUSHER_SCHEME}"
VITE_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"

REVERB_APP_ID=179981
REVERB_APP_KEY=xjdam3dnj7kmzzviunel
REVERB_APP_SECRET=hzeak0dakwzq5fdvn5sp
REVERB_HOST="my-site.test"
REVERB_PORT=443
REVERB_SCHEME=https

VITE_REVERB_APP_KEY="${REVERB_APP_KEY}"
VITE_REVERB_HOST="${REVERB_HOST}"
VITE_REVERB_PORT="${REVERB_PORT}"
VITE_REVERB_SCHEME="${REVERB_SCHEME}"

Any pointers and help would be much appreciated.

Paul 😃

Steps To Reproduce

  1. Secure site in Herd
  2. Restart Reverb server
  3. Review browser errors.

image

About this issue

  • Original URL
  • State: closed
  • Created 2 months ago
  • Comments: 17 (3 by maintainers)

Most upvoted comments

OMG. I noticed a differnce between the port setting on your config and mine. I had previously tried with your setup. But this time, after the http://site.test:8080 trick, it worked!!!

I now have another bug to work through. Most likely my bad coding and nothing to do with Reverb.

Thanks guys. Keep up the good work…

P.S. Is it worth putting something in the docs?

Still bizarre that the out-of-the-box install has issues with browser certificate recognition.

I agree, but unfortunately, it’s not that straightforward 🥴

Reverb uses the certificates provided by Valet or Herd. As I understand it, they add a trusted certificate authority to the keychain and use that to sign the ceritificate for the site. So, the certificates should be trusted and they are in Firefox and Safari. For some reason, Chrome doesn’t trust them until the host has been accessed over HTTPS first.

I’ll keep looking into it and see if anything can be done.

@joedixon and @driesvints Super-huge thanks for your fast responses and help. We’re all very appreciative of all that you do. If you would like me to submit a PR with a note in the documentation, let me know.

Indeed. These things can take hours out of your day. I have posted a solution on the Laracasts Forum.