realm-tasks icon indicating copy to clipboard operation
realm-tasks copied to clipboard

[Xamarin] Failing to reliably load all lists from server

Open AndyDentFree opened this issue 9 years ago • 5 comments

When a new install of the app is run, rather than getting content from the server, it immediately creates an empty list called My Tasks and fails to show any lists already on the server.

AndyDentFree avatar Dec 11 '16 08:12 AndyDentFree

Possibly related but maybe separate issue - when re-launching the app it still showed only one list but this time it was the first list from the server, not the one created earlier on that device.

AndyDentFree avatar Dec 11 '16 08:12 AndyDentFree

I had a quick thought and wondered if this was just due to me testing on a device compared to it only having been tested on simulator previously, but confirmed the same behaviour occurs on a simulated iPhone too.

AndyDentFree avatar Dec 11 '16 08:12 AndyDentFree

From a first look, in ListsViewModel.cs immediately after the GetInstance there's a Find which tries to get the top TaskListList and if not there, creates a new one.

This doesn't give time to get content from sync.

AndyDentFree avatar Dec 11 '16 09:12 AndyDentFree

You are correct that this is the cause, but the real issue is a problem with our SDK or core. The whole premise of sync is that you can be offline and data will be merged correctly when you connect next time, so creating the object before syncing content should not be an issue. I created https://github.com/realm/realm-dotnet/issues/1002 to track that since it's a bug with the binding/core, not with the application itself.

nirinchev avatar Dec 11 '16 09:12 nirinchev

I re-opened the issue because this is a bug with the application, until the underlying cause is fixed. Note that it is now labeled as Blocked On Sync.

AndyDentFree avatar Dec 12 '16 00:12 AndyDentFree