Skip to content

[Bug]: incorrect error when Internet is not working #6311

Open
@mnalis

Description

@mnalis

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions