App crashes when accessing empty repository #154

Closed
opened 2020-06-03 17:25:20 +00:00 by 6543 · 15 comments
Member

Created By: @otterz

Description - describe the bug / feature / suggestion in brief :

App crashes when accessing empty repository.

Expected behaviour - describe what should be the expected result :

Display "Empty repository" or "No files"

GitNex version : 2.2.0 build 70

Gitea version : 1.9.3

Android version : 9

Screenshots - if any:

None

Logs - if any :

Can be provided if necessary.

Created By: @otterz #### Description - describe the bug / feature / suggestion in brief : App crashes when accessing empty repository. #### Expected behaviour - describe what should be the expected result : Display "Empty repository" or "No files" #### GitNex version : 2.2.0 build 70 #### Gitea version : 1.9.3 #### Android version : 9 #### Screenshots - if any: None #### Logs - if any : Can be provided if necessary.
6543 added the
🐛 Bug
🪜 Upstream
labels 2020-06-03 17:25:21 +00:00
6543 closed this issue 2020-06-03 17:25:21 +00:00
Owner

Thank you @otterz for the report.

Let me confirm, so the repository you access is empty(no files at all) which crash the app?

Thank you @otterz for the report. Let me confirm, so the repository you access is empty(no files at all) which crash the app?
Author
Member

Created By: @otterz

Yes, it's a fresh and empty repository with no data.

Created By: @otterz Yes, it's a fresh and empty repository with no data.
Owner

I did some quick tests on empty repository, and yes the app crash but not because of the empty files list. But because of the API 500 internal server which it should not return.

Although, I will fix this from the app side. Would you help create an issue in Gitea repository too, so they can fix this. I will chime in and provide necessary details where necessary.

I did some quick tests on empty repository, and yes the app crash but not because of the empty files list. But because of the API `500 internal server` which it should not return. Although, I will fix this from the app side. Would you help create an issue in Gitea repository too, so they can fix this. I will chime in and provide necessary details where necessary.
Owner

@6543 can you help with this in the upstream Gitea repo. The contents API return 500 when repository is empty.

@6543 can you help with this in the upstream Gitea repo. The contents API return 500 when repository is empty.
Author
Member

@mmarif so now we need release tag 2.2.1 :=)

@mmarif so now we need release tag 2.2.1 :=)
Owner

Yes, soon will be available.

About the API error, the status code is 500 with the following error. To me status code should be different and when repo is empty, just return the empty files object.

{
  "message": "object does not exist [id: master, rel_path: ]",
  "url": "https://try.gitea.io/api/swagger"
}
Yes, soon will be available. About the API error, the status code is 500 with the following error. To me status code should be different and when repo is empty, just return the empty files object. ``` { "message": "object does not exist [id: master, rel_path: ]", "url": "https://try.gitea.io/api/swagger" } ```
Author
Member
https://github.com/go-gitea/gitea/issues/8582
Author
Member

Created By: @otterz

Thanks for opening the issue and thanks for fixing this issue app side so fast. 👍 @mmarif @6543

Created By: @otterz Thanks for opening the issue and thanks for fixing this issue app side so fast. :+1: @mmarif @6543
Owner

@otterz I have just published the fix. If you are on Gplay version, it will be soon available for download.

https://gitea.com/gitnex/GitNex/releases

@otterz I have just published the fix. If you are on Gplay version, it will be soon available for download. https://gitea.com/gitnex/GitNex/releases
Author
Member

@otterz you should upgrade to gitea version 1.9.4 ;)

It got a lot of bugfixes ...

@otterz you should upgrade to gitea version 1.9.4 ;) It got a lot of bugfixes ...
Author
Member

Created By: @otterz

@mmarif App update arrvies and works like a charm. :-)

@6543 Done. ;-)

Created By: @otterz @mmarif App update arrvies and works like a charm. :-) @6543 Done. ;-)
Author
Member
@mmarif fixed upstream https://github.com/go-gitea/gitea/pull/8587
Owner

@6543 fantastic. 👍

@6543 fantastic. 👍
Owner

@6543 will it be backported to 1.9?

@6543 will it be backported to 1.9?
Author
Member

Already done
for 1.10 and 1.9
https://github.com/go-gitea/gitea/pull/8593

Already done for 1.10 and 1.9 https://github.com/go-gitea/gitea/pull/8593
Sign in to join this conversation.
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: gitnex/GitNex#154
No description provided.