Skip to content

App broken after update to v2.6 #159

Description

@glad-dev

After upgrading from v2.5 to v2.6, my self hosted Wger instance stopped working on mobile. The website works fine, including pagination, but the app states that the server is misconfigured and headers are missing.
From the Nginx logs, I think that the issue might be related to PowerSync instead of missing headers, since its requests are being redirected to an error_doc URL with a 404. The powersync service is reachable via https://wger.example.com/ps/.

I use Apache as a reverse proxy infront of Nginx but use the default docker compose otherwise.

Apache config:

ProxyAddHeaders On
ProxyPreserveHost On

RequestHeader set X-Forwarded-Proto "https"
RequestHeader set X-Forwarded-Port "443"
RequestHeader set X-Forwarded-Ssl "on"

ProxyPass / http://localhost:8085/
ProxyPassReverse / http://localhost:8085/

The nginx logs:

{"ts":"2026-07-16T10:00:22+00:00","client_ip":"172.23.0.1","request_method":"HEAD","request_uri":"/api/v2/version/","request_proto":"HTTP/1.1","request_host":"wger.example.com","status":200,"size":0,"duration":0.017,"user_agent":"wger App/2.0.1 (de.wger.flutter; build: 220; platform: android) - https://github.com/wger-project","referer":""}
{"ts":"2026-07-16T10:00:22+00:00","client_ip":"172.23.0.1","request_method":"POST","request_uri":"/allauth/app/v1/tokens/refresh","request_proto":"HTTP/1.1","request_host":"wger.example.com","status":200,"size":1522,"duration":0.161,"user_agent":"wger App/2.0.1 (de.wger.flutter; build: 220; platform: android) - https://github.com/wger-project","referer":""}
{"ts":"2026-07-16T10:00:22+00:00","client_ip":"172.23.0.1","request_method":"HEAD","request_uri":"/api/v2/routine/","request_proto":"HTTP/1.1","request_host":"wger.example.com","status":200,"size":0,"duration":0.069,"user_agent":"wger App/2.0.1 (de.wger.flutter; build: 220; platform: android) - https://github.com/wger-project","referer":""}
{"ts":"2026-07-16T10:00:22+00:00","client_ip":"172.23.0.1","request_method":"HEAD","request_uri":"/api/v2/routine/","request_proto":"HTTP/1.1","request_host":"wger.example.com","status":200,"size":0,"duration":0.111,"user_agent":"wger App/2.0.1 (de.wger.flutter; build: 220; platform: android) - https://github.com/wger-project","referer":""}
{"ts":"2026-07-16T10:00:22+00:00","client_ip":"172.23.0.1","request_method":"GET","request_uri":"/api/v2/user-trophy/?limit=999&trophy__is_hidden=false","request_proto":"HTTP/1.1","request_host":"wger.example.com","status":200,"size":931,"duration":0.130,"user_agent":"wger App/2.0.1 (de.wger.flutter; build: 220; platform: android) - https://github.com/wger-project","referer":""}
{"ts":"2026-07-16T10:00:22+00:00","client_ip":"172.23.0.1","request_method":"GET","request_uri":"/api/v2/powersync-token","request_proto":"HTTP/1.1","request_host":"wger.example.com","status":200,"size":543,"duration":0.126,"user_agent":"Dart/3.12 (dart:io)","referer":""}
{"ts":"2026-07-16T10:00:22+00:00","client_ip":"172.23.0.1","request_method":"GET","request_uri":"/api/v2/trophy/?limit=999","request_proto":"HTTP/1.1","request_host":"wger.example.com","status":200,"size":3049,"duration":0.132,"user_agent":"wger App/2.0.1 (de.wger.flutter; build: 220; platform: android) - https://github.com/wger-project","referer":""}
{"ts":"2026-07-16T10:00:23+00:00","client_ip":"172.23.0.1","request_method":"GET","request_uri":"/api/v2/trophy/progress/","request_proto":"HTTP/1.1","request_host":"wger.example.com","status":200,"size":3821,"duration":0.151,"user_agent":"wger App/2.0.1 (de.wger.flutter; build: 220; platform: android) - https://github.com/wger-project","referer":""}
{"ts":"2026-07-16T10:00:23+00:00","client_ip":"172.23.0.1","request_method":"GET","request_uri":"/api/v2/version/","request_proto":"HTTP/1.1","request_host":"wger.example.com","status":200,"size":7,"duration":0.154,"user_agent":"Dart/3.12 (dart:io)","referer":""}
{"ts":"2026-07-16T10:00:23+00:00","client_ip":"172.23.0.1","request_method":"GET","request_uri":"/api/v2/version/","request_proto":"HTTP/1.1","request_host":"wger.example.com","status":200,"size":7,"duration":0.019,"user_agent":"Dart/3.12 (dart:io)","referer":""}
{"ts":"2026-07-16T10:00:23+00:00","client_ip":"172.23.0.1","request_method":"GET","request_uri":"/api/v2/min-app-version/","request_proto":"HTTP/1.1","request_host":"wger.example.com","status":200,"size":7,"duration":0.019,"user_agent":"Dart/3.12 (dart:io)","referer":""}
{"ts":"2026-07-16T10:00:23+00:00","client_ip":"172.23.0.1","request_method":"GET","request_uri":"/api/v2/min-app-version/","request_proto":"HTTP/1.1","request_host":"wger.example.com","status":200,"size":7,"duration":0.018,"user_agent":"Dart/3.12 (dart:io)","referer":""}
{"ts":"2026-07-16T10:00:23+00:00","client_ip":"172.23.0.1","request_method":"GET","request_uri":"/error_docs/forbidden.html","request_proto":"HTTP/1.1","request_host":"wger.example.com","status":404,"size":2895,"duration":0.020,"user_agent":"powersync-dart-core/2.3.0 Dart/3.12.2 android","referer":""}
{"ts":"2026-07-16T10:00:24+00:00","client_ip":"172.23.0.1","request_method":"HEAD","request_uri":"/api/v2/version/","request_proto":"HTTP/1.1","request_host":"wger.example.com","status":200,"size":0,"duration":0.019,"user_agent":"wger App/2.0.1 (de.wger.flutter; build: 220; platform: android) - https://github.com/wger-project","referer":""}
{"ts":"2026-07-16T10:00:28+00:00","client_ip":"172.23.0.1","request_method":"GET","request_uri":"/error_docs/forbidden.html","request_proto":"HTTP/1.1","request_host":"wger.example.com","status":404,"size":2895,"duration":0.024,"user_agent":"powersync-dart-core/2.3.0 Dart/3.12.2 android","referer":""}
{"ts":"2026-07-16T10:00:38+00:00","client_ip":"172.23.0.1","request_method":"GET","request_uri":"/error_docs/forbidden.html","request_proto":"HTTP/1.1","request_host":"wger.example.com","status":404,"size":2895,"duration":0.022,"user_agent":"powersync-dart-core/2.3.0 Dart/3.12.2 android","referer":""}
{"ts":"2026-07-16T10:02:24+00:00","client_ip":"172.23.0.1","request_method":"GET","request_uri":"/api/v2/version/","request_proto":"HTTP/1.1","request_host":"wger.example.com","status":200,"size":7,"duration":0.018,"user_agent":"Dart/3.12 (dart:io)","referer":""}
{"ts":"2026-07-16T10:02:25+00:00","client_ip":"172.23.0.1","request_method":"POST","request_uri":"/allauth/app/v1/auth/login","request_proto":"HTTP/1.1","request_host":"wger.example.com","status":200,"size":1763,"duration":0.862,"user_agent":"wger App/2.0.1 (de.wger.flutter; build: 220; platform: android) - https://github.com/wger-project","referer":""}
{"ts":"2026-07-16T10:02:25+00:00","client_ip":"172.23.0.1","request_method":"GET","request_uri":"/api/v2/min-app-version/","request_proto":"HTTP/1.1","request_host":"wger.example.com","status":200,"size":7,"duration":0.017,"user_agent":"Dart/3.12 (dart:io)","referer":""}
{"ts":"2026-07-16T10:02:25+00:00","client_ip":"172.23.0.1","request_method":"GET","request_uri":"/api/v2/exercise/?limit=1","request_proto":"HTTP/1.1","request_host":"wger.example.com","status":200,"size":412,"duration":0.083,"user_agent":"Dart/3.12 (dart:io)","referer":""}
{"ts":"2026-07-16T10:02:25+00:00","client_ip":"172.23.0.1","request_method":"GET","request_uri":"/api/v2/exerciseimage/?limit=1","request_proto":"HTTP/1.1","request_host":"wger.example.com","status":200,"size":790,"duration":0.079,"user_agent":"wger App/2.0.1 (de.wger.flutter; build: 220; platform: android) - https://github.com/wger-project","referer":""}
{"ts":"2026-07-16T10:02:25+00:00","client_ip":"172.23.0.1","request_method":"HEAD","request_uri":"/api/v2/version/","request_proto":"HTTP/1.1","request_host":"wger.example.com","status":200,"size":0,"duration":0.061,"user_agent":"wger App/2.0.1 (de.wger.flutter; build: 220; platform: android) - https://github.com/wger-project","referer":""}
{"ts":"2026-07-16T10:02:25+00:00","client_ip":"172.23.0.1","request_method":"GET","request_uri":"/api/v2/user-trophy/?limit=999&trophy__is_hidden=false","request_proto":"HTTP/1.1","request_host":"wger.example.com","status":200,"size":931,"duration":0.072,"user_agent":"wger App/2.0.1 (de.wger.flutter; build: 220; platform: android) - https://github.com/wger-project","referer":""}
{"ts":"2026-07-16T10:02:25+00:00","client_ip":"172.23.0.1","request_method":"GET","request_uri":"/api/v2/trophy/progress/","request_proto":"HTTP/1.1","request_host":"wger.example.com","status":200,"size":3821,"duration":0.077,"user_agent":"wger App/2.0.1 (de.wger.flutter; build: 220; platform: android) - https://github.com/wger-project","referer":""}
{"ts":"2026-07-16T10:02:25+00:00","client_ip":"172.23.0.1","request_method":"GET","request_uri":"/api/v2/powersync-token","request_proto":"HTTP/1.1","request_host":"wger.example.com","status":200,"size":543,"duration":0.103,"user_agent":"Dart/3.12 (dart:io)","referer":""}
{"ts":"2026-07-16T10:02:25+00:00","client_ip":"172.23.0.1","request_method":"GET","request_uri":"/api/v2/trophy/?limit=999","request_proto":"HTTP/1.1","request_host":"wger.example.com","status":200,"size":3049,"duration":0.125,"user_agent":"wger App/2.0.1 (de.wger.flutter; build: 220; platform: android) - https://github.com/wger-project","referer":""}
{"ts":"2026-07-16T10:02:26+00:00","client_ip":"172.23.0.1","request_method":"GET","request_uri":"/error_docs/forbidden.html","request_proto":"HTTP/1.1","request_host":"wger.example.com","status":404,"size":2895,"duration":0.024,"user_agent":"powersync-dart-core/2.3.0 Dart/3.12.2 android","referer":""}
{"ts":"2026-07-16T10:02:28+00:00","client_ip":"172.23.0.1","request_method":"HEAD","request_uri":"/api/v2/version/","request_proto":"HTTP/1.1","request_host":"wger.example.com","status":200,"size":0,"duration":0.018,"user_agent":"wger App/2.0.1 (de.wger.flutter; build: 220; platform: android) - https://github.com/wger-project","referer":""}
{"ts":"2026-07-16T10:02:31+00:00","client_ip":"172.23.0.1","request_method":"GET","request_uri":"/error_docs/forbidden.html","request_proto":"HTTP/1.1","request_host":"wger.example.com","status":404,"size":2895,"duration":0.020,"user_agent":"powersync-dart-core/2.3.0 Dart/3.12.2 android","referer":""}

The app's sync status:
Image

App logs:

INFO: 2026-07-16 12:00:43.672376 [PowerSync] Starting Rust sync iteration
WARNING: 2026-07-16 12:00:43.717066 [PowerSync] Sync error: Sync service error

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions