{"id":7654,"date":"2019-08-10T17:00:12","date_gmt":"2019-08-10T17:00:12","guid":{"rendered":"https:\/\/alexrusin.com\/?p=7654"},"modified":"2019-08-10T17:00:37","modified_gmt":"2019-08-10T17:00:37","slug":"websocket-is-closed-before-the-connection-is-established","status":"publish","type":"post","link":"https:\/\/blog.alexrusin.com\/websocket-is-closed-before-the-connection-is-established\/","title":{"rendered":"WebSocket is closed before the connection is established"},"content":{"rendered":"\n
I have been using great package by Beyondcode laravel-websockets<\/a>. Recently I tried to connect to the websocket server in a new application and got the following error “failed: WebSocket is closed before the connection is established”. Strangely enough this error was manifested in Chrome and not in Firefox. After digging a little bit I found that the error can be fixed by adding a line to Laravel Echo configuration: enabledTransports: [‘ws’, ‘wss’]<\/em> as suggested here https:\/\/github.com\/beyondcode\/laravel-websockets\/issues\/83<\/a> <\/p>\n","protected":false},"excerpt":{"rendered":" I have been using great package by Beyondcode laravel-websockets. Recently I tried to connect to the websocket server in a new application and got the following error “failed: WebSocket is closed before the connection is established”. Strangely enough this error was manifested in Chrome and not in Firefox. After digging a little bit I found…<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"footnotes":""},"categories":[12],"tags":[],"class_list":["post-7654","post","type-post","status-publish","format-standard","hentry","category-laravel"],"yoast_head":"\n