Skip to content

Account switcher fails when server offline #15236

Closed

Description

@tobiasKaminsky
  • have multiple accounts
  • one server is offline
  • open up account switcher

According to Andy this fails and no icon is shown

Activity

  1. moved this to 🧭 Planning evaluation (don't pick) in 🤖 🍏 Mobile clients teamon Jul 23, 2025
  2. moved this from 🧭 Planning evaluation (don't pick) to 📄 To do (max 2 entries / member) in 🤖 🍏 Mobile clients teamon Jul 23, 2025
  3. moved this from 📄 To do (max 2 entries / member) to 🏗️ In progress in 🤖 🍏 Mobile clients teamon Aug 11, 2026
  4. daniele-verducci commented on Aug 11, 2026

    @daniele-verducci
    Contributor

    Couldn't reproduce this as reported, but I noticed the account detail page (account switcher -> manage account -> select an account) is indeed missing all the data and appearing empty if the server couldn't be reached. It's possible to show some cached data (icon, name and email address) using the logic from the account list.

    It may be possible to show a badge indicating the server is offline on the relevant accounts. Some considerations:

    How to test connectivity:

    • Can't use ConnectivityService.isNetworkAndServerAvailable as is because it checks the current account (val baseServerAddress = accountManager.user.server.uri.toString()), so it should be adapted to accept an account as parameter and check that one
    • In the files view, the message "Server not available" is a result of a sync event (EVENT_SINGLE_FOLDER_CONTENTS_SYNCED)

    How to show offline servers:

    • In account detail view, we may use the same text and icon from ToolbarActivity.showInfoBox() (that's the one shown in file list when the server is unreachable)
    • In account list view, we may show an icon like the one shown for the selected account, maybe a cloud with an X or an exclamation mark in a triangle. (but what if the accont is selected and offline at the same time?)

    To be decided if it's something useful and if it's not too big of an overhead.

  5. daniele-verducci commented on Aug 11, 2026

    @daniele-verducci
    Contributor

    As per the fist point (show some cached data in the account detail screen using the logic from the account list), I've done it and currently testing. I discovered there was an error message implemented in the emptyList view, but the view itself was never made visible, so it didn't show. Here's the current status after fixing it:

    Image

    The whole "Error retrieving... Operation finished..." and the exclamation mark were already there, only not visible.

    Note: I'm currently retrieving the user name using the deprecated User.toOwnCloudAccount() accordingly to what has been done in the acconts list

  6. tobiasKaminsky commented on Aug 11, 2026

    @tobiasKaminsky
    MemberAuthor

    Nice.
    The error message is too technical, I assume, it is just 1:1 the message by the library?
    My idea

    • remove second line entirely
    • replace second line with something like "Please double check your internet connection or check server status"
  7. daniele-verducci commented on Aug 11, 2026

    @daniele-verducci
    Contributor

    Yes, second line is directly from RemoteOperationResult.getLogMessage().
    I concord it's too technical.
    Here's a proposal:

    Image
  8. moved this from 🏗️ In progress to ☑️ Done in 🤖 🍏 Mobile clients teamon Aug 12, 2026
  9. moved this from ☑️ Done to 🏗️ In progress in 🤖 🍏 Mobile clients teamon Aug 12, 2026
  10. moved this from 🏗️ In progress to ☑️ Done in 🤖 🍏 Mobile clients teamon Aug 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions