Skip to content
Back

Realtime Error Invalid query: Syntax error

  • 0
  • Self Hosted
  • Databases
  • Apple
  • Realtime
AryasDad
1 Jun, 2026, 14:28

I was test driving Self-Hosted Appwrite for my use with Swift IOS apps as a backend while back and after successful trials, I started to move to incorporate into my actual apps. I setup Realtime for TablesDB updates and everything was working great in my test app. When I finally moved to incorporating, Realtime stopped working.

I am y=using Self-Host version 1.9.0. Due to the version mismatch, I downgraded my SDK-Apple version to 16.0.0, but found out Realtime no longer worked.

After incremental steps back, I was able to determine that the break happens between 14.0.0 and 14.1.0.

I am subscribing to realtime as follows to trigger my function for any table update per the Realtime Channels Documentation:

subscription = try? await realTime.subscribe( channels: [ Channel.rows() ]) { response in Task { try? await self.processRealtimeResponse(response) } }

This works in 14.0.0, but in 14.1.0+ I get the following errors in the appwrite-realtime log:

[Error] Type: Appwrite\Extend\Exception [Error] Message: Invalid query: Syntax error [Error] File: /usr/src/code/app/realtime.php [Error] Line: 716

When looking at server realtime.php cited above, it appears the line is separate from the Realtime queries feature and just a generic error for malformed realtime queries on the server.

I even tried capturing the subscribe code above in a do->catch instead of try? and no error is thrown on my iOS side. In fact if I do a test output after the above, iOS appears to report it as assigned:

TypeScript
print("realTime: \(realTime)") ```

> subscription: Optional(Appwrite.RealtimeSubscription)
> realTime: Appwrite.Realtime

Can I get some help me get the Realtime subscription working again, as I appear to be using the correct syntax per documentation that I find?
TL;DR
The developer was using Appwrite for a Swift iOS app and encountered an issue with Realtime breaks between versions 14.0.0 and 14.1.0. They are receiving an "Invalid query: Syntax error" message. The problem seems to be related to a generic error for malformed realtime queries on the server, and although the error is not thrown on the iOS side, Realtime subscription doesn't work as expected. They have tried capturing the subscription code in a do->catch block without success. **Solution:** The issue is likely with the Appwrite PHP SDK. The server is not receiving the correct query syntax from
Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more