Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

ahmeda's avatar

Error while use Soketi in production

I just deployed Soketi on EC2 with all its things (SSL, config Nginx proxy and etc) and I got in my domain the response (OK) which return from Soketi so I assume all things are just fine! the domain (realtime.my_doamin.co)

When I use my real-time server with the Laravel project I got a weird error:

Pusher error: cURL error 35: error:1408F10B:SSL routines:ssl3_get_record:wrong version number (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for https://realtime.my_doamin.co:80/apps/app-id/events?auth_key=app-key&auth_timestamp=1661374246&auth_version=1.0&body_md5=1257f100c5b7d833260a05d9821810cb&auth_signature=f1ab27ad3e6625a1dbbfc1ddd15543dd7860eaeec48ff5eac91df18655afbe8b.

Here is the way I used it with Laravel:

  • in .env file
PUSHER_APP_KEY=app-key
PUSHER_APP_ID=app-id
PUSHER_APP_SECRET=app-secret
PUSHER_HOST=realtime.my_doamin.co
PUSHER_PORT=80
PUSHER_SCHEME=https

VITE_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
VITE_PUSHER_HOST="${PUSHER_HOST}"
VITE_WS_PUSHER_PORT="${PUSHER_PORT}"
VITE_PUSHER_SCHEME="${PUSHER_SCHEME}"
  • in bootstrap.js file
window.Echo = new Echo({
    broadcaster: "pusher",
    key: import.meta.env.VITE_PUSHER_APP_KEY,
    wsHost: import.meta.env.VITE_PUSHER_HOST,
    wsPort: import.meta.env.VITE_WS_PUSHER_PORT ?? 80,
    wssPort: import.meta.env.VITE_WSS_PUSHER_PORT ?? 443,
    forceTLS: (import.meta.env.VITE_PUSHER_SCHEME ?? "https") === "https",
    enabledTransports: ["ws", "wss"],
});

window.Echo.channel("orders").listen("OrderStatusUpdated", (e) => {
    console.log(e);
});
  • In OrderStatusUpdated.php file
class OrderStatusUpdated implements ShouldBroadcast
{
    use Dispatchable, InteractsWithSockets, SerializesModels;

    public function __construct(public $id)
    {
    }

    public function broadcastOn()
    {
        return new Channel('orders');
    }
}
  • in web.php file
class Order
{
    public function __construct(public $id)
    {
    }
}

Route::get('/', function () {
    return view('welcome');
});

Route::get('/test', function () {
    OrderStatusUpdated::dispatch(new Order(1));

    return 'Event has been sent!';
});

I do not see any error in the client side and I checked the Network tab the real-time server is connected successfully

0 likes
2 replies

Please or to participate in this conversation.