App crashes when accessing empty repository #154
Labels
No Label
⌚ Major-release
⌚ Minor-release
⚔️ Wontfix
⚙️ CI
⛏️ Breaking
✨ Duplicate
❌ Invalid
❓ Question
❤️ Support
➡️ Frontport
➡️ Needs-frontport
🔙 Backport
💭 Brainstorming
🐛 Bug
🔭 Cannot-reproduce
🧺 Cleanup
🧾 Confirmed
💬 Discussion
📄 Documentation
🎯 Enhancement
🩹 External-dependecy
📱 F-droid
🎉 Feature
👋 Good-first-issue
🤾 Google-play
🔙 Has-backport
🚀 Improvement
🚨 Investigate
🌠 Long-term
🔙 Needs-backport
🧺 Needs-cleanup
📡 Needs-feedback
📈 Performance
📌 Priority-critical
📌 Priority-high
📍 Priority-low
📍 Priority-medium
🥑 Ready
🪒 Refactor
🔙 Regression
📸 Release
🔒 Security
💡 Suggestion
🧪 Testing
🌐 Translation
💻 UI/UX
🪜 Upstream
🟦 Website
🙇♂️ Needs-help
🛰️ API-dependency
🛡️ Blocked
🏗️ Build
🗒️ Changelog
🗄️ Repository
🗓️ Summary
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: gitnex/GitNex#154
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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.
Thank you @otterz for the report.
Let me confirm, so the repository you access is empty(no files at all) which crash the app?
Created By: @otterz
Yes, it's a fresh and empty repository with no data.
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.
@6543 can you help with this in the upstream Gitea repo. The contents API return 500 when repository is empty.
@mmarif so now we need release tag 2.2.1 :=)
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.
https://github.com/go-gitea/gitea/issues/8582
Created By: @otterz
Thanks for opening the issue and thanks for fixing this issue app side so fast. 👍 @mmarif @6543
@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 you should upgrade to gitea version 1.9.4 ;)
It got a lot of bugfixes ...
Created By: @otterz
@mmarif App update arrvies and works like a charm. :-)
@6543 Done. ;-)
@mmarif fixed upstream https://github.com/go-gitea/gitea/pull/8587
@6543 fantastic. 👍
@6543 will it be backported to 1.9?
Already done
for 1.10 and 1.9
https://github.com/go-gitea/gitea/pull/8593