-
Notifications
You must be signed in to change notification settings - Fork 366
Connection Error #179
Comments
Please catch the exception and dump the content of |
getErrorMessage() function returns NULL. When I dump the content of '$e(error)', I get the line below: object(ElephantIO\Exception\ServerConnectionFailureException)#39 (8) { ["errorMessage":"ElephantIO\Exception\ServerConnectionFailureException":private]=> NULL ["message":protected]=> string(70) "An error occurred while trying to establish a connection to the server" ["string":"Exception":private]=> string(0) "" ["code":protected]=> int(0) ["file":protected]=> string(92) "/var/www/html/shared/socket-io/vendor/wisembly/elephant.io/src/Engine/SocketIO/Version1X.php" ["line":protected]=> int(187) ["trace":"Exception":private]=> array(3) { [0]=> array(6) { ["file"]=> string(92) "/var/www/html/shared/socket-io/vendor/wisembly/elephant.io/src/Engine/SocketIO/Version1X.php" ["line"]=> int(48) ["function"]=> string(9) "handshake" ["class"]=> string(36) "ElephantIO\Engine\SocketIO\Version1X" ["type"]=> string(2) "->" ["args"]=> array(0) { } } [1]=> array(6) { ["file"]=> string(73) "/var/www/html/shared/socket-io/vendor/wisembly/elephant.io/src/Client.php" ["line"]=> int(60) ["function"]=> string(7) "connect" ["class"]=> string(36) "ElephantIO\Engine\SocketIO\Version1X" ["type"]=> string(2) "->" ["args"]=> array(0) { } } [2]=> array(6) { ["file"]=> string(32) "/var/www/html/dashboard/news.php" ["line"]=> int(98) ["function"]=> string(10) "initialize" ["class"]=> string(17) "ElephantIO\Client" ["type"]=> string(2) "->" ["args"]=> array(0) { } } } ["previous":"Exception":private]=> NULL } I am using Version2X but why am I getting error about Version1X? |
I have the same error... |
Do you also have the result of |
Yes, I have |
Which version are you using ? dev-master or 3.1 ? |
Sorry, meant 3.3 |
"wisembly/elephant.io": "^3.3", |
Could you then try with |
And if that doesn't work, could you remove the |
dev-master is not working |
OK now that is strange. It seems that the resource is already busy with something else (probably Could you maybe try a BTW, not really sure but your uri looks strange (it shouldn't be escaped : |
yes, the error message does that |
I try the same code on the server (DO) and it's working. |
Got no clue then on why this happens, especially as I don't have a mac. Sorry :/ |
Thanks anyway and good luck! |
I change the socket IO server dependencies and it's worked successfully. It can look at the PR #186 to know more details. |
Wow, I have found my mistake! The trouble in ini_set("default_socket_timeout", -1); This line was in another package which uses the elephant.io package. Thank you guys! |
I think we don't let the |
I have the same error. Even more, this error occurred accidentally, I didn't change anything. Everything works fine in localhost, in NodeJS, in browser ... But the real server doesn't accept any connections from PHP Client. It's so weird, I have no clue. |
Hii there, I am facing the same issue in ubuntu with php8. Everything is working fine in nodejs and browser. But not working when emit the event from laravel php. |
When I try to node server, I get the error below:
It is strange that when I use Version 2X still I get the same error. Actually it connects the server but throw the error and stop working.
The text was updated successfully, but these errors were encountered: