Skip to content

🐛 Bug Report: Realtime Error Invalid query: Syntax error #117

@AryasDad

Description

@AryasDad

👟 Reproduction steps

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.

Not sure if this issue is related to Self-Host being far behind on updates (currently sitting at 1.9.0 when latest SDKs want 1.9.5). Due to the version mismatch, I downgraded my SDK-Apple version to 16.0.0, but found out Realtime no longer worked.

So I started doing incremental steps back to find out where it broke for me. 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

Initially I thought it had to do with queries that was added at 14.1.0, but I am not using the realtime queries feature. 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:

print("subscription: \(subscription.debugDescription)")
print("realTime: \(realTime)")

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

👍 Expected behavior

I should get Realtime responses as expected as with 14.0.0.

👎 Actual Behavior

Error occurs as shown above and no realtime responses are received.

🎲 Appwrite version

Different version (specify in environment)

💻 Operating system

Linux

🧱 Your Environment

Self-host 1.9.0 on Debian Trixie.

👀 Have you spent some time to check if this issue has been raised before?

  • I checked and didn't find similar issue

🏢 Have you read the Code of Conduct?

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions