Laravel-websockets: Channels current state is unavailable

Created on 26 Sep 2019  路  9Comments  路  Source: beyondcode/laravel-websockets

Hello,

I have installed everything but when I click "connect" I am receiving the message:
"Channels current state is unavailable"

I am running Laravel 5.7.28

I have also ran the artisan server command. I am getting this error both on my windows machine and my centos OS installation.

Any idea why could cause this please with Laravel 5.7.28

Thank you.

Most helpful comment

No I went back to using pusher.
I cannot believe there isn't anymore help from Laravel to help us setting up web sockets on the app.
I spent days and days on this, no chance.

All 9 comments

Ok, this seems to happen only under https. And I think the reason is because I need to add the SSL path.

Hi @FreddyCrugger, did you solve the puzzle? Can you connect through https to your laravel app after set the path? How you did set this path? My websockets.config already have the path: 'local_cert' => env('LARAVEL_WEBSOCKETS_SSL_LOCAL_CERT', '/etc/letsencrypt/live/[MYSITE]/fullcert.crt'),

My websocket only work with http :(

No I went back to using pusher.
I cannot believe there isn't anymore help from Laravel to help us setting up web sockets on the app.
I spent days and days on this, no chance.

After days and days finally I got it working, I needed to change my ssl provider and check the passed all ssl checks. Ther are many sites that test if your ssl is really ok, mine was fail on the chaing test so may be was it. But the error do not help to find the solution. Thanks you @FreddyCrugger :)

If it helps, I was getting "Channels current state is unavailable" but then realized I was accessing http://domain.com/laravel-websockets (no https://). As soon as I changed it to https, it worked.

Btw, I ran ssl checks through another site as @albertord84 recommended and there were some minor issues but I didn't do anything to correct them.

I'm using a legit wildcard SSL cert purchased from RapidSSL and I modified my /etc/hosts file so that I can run my laravel app locally (dev.client-domain.biz). In config/websockets.php, my ssl.localcert file contains both the cert and the cert auth. I have ssl.local_pk set to the private key file.

It's been a chore getting everything working over the past week but I can confirm it's all working well.

I use Laragon locally. It provides SSL support for testing. I want to take advantage of this. But I don't know how to define "local_cert" and "local_pk" paths in websockets.php.
Laragon SSL config paths:
C:/laragon/etc/ssl/laragon.crt
C:/laragon/etc/ssl/laragon.key

Can you help me? @FreddyCrugger @albertord84 @cesaric @canhkieu @eldor

@ghost I'm also using laragon. Did you manage to fix this mistake?

Edit: The problem seems to be the certificates. And setting the verify_peerto false

@MrEduar have you found a way using SSL with laragon

We have the same problem using Laravel Valet (for Linux). It works like a charm with Chromium, no way to get it working with Firefox. We spent hours and hours on this. Good luck. :)

Was this page helpful?
0 / 5 - 0 ratings