Watch keynotes and sessions from, our virtual developer conference.

Problem while opening a fullSync Realm


I am developing my app using full sync realms, but while trying to open a realm, i got the following error on the client side:

Error Domain=io.realm.unknown Code=11 “Bad WebSocket response 401 unauthorized” UserInfo={Category=realm::util::websocket::Error, NSLocalizedDescription=Bad WebSocket response 401 unauthorized, Error Code=11}

and on the server-side:

HTTP upgrade failed (service did not respond properly) {“type”:“",“title”:"Invalid credentials - failed to parse token data”,“status”:401,“code”:611} Request: c1e84a30-ce80-4cd9-8726-a91cd0249ff0 GET /realm-sync/%2Fruntimeallusers%2F__partial%2F54f81d30dbd51a1865e329d6440c623f%2F76bbbfaf69057d9d348a6f4ca0cc2d831de8204b HTTP/1.1 Host: SOME_Private_URL Upgrade: websocket Connection: upgrade X-Request-ID: 7286b2a235a0f64a8ccab16a4805cead X-Real-IP: some private ip X-Forwarded-For: some private ip X-Forwarded-Host: some private host X-Forwarded-Port: 80 X-Forwarded-Proto: http X-Original-URI: /realm-sync/%2Fruntimeallusers%2F__partial%2F54f81d30dbd51a1865e329d6440c623f%2F76bbbfaf69057d9d348a6f4ca0cc2d831de8204b X-Scheme: http Authorization: Realm-Access-Token version=1 token=" private token" Sec-WebSocket-Key: lfseedaM8icvINSkop5i3g== Sec-WebSocket-Protocol: io.realm.sync.26-30 Sec-WebSocket-Version: 13 User-Agent: RealmSync/4.9.4 (macOS Darwin 19.4.0 Darwin Kernel Version 19.4.0: Wed Mar 4 22:28:40 PST 2020; root:xnu-6153.101.6~15/RELEASE_X86_64 x86_64) RealmObjectiveC/4.3.1 bundle id Response: HTTP/1.1 401 Unauthorized
Server: Realm-Object-Server/3.28.4

@Octavian_Milea You are trying to open a partial realm, which is a realm for query-based sync, with a full-sync API call - the two methods of sync are incompatible with one another.

You can see this in your logs, the GET request has a __partial URI component

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.