Describe the bug
When I add cards to a board in a high frequent manner (e.g. Multiple cards in a row, with switching back and forth to the app), single cards appear multiple times after they synced. Sometimes one card can be seen 3-5 times.
To reproduce
Issue is reproducible with an account from try.nextcloud.com:
Steps to reproduce the behavior:
Create cards with a high frequency. Maybe also switch between the app and another in between
Additional Information:
The Bug is observed on a shared board, but is also reproducable on a board only used by one person.
Expected behavior
Cards should appear only ones
Versions
Smartphone (please complete the following information):
Possible fix
Maybe it would be enough if the app would check if a card with the same content has been sent to the backend in the last seconds and if so, ommit it.
Thank you for the report. Please fill in the complete issue template, otherwise we can not work on it. It is there for a reason 馃檪.
I am really sorry for the incomplete report. I was submitting it via mobile with disabled javascript and as I just found out the templates appear not in the issue textfield in that scenario..
Updated all missing fields in the original post.
No JS? I think in that case @stefan-niedermann can't really be mad 馃ぃ
@desperateCoder might this be a symptome of parallel syncs maybe?
@tuximail thanks for adding the infos 馃檪
@stefan-niedermann most likely not... Especially in the online case: it is a completely isolated process, only linked to the rest of the application by the one IResponseCallback you create on the 'save'-tap... If you can promise you don't call it more than once, let's say on destroy or whatever, this is totally a weird one. I'll have to add some logs to verify, where exactly some process goes crazy...
What I found so interesting is that it worked completely fine with the try.nextcloud account (I even tested with a shared board). Can I help you with any information on my server side? Or is there anything that could be "tuned" e.g in the nextcloud deck app?
In fact, I had the same issue a few days ago, I think my instance could reproduce this. We'll analyze this, for now, unfortunately I only can guess what's happening... But thanks for your cooperation so far! We might return to the offer!
I have also been able to reproduce the issue (with a build which already contains queued sync).
I also checked that we only observeOnce. Currently i suspect the EditActivity to not finish proper after creating the first card, but if this was the case, it should create linear n new cards with each new card (which is not the case).
Hmm 馃 guess we need some debugging here. I really wished we already had Android Studio 4.1 with the new Database panel.... 馃槥
It seem to work properly if i go offline and create many cards. Going online again syncs them up as expected. @tuximail can you confirm this behavior?
So maybe createFullCard triggers a network request (if online) and in parallel creates the card locally or so? @desperateCoder
I can confirm the behavior in airplane/offline mode. After coming back online the newly created cards were synced properly...
@tuximail can you please test this again as soon as 1.10.0 has been released? This should be fixed starting with this version.
If it still occurs with 1.10.0 or higher, just reopen this issue please :)
Thank you for reporting the issue!
Most helpful comment
I am really sorry for the incomplete report. I was submitting it via mobile with disabled javascript and as I just found out the templates appear not in the issue textfield in that scenario..
Updated all missing fields in the original post.