Rank 2: Process
I'm unable to use the realtime connection on the latest appwrite client (npm)
When connecting to realtime it's getting stuck in a loop
browser prints: Realtime disconnected. Re-connecting in 1 seconds.
Server prints:
Connection open (user: 707)
[Error] Type: Appwrite\Extend\Exception
[Error] Message: Missing channels
[Error] File: /usr/src/code/app/realtime.php
[Error] Line: 705
Connection close: 707
Fatal error: Uncaught TypeError: Swoole\Server::exist(): Argument #1 ($fd) must be of type int, array given
in /usr/src/code/vendor/utopia-php/websocket/src/WebSocket/Adapter/Swoole.php:54
import { Account, Channel, Client, Realtime, TablesDB } from "appwrite";
const client = new Client() .setEndpoint(APPWRITE_ENDPOINT) .setProject(APPWRITE_PROJECT_ID); const realtime = new Realtime(client); realtime.onOpen(() => { console.log("Realtime connection opened"); // fires, then immediately drops });
realtime.subscribe( Channel.tablesdb(DATABASE_ID).table(COLLECTION_ID), (event) => { console.log("Realtime event:", event); }, ); ```
When downgrading the SDK to appwrite@24.2.0 it's able to connect to realtime without any issues.