Click here to Skip to main content
15,881,757 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello laravel websocket is working on local but when I deployed on ubuntu server it showing the following error.

http://sockjs.pusher.com/pusher/app/MY_KEY/288/iqbkjca8/xhr_streaming?protocol=7&client=js&version=7.0.6&t=1644557389290&n=3

I checkout a lot of post about this laravel vue websockets issue but that doesn't worked for me...
pusher-js version: "pusher-js": "^7.0.3",
laravel echo version: "laravel-echo": "^1.10.0",

someone mentioned that change pusher version to 5.1.1
I do that but that also doesn't worked for me...


here is broadcasting.php

    <pre lang="PHP">'pusher' => [
            'driver' => 'pusher',
            'key' => env('PUSHER_APP_KEY'),
            'secret' => env('PUSHER_APP_SECRET'),
            'app_id' => env('PUSHER_APP_ID'),
            'options' => [
                'cluster' => env('PUSHER_APP_CLUSTER'),
                'encrypted' => true,
                'host' => '127.0.0.1',
                'port' => 6001,
                'scheme' => 'http'
            ],
        ],


here is on vue side

JavaScript
    import Echo from 'laravel-echo';
window.Pusher = require('pusher-js');
window.Echo = new Echo({
    broadcaster: 'pusher',
    key: 'thisIsA1xicP0rTaLD3v310p3DByHBilalKhanY0safZai',
    wsHost: window.location.hostname,
    wsPort: 6001,
    forceTLS: false,
    disableStats: true,
});


What I have tried:

someone mentioned that change pusher version to 5.1.1
I do that but that also doesn't worked for me...
Posted
Updated 10-Feb-22 19:35pm
Comments
Richard MacCutchan 11-Feb-22 5:40am    
What is the error? Please use the Improve question link above, and add complete details of what is not working.
HBilal Khan 15-Feb-22 0:11am    
this error is coming in the network tab, and the console tab cors error showing again and again

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900