Skip to content

The join screen, settings and the in-app guide promise a default server («По умолчанию — сервер класса», «прошит в сборке») that the APK does not have #154

Closed

Description

@lumenpearson

What is broken.

The app ships with no server address. AppSettings.DEFAULT_BASE_URL is "", deliberately: the comment on it says there is no address that is right for a second user. No build config injects one either. But three places tell the user there is a default server and that they only need to touch the address if their school runs its own:

  • The join screen's «Сервер» row shows «По умолчанию — сервер класса» when the address is blank ("Default — the class server" in English).
  • The server-address sheet says «Меняйте только если школа использует свой сервер.» ("Change this only if the school runs its own server.").
  • The settings row shows «По умолчанию» for a blank address.

The in-app guide says the same thing outright. It is bundled into the APK as assets. The Russian reads «Если сервер школы свой, а не тот, что прошит в сборке…», and the English reads "…rather than the one built into this APK…".

Following that advice fails. With the address left at its "default", pressing «Подключиться» fails, and it fails with an English message on a Russian screen. Elsewhere the same app already knows the truth and says «Не указан адрес сервера — задайте его в настройках.».

The failure scenario.

  1. Install a fresh APK and go through the five first-run steps to «Код класса».
  2. The «Сервер» row reads «По умолчанию — сервер класса». The pupil's school does not run "its own server", so, as the sheet and the guide advise, they leave it alone.
  3. Type a valid eight-character class code. The button is enabled, because canSubmit checks only the code length. Press «Подключиться».
  4. BaseUrlInterceptor finds a blank address and throws ServerAddressMissingException("No server address configured"), which is an IOException. JoinFailure.of classifies it as Offline, and JoinError.of passes its English message through as the detail.
  5. The field shows «Не удалось подключиться: No server address configured». The screen has just said a default server is in use, and nothing on it tells the pupil they must type an address.

Where.

  • android/app/src/main/res/values/strings.xml:73: join_server_unset «По умолчанию — сервер класса». values-en/strings.xml:85 is its twin.
  • android/app/src/main/res/values/strings.xml:77: server_dialog_description «Меняйте только если школа использует свой сервер.». values-en/strings.xml:89 is its twin.
  • android/app/src/main/res/values/strings.xml:318: settings_server_url_default «По умолчанию», used at ui/settings/SettingsScreen.kt:1103-1104.
  • docs/app/guide.ru.md:32 and docs/app/guide.en.md:32: «тот, что прошит в сборке» and "the one built into this APK". They are shipped as assets by android/core/data/build.gradle.kts:55.
  • android/core/data/src/main/kotlin/com/lumenpearson/lessons/core/data/repository/Models.kt:310: DEFAULT_BASE_URL = "", with the reasoning at 302-309.
  • android/core/data/src/main/kotlin/com/lumenpearson/lessons/core/data/network/BaseUrlInterceptor.kt:15,43-44: the exception and its English message.
  • android/core/data/src/main/kotlin/com/lumenpearson/lessons/core/data/repository/JoinFailure.kt:80, android/app/src/main/kotlin/com/lumenpearson/lessons/ui/join/JoinViewModel.kt:86,119 and ui/join/JoinScreen.kt:185-186,326-327: how the blank address reaches the screen as «Не удалось подключиться: No server address configured».
  • android/app/src/main/res/values/strings.xml:134: sync_error_not_configured, the wording the app already uses when there is no address.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    • Status
      Done

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions