lneugebauer / nextcloud-cookbook

Android client for Nextcloud Cookbook app.
https://lneugebauer.github.io/nextcloud-cookbook/
MIT License
46 stars 8 forks source link

Missing Display/Data Update after Timeout or Error #91

Open geru-github opened 1 month ago

geru-github commented 1 month ago

Describe the bug

Creating a new recipe with a new category fails with timeout. The recipe is stored on the server but not shown in the Android app. No easy way to resync. Killing and restarting the app seems the only way. To Reproduce Steps to reproduce the behavior:

  1. Tab recipe
  2. create new recipe
  3. fill description
  4. add new category
  5. Click on save
  6. timeout happens
  7. tab start
  8. recipe does not show

Expected behavior

  1. no timeout (wait longer?)
  2. update app from nextcloud data

Smartphone:

Additional context

Could also be reproduced by storing the same recipe twice, http 409 error happens. App does not update display.

lneugebauer commented 1 month ago

Hi @gru-github, thank you for reporting this bug.

Sadly I can not fully reproduce your issue. As I don't get any timeout, can you tell me how you are hosting your Nextcloud? This may help me reproduce the issue.

However, I can verify that the categories screen doesn't get updated.

About storing the same recipe twice: Getting the 409 error is expected as the name of the recipe has to be unique.

geru-github commented 1 month ago

Hi, thanks for the quick response. My Nextcloud instance is hosted in a virtual machine, so it may be a little slow depending on the real machine's load. Hard to reproduce in a fast environment, I can see that The remark about the http error 409 was only made as another example of the missing update after an error. Can also be used to reproduce the missing update by adding a recipe via web and then trying to add the same title via app. You should not see the newly added recipe in the app after the error is shown. On the other hand a 409 error shown in the frontend is something a standard user would not be able to interpret correctly. Maybe a future version can take care of that detail.

lneugebauer commented 1 month ago

I'll try to reproduce the timeout issue in the next few days and get back to you as soon as I have more insights.

I may also increase the timout time. It may be as low as 10 seconds. That seems a little low. I'll double check this and may do some adjustments.

Displaying the errors can definitely be improved. I'll work on that.

lneugebauer commented 4 hours ago

Hi @geru-github, did anything change for you with the latest release (0.21.0)? I wasn't able to refactor the error screens yet but I increased the timeout duration from 10 to 30 seconds.