[Self-hosted] Realtime crashes with "Missing channels" + fatal Swoole\Server::exist() TypeError when
- 0
- Self Hosted
- Web
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.
the SDK follow the Cloud appwrite versions which is 1.9.2, tho the self hosted latest is 1.9.0, iirc 1.9.0 correspond to the SDK appwrite@23
Yep just found that out from a other post about the self hosted release not being up to date yet
I wonder why the self hosted isn't up to date
they release on Cloud, check if it's working correctly, if the version works correctly after X time, they release it into a stable self-hosted release
it's too avoid possible bugs in self hosted, tho true, a better open source setup would be for appwrite to use directly the github repo for their cloud, but i don't think they will do that
(most self hosted / open source projects, have the public CE that they use as a submodule for their private cloud version, or the other way around, public CE with a private EE submodule in the public repo)
But that would cause issues like this where they are not synced in versions?
Like what i'm facing
yes,
tho i'm kinda hoping they would add tagged versions to says tag app-1.9.0 (or maybe even latest-sh) points to appwrite@23 and not latest so it's way easier for us to see the compatibility
Recommended threads
- Framework categorization for Sites
Hello, I want to deploy my web app via Appwrite SItes. My web app is vite+reactjs. In the Appwrite docs, it creates a vite+react app, and chooses React from the...
- Not allowed permission to upsert a prese...
```js const presenceID = ID.unique(); setPID(presenceID); const presence = await presences.upsert({ presenceId: presenceID, status: "online"...
- Finding job
Hi. I am a full-stack developer with experience in developing scalable and user-friendly web applications. I handle both front-end and back-end development, im...