flutter icon indicating copy to clipboard operation
flutter copied to clipboard

No data on app version 1.8.3

Open Mystic-Ivy opened this issue 5 months ago β€’ 20 comments

Priority/Impact

High (critical issue, blocks workflow)

Description

Hi,

when upgrading to the new app version 1.8.3 all data is missing on app level (Data still viewable on the web page). I have existing workout plans, nutritional plan, weight, and measurements. Downgrading to app version to 1.8.2 all data is being "synced" again. I tried logout, deleting caches and logging back in, but nothing seemed to work.

I could not find a button to download logs. Please let me know if there is a way on Android to retrieve it.

I created a new issue due to an already existing issue being a different version https://github.com/wger-project/flutter/issues/861. Please close if duplicate. :)

Image Image

Server version

2.4.0a1

Mobile app version

1.8.3

Mystic-Ivy avatar Jul 14 '25 08:07 Mystic-Ivy

Quick update.

After installing the update 1.8.3 and using the app like a new installation all new entries can be viewed on the web application. If I remove the app and downgrade the version, I then also see the routine I added with 1.8.3. If I then update the app from 1.8.2 to 1.8.3 everything is back the images above.

Mystic-Ivy avatar Jul 14 '25 16:07 Mystic-Ivy

@Mystic-Ivy are you still facing the issue?

afzal09 avatar Jul 24 '25 21:07 afzal09

i started experiencing this same issue today. When downgrading to 1.8.2 it loads my workouts in the app but not weight entries. on 1.8.3 it loads nothing. I am self hosting and this is the error i get in the logs when I attempt to sign in. Loging in on app web-1 | level=WARNING ts=2025-08-12 15:08:12,325 module=cache path=/home/wger/.local/lib/python3.12/site-packages/axes/handlers/cache.py line=130 message=AXES: Repeated login failure by {username: "********************", ip_address: "********************", user_agent: "wger App", path_info: "/api/v2/login/"}. Count = 9 of 10. Updating existing record in the cache. web-1 | level=WARNING ts=2025-08-12 15:08:15,204 module=log path=/home/wger/.local/lib/python3.12/site-packages/django/utils/log.py line=253 message=Forbidden: /api/v2/weightentry/

loging in on website, same credentials. web-1 | level=INFO ts=2025-08-12 15:15:42,340 module=cache path=/home/wger/.local/lib/python3.12/site-packages/axes/handlers/cache.py line=174 message=AXES: Successful login by {username: "********************", ip_address: "********************", user_agent: "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:141.0) Gecko/20100101 Firefox/141.0", path_info: "/en/user/login"}.

Oddly enough it worked fine yesterday, logged my weight and saved my exercise. Not sure what is causing the failed login, same credentials work perfectly fine through web browser.

Server version

2.4.0a1

Mobile app version

1.8.3

Ominus404 avatar Aug 12 '25 13:08 Ominus404

Sorry for the long wait I was some weeks on holiday. I'm currently trying to reproduce this

(as for the login error message, does the app still behave the same if you completely deactivate axes with AXES_ENABLED=False in the env file @Ominus404 ?)

rolandgeider avatar Aug 13 '25 12:08 rolandgeider

@rolandgeider Yes, i get the same "forbidden" message but not the axes one. it is very strange as i did not change anything between the time it worked and when it stopped working. i should mention that i have my database in folder form with proper permissions set. running docker on a rpi4.

I should also note, despite the app seeming not to correctly log in, i could still load my routines under the routines tab, i was even able to log my entire training and it saved fine onto my server today, but the weight entries still didn't load in the app.

I enabled django debug in the env this morning before using the app again, so if there's any logs that i can send you I'd be happy to, just need to know where i can find them.

Ominus404 avatar Aug 13 '25 13:08 Ominus404

I suspect the error is some exception related to the data models which is currently not being caught. As to why this doesn't seem to happen all the time, no idea yet. We had prepared a global error handler for situations like this, with direct links to github and everything, but wasn't ready for 1.8.3. I'll try to get a new version out of the door this weekend and then we will have at least more info (hopefully)

Image Image

And for the forbidden message, since that is something from the backend, I'd open a new issue for that one

rolandgeider avatar Aug 15 '25 15:08 rolandgeider

Just thought I'd share this, suddenly it now shows this error when I try to log in on phone, also same error when trying to login on the Linux app. Firefox browser on Linux, Windows and Android phone logs in without issues.

Image

Ominus404 avatar Aug 24 '25 18:08 Ominus404

@Ominus404 "no auth credentials" is a new one... 🫀

It also makes little sense that this would happen, as the auth token is always sent on all requests, but would at least explain why there are no results since the server would not return anything.

rolandgeider avatar Aug 25 '25 17:08 rolandgeider

Well, i did some more stuff today, namely backing up my wger docker instance and then making a new clean one, unfortunately the problem persists, but at the same time i have no issues logging in on the app with wger.de server so it is safe to say this is specific to self hosting and/or my newbie settings. my rpi has always been moody when it comes to the wger docker.

EDIT: I am now 99% certain this is not an issue with the app but with my self hosted server, since i have no issues connecting to your official server. Opened a separate issue for with some information here https://github.com/wger-project/wger/issues/2028

Ominus404 avatar Aug 26 '25 13:08 Ominus404

Alright 1.8.4 is out (the flathub release will need a couple of days longer). Let me know if the problem is either gone or you get at least some usable logs!

rolandgeider avatar Aug 28 '25 12:08 rolandgeider

Just gave the new version a try and there's some progress. Oddly enough i can now log in as admin with default password and get no error, even loads data i entered through website as a test.

But the user i log my trainings on still get a refused connection, thought it might be something with the password as it had special characters but changing it to letters and number only didn't make a difference.

So i quickly made a new user and tried to login on app and it worked, so admin works and new user works but my main user with all the data still throws an error when trying to log in, even though the same credentials work through web browser πŸ˜• This is where an import/export function would come in handy. πŸ˜… So I'm guessing this is no longer an app issue but a server/database issue.

Error on app:

Error Title: An error occurred Error Message: Authentication credentials were not provided.

Stack Trace: #0 WgerBaseProvider.fetch (package:wger/providers/base_provider.dart:69) #1 WgerBaseProvider.fetchPaginated (package:wger/providers/base_provider.dart:83) #2 BodyWeightProvider.fetchAndSetEntries (package:wger/providers/body_weight.dart:70) #3 Future.wait. (dart:async/future.dart:525) #4 _HomeTabsScreenState._loadEntries (package:wger/screens/home_tabs_screen.dart:101) #5 _FutureBuilderState._subscribe. (package:flutter/src/widgets/async.dart:643)

only thing logged in terminal during error:

web-1 | [28/Aug/2025 18:52:06] "HEAD / HTTP/1.1" 302 0 web-1 | [28/Aug/2025 18:52:06] "HEAD /en/ HTTP/1.1" 302 0 web-1 | [28/Aug/2025 18:52:06] "HEAD /en/software/features HTTP/1.1" 200 0 web-1 | [28/Aug/2025 18:52:09] "POST /api/v2/login/ HTTP/1.1" 200 52 web-1 | [28/Aug/2025 18:52:09] "GET /api/v2/version/ HTTP/1.1" 200 9 web-1 | [28/Aug/2025 18:52:09] "GET /api/v2/min-app-version/ HTTP/1.1" 200 7 web-1 | [28/Aug/2025 18:52:09] "GET /api/v2/version/ HTTP/1.1" 200 9 web-1 | [28/Aug/2025 18:52:09] "GET /api/v2/userprofile/ HTTP/1.1" 200 707 web-1 | [28/Aug/2025 18:52:09] "GET /api/v2/routine/?limit=1000&is_template=false HTTP/1.1" 200 439 web-1 | [28/Aug/2025 18:52:09] "GET /api/v2/measurement-category/ HTTP/1.1" 200 52 web-1 | [28/Aug/2025 18:52:09] "GET /api/v2/gallery/ HTTP/1.1" 200 52 web-1 | [28/Aug/2025 18:52:09] "GET /api/v2/nutritionplan/?limit=1000 HTTP/1.1" 200 52 web-1 | [28/Aug/2025 18:52:09] "GET /api/v2/weightentry/?ordering=-date&limit=100 HTTP/1.1" 200 5850 web-1 | level=WARNING ts=2025-08-28 18:52:09,771 module=log path=/home/wger/.local/lib/python3.12/site-packages/django/utils/log.py line=253 message=Forbidden: /api/v2/weightentry/ web-1 | [28/Aug/2025 18:52:09] "GET /api/v2/weightentry/?limit=100&offset=100&ordering=-date HTTP/1.1" 403 58 web-1 | [28/Aug/2025 18:52:09] "GET /api/v2/workoutsession/ HTTP/1.1" 200 3005 web-1 | level=WARNING ts=2025-08-28 18:52:09,978 module=log path=/home/wger/.local/lib/python3.12/site-packages/django/utils/log.py line=253 message=Forbidden: /api/v2/workoutsession/ web-1 | [28/Aug/2025 18:52:09] "GET /api/v2/workoutsession/?limit=20&offset=20 HTTP/1.1" 403 58 web-1 | [28/Aug/2025 18:52:17] "HEAD / HTTP/1.1" 302 0 web-1 | [28/Aug/2025 18:52:17] "HEAD /en/ HTTP/1.1" 302 0 web-1 | [28/Aug/2025 18:52:17] "HEAD /en/software/features HTTP/1.1" 200 0 web-1 | [28/Aug/2025 18:52:27] "HEAD / HTTP/1.1" 302 0 web-1 | [28/Aug/2025 18:52:27] "HEAD /en/ HTTP/1.1" 302 0 web-1 | [28/Aug/2025 18:52:27] "HEAD /en/software/features HTTP/1.1" 200 0

Ominus404 avatar Aug 28 '25 17:08 Ominus404

INTERESTING DISCOVERY!!!

i thought id import my weight entries to admin through api, which i managed to do no problem with a simple python script. BUT now my admin login no longer works on the app. Then i saw this in the server terminal!

web-1 | [28/Aug/2025 23:02:53] "GET /api/v2/weightentry/?ordering=-date&limit=100 HTTP/1.1" 200 5931 web-1 | [28/Aug/2025 23:02:53] "GET /api/v2/gallery/ HTTP/1.1" 200 52 web-1 | level=WARNING ts=2025-08-28 23:02:53,324 module=log path=/home/wger/.local/lib/python3.12/site-packages/django/utils/log.py line=253 message=Forbidden: /api/v2/weightentry/ web-1 | [28/Aug/2025 23:02:53] "GET /api/v2/weightentry/?limit=100&offset=100&ordering=-date HTTP/1.1" 403 58 web-1 | [28/Aug/2025 23:02:53] "GET /api/v2/workoutsession/ HTTP/1.1" 200 52

so just to test it, i deleted 19 weight entries ( i currently have 118 total) so i had only 99 stored, and suddenly i could log into admin account again, could this be it?? Is there somewhere i can change the API limit?

Ominus404 avatar Aug 28 '25 21:08 Ominus404

@Ominus404 does this happen reproducible for you? 😳

On my end (phone, emulator and even a stone-age tablet I revived for this) everything works fine with the pagination. Since you have your own instance, if you want to look furhter into this, you can just create a new test user and create dummy entries:

docker compose exec db psql -U wger -c "SELECT id, username FROM auth_user;"
docker compose exec web python3 manage.py dummy-generator-body-weight --nr-entries 200 --user-id xyz

# perhaps also useful if you have problems because of the pagination
dummy-generator-nutrition --user-id xyz 
dummy-generator-measurement-categories --user-id xyz
dummy-generator-measurements --nr-measurements 150 --user-id xyz

rolandgeider avatar Aug 29 '25 12:08 rolandgeider

yes, as soon as i got 101 entries under weight i get the credentials were not provided error, if i delete the entry i can log in again through app. am i missing some setting that is throttling my api requests? i have django rest framework set to 1 proxy and i have only caddy as reverse proxy.

the terminal logs the same thing every time the error happens when logging in :

web-1 | [29/Aug/2025 15:29:20] "POST /api/v2/login/ HTTP/1.1" 200 52 web-1 | [29/Aug/2025 15:29:20] "GET /api/v2/version/ HTTP/1.1" 200 9 web-1 | [29/Aug/2025 15:29:20] "GET /api/v2/min-app-version/ HTTP/1.1" 200 7 web-1 | [29/Aug/2025 15:29:20] "GET /api/v2/version/ HTTP/1.1" 200 9 web-1 | [29/Aug/2025 15:29:21] "GET /api/v2/userprofile/ HTTP/1.1" 200 667 web-1 | [29/Aug/2025 15:29:21] "GET /api/v2/nutritionplan/?limit=1000 HTTP/1.1" 200 52 web-1 | [29/Aug/2025 15:29:21] "GET /api/v2/gallery/ HTTP/1.1" 200 52 web-1 | [29/Aug/2025 15:29:21] "GET /api/v2/measurement-category/ HTTP/1.1" 200 52 web-1 | [29/Aug/2025 15:29:21] "GET /api/v2/weightentry/?ordering=-date&limit=100 HTTP/1.1" 200 5930 web-1 | [29/Aug/2025 15:29:21] "GET /api/v2/routine/?limit=1000&is_template=false HTTP/1.1" 200 52 web-1 | level=WARNING ts=2025-08-29 15:29:21,689 module=log path=/home/wger/.local/lib/python3.12/site-packages/django/utils/log.py line=253 message=Forbidden: /api/v2/weightentry/ web-1 | [29/Aug/2025 15:29:21] "GET /api/v2/weightentry/?limit=100&offset=100&ordering=-date HTTP/1.1" 403 58 web-1 | [29/Aug/2025 15:29:21] "GET /api/v2/workoutsession/ HTTP/1.1" 200 52

i tried it with a dummy user, i can log in just fine with all the dummy data except weight entries, once i add those i consistently get the "credentials were not provided" error if there are over 100 entries. No such issues through web browserπŸ˜•

Ominus404 avatar Aug 29 '25 14:08 Ominus404

am i missing some setting that is throttling my api requests?

no, the compose file is the regular config we're using as well. Can you try deleting some weight entries to under 100 so this works and generating some measurement entries? This is really baffling...

rolandgeider avatar Aug 29 '25 14:08 rolandgeider

Tried a new dummy user, 100 dummy weight entries, dummy nutrition, dummy measurement categories, 300 measurement entries. no issues. added one more weight entry through app, it saved then i refreshed the app and got the credentials error. Removed the weight entry through browser so there are only 100 again and now i can log in on the app again no problem.

the rpi is a bit slow to load all the data on the web browser but it still works

Ominus404 avatar Aug 29 '25 16:08 Ominus404

Ok so it looks like this was a user error on my side and i should REALLY check the github more often for updates and changes.

I think i last got the docker compose and config files around the start of this year and just saw that you added a redis config 4 months ago, i updated my compose file with the missing stuff and downloaded the redis config and now my issue is gone. Looks like the missing redis config was the issue, i will now go through the prod.env file to make sure it is also up to date.

Sorry for wasting your time with this πŸ˜… πŸ˜…

Ominus404 avatar Aug 29 '25 17:08 Ominus404

@Ominus404 🀣🀣🀣 I mean, I'm happy that everything works, but the error still doesn't make any sense! But let's better not poke sleeping dogs...

BTW, if you can, you can try extending the compose config instead of editing it directly, then you can git pull the docker repo once in a while and you'll get everything new (mostly new configuration variables, they all have sane defaults, but you won't know they are there): https://wger.readthedocs.io/en/latest/production/docker.html#configuration

rolandgeider avatar Sep 03 '25 13:09 rolandgeider

Hi, well the issue is not gone for me. I extended the compose and env file. As long as i have max. 100 weight entries in the database, everything is fine. Adding just one more, the app fails to log in. Tested with clean volumes and new user added using AuthProxyMiddleware.

level=WARNING ts=*** module=log path=/home/wger/.local/lib/python3.12/site-packages/django/utils/log.py line=253 message=Bad Request: /api/v2/weightentry/

schacka avatar Sep 04 '25 16:09 schacka

I have increased the pagination size to 999, this is only a workaround, but will give us at least some time because I have no idea where this bug comes from

rolandgeider avatar Sep 05 '25 22:09 rolandgeider