Skip to content
Advertisement

Laravel websocket cant connect to pusher ERR_CERT_AUTHORITY_INVALID

I have a laravel application with websockets. I already setup all the needs for the websocket and pusher config. But whenever I test my broadcast channel I got

app.js:58283 WebSocket connection to 'wss://127.0.0.1/app/644a4ac1988060882370?protocol=7&client=js&version=6.0.2&flash=false' failed: Error in connection establishment: net::ERR_CERT_AUTHORITY_INVALID

When i do some reload. sometimes i get app.js:55791 WebSocket connection to 'wss://127.0.0.1/app/644a4ac1988060882370?protocol=7&client=js&version=6.0.2&flash=false' failed: WebSocket is closed before the connection is established.

Here are my configs.

broadcasting.php

JavaScript

websockets.php

JavaScript

bootstrap.js

JavaScript

web.php

JavaScript

InventoryEvent

JavaScript

package.json

JavaScript

I already setup the env for my pusher credentials. Do i need to config something in my pusher in order for this to work? I got another project with the same setup but it works but this one is not.

Advertisement

Answer

Try downgrading your pusher-js package to version 4.3.1. Thats what I am using and it works well. Latest version always seems to listen on secure wss instead of the non-secure ws.

User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement