val-bubbleflat / laravel-echo-ios

A wrapper for Laravel Echo in Swift
MIT License
22 stars 17 forks source link

Unable to connect to the socket #2

Closed solancer closed 6 years ago

solancer commented 6 years ago

I've followed the steps as per your documentation but the server doesn't seem to connect at all. The server connects and disconnects immediately.

val-bubbleflat commented 6 years ago

Hi @solancer ! Can I see your code and logs ? What server do you use ? I did all with this one : https://github.com/tlaverdure/laravel-echo-server

solancer commented 6 years ago

XcodeErrorLog.txt - https://gist.github.com/gcsawargi/0cd662d0844f4d0e516d1770066084f7

AppDelegate.swift - https://gist.github.com/gcsawargi/82dffee6eefaa0a42704321b92ac884b

UserApiMiddleware.php - https://gist.github.com/gcsawargi/7bf820ba1d5af47d99e3e689489e5bad

laravel-echo-server.json - https://gist.github.com/gcsawargi/8a8b0ff3d6e55f5ac32efcb29bea7b1b

PrivateMessageEvent.php - https://gist.github.com/gcsawargi/7c1fbc3bb5ef2e5e4b081f8e778f3f15

BroadcastServiceProvider.php - https://gist.github.com/gcsawargi/4b1d737aa997ac9a9b6ff496bd36f9a9

solancer commented 6 years ago

and I'm able to get authenticated through JWT and listen with HTML, JS using Echo JS lib from here https://github.com/laravel/echo

val-bubbleflat commented 6 years ago

@solancer I think you should try to replace localhost in AppDelegate.swift by the IP/full adress of your laravel-echo-server as you are on phone

solancer commented 6 years ago

I did that too but still the same :(

val-bubbleflat commented 6 years ago

Sorry but I can't find the problem... I can't replicate the connection closed by your server. I think it's more a problem from your server because your client is still active at the end.

solancer commented 6 years ago

You were right the problem was with the channel name apparently I had to put in private-private twice make it work.. thanks for your time man :)

val-bubbleflat commented 6 years ago

Perfect :) hope this module will help you :)