Skip to content

[Bug] Logged out from App... now had to reactivate sync options #1741

Backlog

Description

@mills1975

HealthLog version

1.49.1

Deployment type

Self-hosted (Docker)

What happened?

A day ago, I've been logged out in the iOS-App and therefore had to relogin again.
Now I saw, that meds weren't synced anymore, so I looked everything up in the app.

And so I saw, that all these options were deactivated... I think because of the re-login.

image

Another thing is, that I'm not able to re-activate the sync of routes. Everytime, I try, the app crashes.

image

Expected behavior

If the app gets logged out, all the sync settings should be saved for a
new login. It shouldn't be necessary, to activate them by hand again.

And there shouldn't be a crash, if activating routes-sync.

Steps to reproduce

  1. Logout from server on the iOS App
  2. Login again
  3. Look on the sync options... they are all off now.

Error ID

No response

Support info / support report


Screenshots / other logs

Browser / OS (if applicable)

No response

Pre-flight checks

  • I confirmed this is not a duplicate of an existing issue.
  • I redacted any secrets, tokens, or personal data from logs.

Activity

  1. added
    bug
    on Nov 30, 2026
  2. MBombeck commented on Dec 1, 2026

    @MBombeck
    Owner

    @mills1975 thanks for the report and the screenshots, and sorry you had to switch everything back on by hand.

    There are three things in here, and they live in two places.

    The sync switches and the crash when you turn routes back on are in the iPhone app itself. The server never sees those switches, so this one has to be fixed in the app. Both go to the app side together with your screenshots, and I'll post here when there's news.

    Why you were signed out in the first place is on the server, and I found one way it can happen to a perfectly normal app. When the app renews its sign-in and the answer gets lost on the way (the phone switches from Wi-Fi to mobile data, or iOS freezes the app in the middle of the request), the server has already moved on. The app's next try then looks like an old token being reused, maybe by someone else, and the server signs that device out to be safe. A fix that tells these two cases apart is in review now.

    To be sure that's what hit you, could you (or whoever runs your server) check the admin audit log around the time you were signed out? A failed token refresh there carries a reason, for example "already used", "expired" or "revoked", and that tells me which way it went. The app version and build number would help too.

    Refs #1741

  3. added
    ios
    on Dec 1, 2026
  4. MBombeck commented on Dec 1, 2026

    @MBombeck
    Owner

    @mills1975 an update for the app part, both are fixed now.

    The crash was a bug in the app. When you turn on route sync, the app asks Apple Health for permission to read workout routes, and Apple Health only accepts that together with the permission for workouts. The app left that out, so iOS stopped it every time. Until the update is out, please leave route sync off. Nothing gets lost: once you have the update you can switch it on and send the routes of the last 12 months in one go.

    The switches being off after signing in again was also our mistake. On sign-out the app turns off Apple Health sync for mood, medications and ECG, so that another person signing in on the same phone doesn't inherit them. That's right for a different account, but the same account should get its switches back, and with the update it does. For now, please switch medications, mood and ECG back on under Settings, Apple Health. Your medications catch up on the next sync.

    The app also holds on a little longer while it renews its sign-in in the background now, so a lost answer like the one described above should happen much less often.

    Both fixes are in the next TestFlight build (1.7.1). I'll post here when it's out.

  5. MBombeck commented on Dec 1, 2026

    @MBombeck
    Owner

    @mills1975 the server part is in now as well.

    When the app renews its sign-in and the answer gets lost on the way, the app can now repeat that request once with its previous token within the next 24 hours and simply gets its new sign-in back, instead of being signed out. A token that really was taken by someone else still gets caught: the moment your phone shows up again, the server notices that two devices are using the same sign-in, ends both, and raises the alarm. That's the same protection as before, it just no longer hits you for a dropped connection.

    It lands on :edge with the next build of main and ships with the release on Saturday. Together with the app update for the sync switches and routes, you shouldn't have to go through this again. If you do get signed out after Saturday, tell me roughly when, and I'll look up exactly what happened.

    Refs #1741

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugios

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions