RealmSwift connection Atlas closes after app is rebuild and re-launched

After update to realm-swift 10.49.2 the app starts, syncs and works fine. But after a re-start, the app disconnects and stops syncing. No logs on the Atlas backend, but in the xcode console

**Info: Connection[1]: Connecting to 'wss://ws.services.cloud.mongodb.com:443/api/client/v2.0/app/devicesync-ofdpn/realm-sync'**

**Info: Connected to endpoint '35.168.174.121:443' (from '192.168.224.110:63376')**

**Info: Connection[1]: Closing the websocket with error code=WebSocket: Internal Server Error, message='error', was_clean=true**

**Info: Connection[1]: Connecting to 'wss://ws.services.cloud.mongodb.com:443/api/client/v2.0/app/devicesync-ofdpn/realm-sync'**

**Info: Connected to endpoint '3.211.22.90:443' (from '192.168.224.110:63397')**

**Info: Connection[1]: Closing the websocket with error code=WebSocket: Internal Server Error, message='error', was_clean=true**

**Info: Connection[1]: Connecting to 'wss://ws.services.cloud.mongodb.com:443/api/client/v2.0/app/devicesync-ofdpn/realm-sync'**

**Info: Connected to endpoint '107.20.72.25:443' (from '192.168.224.110:63464')**

**Info: Connection[1]: Closing the websocket with error code=WebSocket: Internal Server Error, message='error', was_clean=true**

**Info: Connection[1]: Connecting to 'wss://ws.services.cloud.mongodb.com:443/api/client/v2.0/app/devicesync-ofdpn/realm-sync'**

**Info: Connected to endpoint '3.211.22.90:443' (from '192.168.224.110:63524')**

**Info: Connection[1]: Closing the websocket with error code=WebSocket: Internal Server Error, message='error', was_clean=true**

Only deleting the app and re-starting with a new login fixes the issues. But only after the app is re-startet again.

Realm variable are held in strong reference via class RealmManager: ObservableObject { …}

Any advice, help how to fix? Thx

This is something reported here: 10.49.1 failing to connect to Atlas Device Sync · Issue #8531 · realm/realm-swift · GitHub. The workaround proposed there is to temporarily set the app base url to the location-specific url (e.g. https://us-east-1.aws.realm.mongodb.com).

We’re working on this and hope to deploy a hotfix shortly.