Error in progressEstimate
Bilonik opened this issue · 7 comments
What happened?
When attempting to create a loading bar for the login process, the progressEstimate provided by the onProgressCallback of the Realm.open method fluctuates erratically. Instead of providing a smooth progression, the value jumps between 1.0 and lower values (e.g., 0.2, 0.21) repeatedly.
Repro steps
Implement the following code:
dart
final realm = await Realm.open(flexConfig, onProgressCallback: (syncProgress) {
final processValue = syncProgress.progressEstimate;
// syncProgress.progressEstimate keeps going to 1.0 then .2 then 1.0 then .21 and so on.
});
Observe the values of syncProgress.progressEstimate during the login process.
Expected Behavior:
progressEstimate should provide a smooth, incrementing progression from 0.0 to 1.0, allowing for the creation of an accurate loading bar.
Actual Behavior:
progressEstimate fluctuates between 1.0 and lower values (e.g., 0.2, 0.21), making it impossible to create a consistent loading bar.
Version
3.3.0
What Atlas Services are you using?
Atlas Device Sync
What type of application is this?
Flutter Application
Client OS and version
3.3.0
Code snippets
No response
Stacktrace of the exception/crash you're getting
No response
Relevant log output
No response
➤ PM Bot commented:
Jira ticket: RDART-1072
Can you provide us with trace level logs from a fresh run of the app?
@nirinchev can you give me an email to send you the logs (i cant post them here).
It happens:
- open a sync realm in a device.
- Close the app
- Make transactions on another device.
- Open again the first device and listen to progressEstimate to create the loading bar.
You can send them to nikola.irinchev@mongodb.com.
@nirinchev sent
Thanks
Looking at the logs, I don't see anything from sync - can you share the code you're using to setup the logger?
Realm.logger.setLogLevel(LogLevel.trace);
Realm.logger.onRecord.listen((event) {
print("Realm log message: '$event'");
});