apps-android-commons icon indicating copy to clipboard operation
apps-android-commons copied to clipboard

[Bug]: incorrect error when Internet is not working

Open mnalis opened this issue 7 months ago • 8 comments

Summary

If internet connection is not present, FAILED uploads claims that it because "App believes we're logged in, but got anonymous token". It can happen with flaky internet, but also with intentional disabling of it after first steps to save costly internet bandwidth which picture upload would incur (since the app no longer has "low-data usage mode")

in fact, since there is not Internet present, the app did not "get" anonymous token (or anything else), so the error is wrong

Ideally, the app should distinguish between network errors ("host unreachable", "TCP connection reset", network timeout etc) and server errors ("server returned HTTP 404" or "server returns anonymous token") and display exact error to the user. Or at least a correct class (network error or server error).

If even error class is too hard, the error at least should not be misleading, but something generic like e.g. "There was an error talking to the server" or something like that (perhaps even continued with a longed explanation of the cause e.g. "; that may be caused by loss of Internet connectivity, or xyz")

Steps to reproduce

  1. add a new picture and fill metadata
  2. just before final upload step disable internet
  3. continue with upload

Expected behaviour

The error displayed would be "We can't contact to the server" or "No Internet is available at the moment" or something like that

Actual behaviour

Error is "App believes we're logged in, but got anonymous token" which is clearly incorrect. Probably the app does not distinguish error codes.

Device name

Samsung Galaxy S23+

Android version

Android 14

Commons app version

5.3.0~9289dcc42 (f-droid)

Device logs

No response

Screen-shots

Image

Would you like to work on the issue?

None

mnalis avatar May 19 '25 15:05 mnalis

I often get this error when riding the elevator (meanini a loss of Internet for a minute or so).

nicolas-raoul avatar May 19 '25 23:05 nicolas-raoul

I’d like to work on this. Could you assign me?

XinyuYangYXY avatar Oct 12 '25 09:10 XinyuYangYXY

I’m afraid I’m not able to solve this issue at the moment. It might be better if someone else could take a look.

XinyuYangYXY avatar Nov 02 '25 04:11 XinyuYangYXY

No worries, feel free to take any issue at any time in the future, if you want. 🙂

nicolas-raoul avatar Nov 02 '25 09:11 nicolas-raoul

Hi, I would like to work on this issue. Could you please assign it to me (if needed)?

priyanshudotexe avatar Nov 30 '25 19:11 priyanshudotexe

This issue has already been assigned. Please find another issue to work on: https://github.com/commons-app/apps-android-commons/issues?q=is%3Aissue%20state%3Aopen%20type%3ABug%20no%3Aassignee%20-label%3A%22low%20priority%22%20-label%3Adebated%20-label%3Aupstream

github-actions[bot] avatar Nov 30 '25 19:11 github-actions[bot]

@priyanshudotexe Sorry, it is now yours! Thanks a lot. 🙂

nicolas-raoul avatar Nov 30 '25 23:11 nicolas-raoul

This issue has already been assigned. Please find another issue to work on: https://github.com/commons-app/apps-android-commons/issues?q=is%3Aissue%20state%3Aopen%20type%3ABug%20no%3Aassignee%20-label%3A%22low%20priority%22%20-label%3Adebated%20-label%3Aupstream

github-actions[bot] avatar Nov 30 '25 23:11 github-actions[bot]