-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
3 - M (<= 1 month)
-
5350
How frequently does the bug occur?
All the time
Description
Creating objects which isn't subscribed to, will experience the Promise returned from a call to realm.subscriptions.update will never resolve and the state won't ever be Completed.
Stacktrace & log output
Client logs
This is the output from the logs:
LOG [SYNC:3]: Resolving 'ws.us-west-2.aws.realm.mongodb.com:443' LOG [SYNC:3]: Connecting to endpoint '54.202.198.109:443' (1/1) LOG [SYNC:4]: Connected to endpoint '54.202.198.109:443' (from '192.168.1.229:51221') LOG [SYNC:3]: Connection[1]: Negotiated protocol version: 3 LOG [SYNC:4]: Connection[1]: Session[1]: Received: ERROR "Other session level error: error occurred while integrating uploaded changesets - request logs URL: https://realm.mongodb.com/groups/622659ec2df552008e84dee8/apps/62265e7c301d42db0288099a/logs?co_id=622f1b7789c9dd3ae981d9c2" (error_code=201, try_again=true) LOG [SYNC:4]: Connection[1]: Disconnected
Server logs
Can you reproduce the bug?
Yes, always
Reproduction Steps
const Realm = require('realm'); async function run() { const app = Realm.App.getApp('realmeats-nllpl'); const credentials = Realm.Credentials.emailPassword( '...', 'very-secure-password', ); const user = await app.logIn(credentials); const config = {sync: {user, flexible: true}}; console.log('Deleteing any previous file'); Realm.deleteFile(config); console.log('Opening Realm'); const realm = await Realm.open(config); console.log('Subscribing to restaurants'); const restaurants = realm.objects('Restaurant'); await realm.subscriptions.update(mutableSubs => { mutableSubs.add(restaurants); }); console.log('Creating an order'); const [firstRestaurant] = restaurants; realm.write(() => { realm.create('Order', { _id: new Realm.BSON.UUID(), ETA: new Date(), PlacedAt: new Date(), Guests: {}, RestaurantId: firstRestaurant?._id, Restaurant: firstRestaurant, OwnerId: user.id, Status: 0, }); }); setInterval(() => { console.log({ status: realm.subscriptions.state, error: realm.subscriptions.error, }); }, 2000); console.log('Re-subscribing ...'); await realm.subscriptions.update(mutableSubs => { mutableSubs.removeAll(); mutableSubs.add(restaurants); }); } run().catch(console.error);
Version
10.13.0
What SDK flavour are you using?
MongoDB Realm (i.e. Sync, auth, functions)
Are you using encryption?
No, not using encryption
Platform OS and version(s)
React Native iOS
Build environment
Which debugger for React Native: N/A
Cocoapods version
No response
- is related to
-
RCORE-1001 Async operations should terminate with an error if a fatal session error occurs
- Closed