SyntaxError: Unexpected token c in JSON at position 0
at JSON.parse ()
at HttpSubscriber.handleData (C:\Users\USER\AppData\Roaming\npm\node_modules\laravel-echo-server\dist\subscribers\http-subscriber.js:42:21)
at IncomingMessage. (C:\Users\USER\AppData\Roaming\npm\node_modules\laravel-echo-server\dist\subscribers\http-subscriber.js:21:59)
at IncomingMessage.emit (events.js:203:15)
at endReadableNT (_stream_readable.js:1145:12)
at process._tickCallback (internal/process/next_tick.js:63:19)
**Expected behavior**
Subscribe to the channel.
**Additional context**
I am building a desktop application using python. In doing so, I need to subscribe to laravel-echo-server channel via python whenever Laravel broadcast new event. I googled and found most of the websocket tutorial are about creating server and client and interaction between them.
Can I achieve this using laravel-echo-server or I have to built my own.
Describe the bug While sending http request laravel-echo-server stops and showing error in the terminal.
To Reproduce Steps to reproduce the behavior:
http://sena.test:6001/apps/APP_ID/events?auth_key=f06f050a7cfa738fd434f586b869c302
5.showing error as follows:
SyntaxError: Unexpected token c in JSON at position 0 at JSON.parse ()
at HttpSubscriber.handleData (C:\Users\USER\AppData\Roaming\npm\node_modules\laravel-echo-server\dist\subscribers\http-subscriber.js:42:21)
at IncomingMessage. (C:\Users\USER\AppData\Roaming\npm\node_modules\laravel-echo-server\dist\subscribers\http-subscriber.js:21:59)
at IncomingMessage.emit (events.js:203:15)
at endReadableNT (_stream_readable.js:1145:12)
at process._tickCallback (internal/process/next_tick.js:63:19)