mobile icon indicating copy to clipboard operation
mobile copied to clipboard

Project list search failure

Open tomasMizera opened this issue 3 years ago • 5 comments

Project list e.g. shared with me fails to gather projects when using search (see attached video). App falls to "Unable to get the list of projects" and until I hit Retry it will not change even when I search for something else.

@varmar05 can this be related to https://gitlab.cloud.lutraconsulting.co.uk/mergin/mergin/-/issues/794?

https://user-images.githubusercontent.com/22449698/137897190-d5858c10-03c7-4c29-9a77-e9981eb9672c.mp4

tomasMizera avatar Oct 19 '21 11:10 tomasMizera

Log:

list projects: Requesting: https://public.cloudmergin.com//v1/project/paginated?
name=exif&flag=shared&order_by=namespace&page=2&per_page=50\n"

list projects: FAILED - Network API error: listProjects(): Error transferring https://
public.cloudmergin.com//v1/project/paginated?name=exif&flag=shared&order_by=namespace&page=2&per_page=50
 - server replied: NOT FOUND. The requested URL was not found on the server. 
 If you entered the URL manually please check your spelling and try again.\n"

tomasMizera avatar Oct 19 '21 11:10 tomasMizera

@tomasMizera could you please create an issue if mergin repo? It is not the one mentioned in description.

varmar05 avatar Oct 25 '21 11:10 varmar05

@tomasMizera I found where the actual issue is: you ask page=2 but there is not such page (not enough results). By default sqlalchemy pagination function in server returns 404 in that case. It can be changed to fallback option (page=1) if we think it is better response.

varmar05 avatar Oct 26 '21 09:10 varmar05

Ah, in that case this is most probably regression introduced by https://github.com/lutraconsulting/input/pull/1588 - Input automatically tries to fetch next page when scrolling down. Thanks Martin! I think 404 is reasonable response for non-existing page

tomasMizera avatar Oct 27 '21 08:10 tomasMizera

This issue is also on "My projects" page and also for valid project names. When I try to search project "bug", which exists, I get this error. So basically search is not working. I would vote for this fix.

https://user-images.githubusercontent.com/83582181/168243242-08384bd7-ab08-45d6-bc47-cb9cc5fa3900.mp4

jozef-budac avatar May 13 '22 08:05 jozef-budac