Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Can't get this to work on homestead #47

Closed
rijensky opened this issue Sep 30, 2016 · 1 comment
Closed

Can't get this to work on homestead #47

rijensky opened this issue Sep 30, 2016 · 1 comment

Comments

@rijensky
Copy link

rijensky commented Sep 30, 2016

Hi everyone!
I'm trying to run this on homestead and keep getting the same error (server boots, seems ok, then when I load a page that tries to connect to it I get this:

L A R A V E L E C H O S E R V E R

Starting server...

✔ Running at nevermind.dev on port 6001
✔ Channels are ready.
✔ Listening for redis events...
✔ Listening for http events...

Server ready!

undefined:1

SyntaxError: Unexpected end of input
at Object.parse (native)
at Request._callback (/usr/lib/node_modules/laravel-echo-server/dist/channels/private-channel.js:28:28)
at Request.self.callback (/usr/lib/node_modules/laravel-echo-server/node_modules/request/request.js:187:22)
at emitTwo (events.js:100:13)
at Request.emit (events.js:185:7)
at Request. (/usr/lib/node_modules/laravel-echo-server/node_modules/request/request.js:1048:10)
at emitOne (events.js:90:13)
at Request.emit (events.js:182:7)
at IncomingMessage. (/usr/lib/node_modules/laravel-echo-server/node_modules/request/request.js:969:12)
at emitNone (events.js:85:20)
at IncomingMessage.emit (events.js:179:7)
at endReadableNT (_stream_readable.js:913:12)
at _combinedTickCallback (internal/process/next_tick.js:74:11)
at process._tickCallback (internal/process/next_tick.js:98:9)

I got into the code as much as I could.
This line:
/usr/lib/node_modules/laravel-echo-server/dist/channels/private-channel.js:29:28
is just:
resolve(JSON.parse(body));
body is an empty string.

Here's my laravel-echo-server.json:

{
    "appKey": "haa9i61b1rrcrmql5p55715lf4erjkp6fu3s56h1pbcgr761tcj3p9h1e51u",
    "authEndpoint": "/broadcasting/auth",
    "authHost": "http://nevermind.dev",
    "database": "redis",
    "databaseConfig": {
        "redis": {},
        "sqlite": {
            "databasePath": "/database/laravel-echo-server.sqlite"
        }
    },
    "devMode": true,
    "host": "nevermind.dev",
    "port": "6001",
    "protocol": "http",
    "referrers": [],
    "sslCertPath": "",
    "sslKeyPath": "",
    "verifyAuthPath": true,
    "verifyAuthServer": false
}

on the console I get these responses from the server:

1st request:

url: http://nevermind.dev:6001/socket.io/

query string:
EIO:3
transport:polling
t:LTxGwYh
sid:kZSoIO2cXRg2AC8dAAAC

response:
�ÿ6

2nd request:

url: http://viewsity.dev:6001/socket.io/

query string:
EIO:3
transport:polling
t:LTxGwYg
sid:kZSoIO2cXRg2AC8dAAAC

payload:
131:42["subscribe",{"channel":"private-conversation.4","auth":{"headers":{"X-CSRF-TOKEN":"Hcrbjah7JkYVWclvgrs7vKmhKI6OOSc1l40Tdgrb"}}}]

response:
ok

3rd request:

url: http://nevermind.dev:6001/socket.io/

query string:
EIO:3
transport:polling
t:LTxGwX5
sid:kZSoIO2cXRg2AC8dAAAC

response:
�ÿ40

4th (last) request

url: http://viewsity.dev:6001/socket.io/
query string:
EIO:3
transport:polling
t:LTxGwV_

response:
�ÿ0{"sid":"kZSoIO2cXRg2AC8dAAAC","upgrades":["websocket"],"pingInterval":25000,"pingTimeout":60000}

Does anyone know how to solve this?
Can anyone who managed to make this work on homestead reply with their laravel-echo-server.json?
Thanks!

@ctf0
Copy link

ctf0 commented Oct 3, 2016

have u restarted the queue ? am also using homestead and doing that solved the issue

@rijensky rijensky closed this as completed Oct 4, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants