[Realm.Sync.Client.Network - error]

Hello, I’m new to MongoDB and Atlas App Service.
I just setted up my app and try to read from a collection in my cluster.
And I got this error message when running my app

[Realm.Sync.Client.Network - error] Websocket: Expected HTTP response 101 Switching Protocols, but received:
HTTP/1.1 308 Permanent Redirect
cache-control: no-cache, no-store, must-revalidate
connection: close
content-length: 0
date: Sun, 16 Jun 2024 10:51:31 GMT
location: https://us-east-1.aws.services.cloud.mongodb.com/api/client/v2.0/app/{my-app-id}/realm-sync
server: mdbws
strict-transport-security: max-age=31536000; includeSubdomains;
vary: Origin
x-appservices-request-id: my anon user id
x-frame-options: DENY
x-xgen-up-proto: HTTP/1.1

This is really confuseing and seems no one else have got the same issue.
I read the app service log and I fund this
image

My app sent requests repeatedly and all of them are denied, like this log said UNBIND event.

2 Likes

I have the same error. Anyone that knows how to fix this?

Hi, I am also facing the same issue. Just tried to configure synced database one day ago and this is the error I am getting. Quite similar

ERROR [Realm.Sync.Client.Network - error] Websocket: Expected HTTP response 101 Switching Protocols, but received:
HTTP/1.1 308 Permanent Redirect
cache-control: no-cache, no-store, must-revalidate
connection: close
content-length: 0
date: Wed, 19 Jun 2024 13:51:34 GMT
location: https://us-east-1.aws.services.cloud.mongodb.com/api/client/v2.0/app/app_id/realm-sync
server: mdbws
strict-transport-security: max-age=31536000; includeSubdomains;
vary: Origin
x-appservices-request-id: 6672e262644c878003992c439
x-frame-options: DENY
x-xgen-up-proto: HTTP/1.1