swooletw / laravel-swoole

High performance HTTP server based on Swoole. Speed up your Laravel or Lumen applications.
MIT License
4.04k stars 390 forks source link

Socket.io server version is deprecated #486

Closed MrApr closed 2 years ago

MrApr commented 3 years ago

Make sure you read Issues Guideline and answer these questions before submitting your issue. Thanks! (Any non-English issues will be closed immediately.)

  1. Please provide your PHP and Swoole version. (php -v and php --ri swoole) Swoole => enabled Author => Swoole Team team@swoole.com Version => 4.6.6 Built => Apr 28 2021 16:09:46 coroutine => enabled with boost asm context epoll => enabled eventfd => enabled signalfd => enabled cpu_affinity => enabled spinlock => enabled rwlock => enabled sockets => enabled openssl => OpenSSL 1.1.1j 16 Feb 2021 dtls => enabled http2 => enabled pcre => enabled zlib => 1.2.11 mutex_timedlock => enabled pthread_barrier => enabled futex => enabled async_redis => enabled

  2. Please provide your Laravel/Lumen version. "name": "laravel/lumen-framework", "version": "v8.2.3",

  3. Which release version of this package are you using? swooletw/laravel-swoole 2.8.1

  4. What did you do? If possible, provide a recipe for reproducing the error. I was implementing websocket with lumen + swoole and this package's socket.io support. I'm using socket.io cleint version 4 but It cannot connect to swoole server. I've logged client error message on socket connection and that was socket.io server version is two.

There's a version 4 release these days. Please update socket.io server to version 4

RicardoGuiliani commented 3 years ago

Same here, I'm able to connect to the server, but I can't exchange messages, server doesn't receive events emitted from client and client doesn't receive events emitted from server, so what I did was uninstall socket.io-client 4 and install v2.1.1 and it worked properly, so the problem is the current socket.io version used on laravel-swoole websocket is different and incompatible from latest one, the version 4.0.2

MrApr commented 3 years ago

I fixed my problem same as you did. thanks for reply

HadiAghandeh commented 2 years ago

I had the same issue, I installed version 2.1.1 to fix my problem.