flutter icon indicating copy to clipboard operation
flutter copied to clipboard

Error: MissingRequiredKeysException: Required keys are missing: created App Version: 1.5.7 Server Version: 2.2.0a3

Open bocklucas opened this issue 2 years ago • 28 comments

Steps to Reproduce

  1. Log into the app (I'm connected to a self hosted server running on my home assistant instance, addon I'm running can be found at https://github.com/alexbelgium/hassio-addons
  2. Create a new workout with name and days
  3. Go to the details page and add a new set
  4. Search for a workout

Expected results: I should get a list of exercises back

Actual results: Screenshot_20231016_220351.jpg

Home Assistant Logs
[17/Oct/2023 03:10:27] "GET / HTTP/1.0" 302 0
[17/Oct/2023 03:10:32] "GET / HTTP/1.0" 302 0
[17/Oct/2023 03:10:37] "GET / HTTP/1.0" 302 0
[17/Oct/2023 03:10:42] "GET / HTTP/1.0" 302 0
[17/Oct/2023 03:10:48] "GET / HTTP/1.0" 302 0
[17/Oct/2023 03:10:53] "GET / HTTP/1.0" 302 0
[17/Oct/2023 03:10:58] "GET / HTTP/1.0" 302 0
[17/Oct/2023 03:11:03] "GET / HTTP/1.0" 302 0
[17/Oct/2023 03:11:08] "GET / HTTP/1.0" 302 0
[17/Oct/2023 03:11:13] "GET / HTTP/1.0" 302 0
[17/Oct/2023 03:11:18] "GET / HTTP/1.0" 302 0
[17/Oct/2023 03:11:23] "GET / HTTP/1.0" 302 0
[17/Oct/2023 03:11:28] "GET / HTTP/1.0" 302 0
[17/Oct/2023 03:11:33] "GET / HTTP/1.0" 302 0
[17/Oct/2023 03:11:38] "GET / HTTP/1.0" 302 0
[17/Oct/2023 03:11:43] "GET / HTTP/1.0" 302 0
[17/Oct/2023 03:11:48] "GET / HTTP/1.0" 302 0
[17/Oct/2023 03:11:53] "GET / HTTP/1.0" 302 0
[17/Oct/2023 03:11:58] "GET / HTTP/1.0" 302 0
[17/Oct/2023 03:12:03] "GET / HTTP/1.0" 302 0
[17/Oct/2023 03:12:08] "GET / HTTP/1.0" 302 0
[17/Oct/2023 03:12:13] "GET / HTTP/1.0" 302 0
[17/Oct/2023 03:12:19] "GET / HTTP/1.0" 302 0
[17/Oct/2023 03:12:24] "GET / HTTP/1.0" 302 0
[17/Oct/2023 03:12:29] "GET / HTTP/1.0" 302 0
[17/Oct/2023 03:12:34] "GET / HTTP/1.0" 302 0
[17/Oct/2023 03:12:39] "GET / HTTP/1.0" 302 0
[17/Oct/2023 03:12:44] "GET / HTTP/1.0" 302 0
[17/Oct/2023 03:12:49] "GET / HTTP/1.0" 302 0
[17/Oct/2023 03:12:54] "GET / HTTP/1.0" 302 0
[17/Oct/2023 03:12:59] "GET / HTTP/1.0" 302 0
[17/Oct/2023 03:13:04] "GET / HTTP/1.0" 302 0
[17/Oct/2023 03:13:09] "GET / HTTP/1.0" 302 0
[17/Oct/2023 03:13:14] "GET / HTTP/1.0" 302 0
[17/Oct/2023 03:13:20] "GET / HTTP/1.0" 302 0
[17/Oct/2023 03:13:25] "GET / HTTP/1.0" 302 0
[17/Oct/2023 03:13:30] "GET / HTTP/1.0" 302 0
[17/Oct/2023 03:13:35] "GET / HTTP/1.0" 302 0
[17/Oct/2023 03:13:40] "GET / HTTP/1.0" 302 0
[17/Oct/2023 03:13:45] "GET / HTTP/1.0" 302 0
[17/Oct/2023 03:13:50] "GET / HTTP/1.0" 302 0
[17/Oct/2023 03:13:55] "GET / HTTP/1.0" 302 0
[17/Oct/2023 03:14:00] "GET / HTTP/1.0" 302 0
[17/Oct/2023 03:14:05] "GET / HTTP/1.0" 302 0
[17/Oct/2023 03:14:10] "GET / HTTP/1.0" 302 0
[17/Oct/2023 03:14:15] "GET / HTTP/1.0" 302 0
[17/Oct/2023 03:14:20] "GET / HTTP/1.0" 302 0
[17/Oct/2023 03:14:25] "GET / HTTP/1.0" 302 0
[17/Oct/2023 03:14:30] "GET / HTTP/1.0" 302 0
[17/Oct/2023 03:14:36] "GET / HTTP/1.0" 302 0
[17/Oct/2023 03:14:41] "GET / HTTP/1.0" 302 0
[17/Oct/2023 03:14:46] "GET / HTTP/1.0" 302 0
[17/Oct/2023 03:14:51] "GET / HTTP/1.0" 302 0
[17/Oct/2023 03:14:56] "GET / HTTP/1.0" 302 0
[17/Oct/2023 03:15:01] "GET / HTTP/1.0" 302 0
[17/Oct/2023 03:15:06] "GET / HTTP/1.0" 302 0
[17/Oct/2023 03:15:11] "GET / HTTP/1.0" 302 0
[17/Oct/2023 03:15:16] "GET / HTTP/1.0" 302 0
[17/Oct/2023 03:15:21] "GET / HTTP/1.0" 302 0
[17/Oct/2023 03:15:26] "GET / HTTP/1.0" 302 0
[17/Oct/2023 03:15:31] "GET / HTTP/1.0" 302 0
[17/Oct/2023 03:15:36] "GET / HTTP/1.0" 302 0
[17/Oct/2023 03:15:41] "GET / HTTP/1.0" 302 0
[17/Oct/2023 03:15:46] "GET / HTTP/1.0" 302 0
[17/Oct/2023 03:15:51] "GET / HTTP/1.0" 302 0
[17/Oct/2023 03:15:56] "GET / HTTP/1.0" 302 0
[17/Oct/2023 03:15:57] "GET /api/v2/exercise/search/?term=bench+press&language=en HTTP/1.0" 200 2698
[17/Oct/2023 03:15:57] "GET /api/v2/exercisebaseinfo/76/ HTTP/1.0" 200 3654
[17/Oct/2023 03:15:57] "GET /api/v2/exercisebaseinfo/73/ HTTP/1.0" 200 4816
[17/Oct/2023 03:15:57] "GET /api/v2/exercisebaseinfo/185/ HTTP/1.0" 200 2988
[17/Oct/2023 03:15:58] "GET /api/v2/exercisebaseinfo/186/ HTTP/1.0" 200 2036
[17/Oct/2023 03:15:58] "GET /api/v2/exercisebaseinfo/598/ HTTP/1.0" 200 1415
[17/Oct/2023 03:15:58] "GET /api/v2/exercisebaseinfo/537/ HTTP/1.0" 200 3763
[17/Oct/2023 03:15:58] "GET /api/v2/exercisebaseinfo/1041/ HTTP/1.0" 200 3128
[17/Oct/2023 03:15:58] "GET /api/v2/exercisebaseinfo/498/ HTTP/1.0" 200 1545
[17/Oct/2023 03:15:58] "GET /api/v2/exercisebaseinfo/539/ HTTP/1.0" 200 3591
[17/Oct/2023 03:15:58] "GET /api/v2/exercisebaseinfo/538/ HTTP/1.0" 200 4459
[17/Oct/2023 03:15:59] "GET /api/v2/exercise/search/?term=bench+press+&language=en HTTP/1.0" 200 1770
[17/Oct/2023 03:15:59] "GET /api/v2/exercisebaseinfo/76/ HTTP/1.0" 200 3654
[17/Oct/2023 03:15:59] "GET /api/v2/exercisebaseinfo/185/ HTTP/1.0" 200 2988
[17/Oct/2023 03:15:59] "GET /api/v2/exercisebaseinfo/186/ HTTP/1.0" 200 2036
[17/Oct/2023 03:15:59] "GET /api/v2/exercisebaseinfo/538/ HTTP/1.0" 200 4459
[17/Oct/2023 03:15:59] "GET /api/v2/exercisebaseinfo/537/ HTTP/1.0" 200 3763
[17/Oct/2023 03:15:59] "GET /api/v2/exercisebaseinfo/539/ HTTP/1.0" 200 3591
[17/Oct/2023 03:16:02] "GET / HTTP/1.0" 302 0
[17/Oct/2023 03:16:02] "GET /api/v2/exercise/search/?term=bench+press+&language=en HTTP/1.0" 200 1770
[17/Oct/2023 03:16:02] "GET /api/v2/exercisebaseinfo/76/ HTTP/1.0" 200 3654
[17/Oct/2023 03:16:02] "GET /api/v2/exercisebaseinfo/185/ HTTP/1.0" 200 2988
[17/Oct/2023 03:16:02] "GET /api/v2/exercisebaseinfo/186/ HTTP/1.0" 200 2036
[17/Oct/2023 03:16:02] "GET /api/v2/exercisebaseinfo/538/ HTTP/1.0" 200 4459
[17/Oct/2023 03:16:02] "GET /api/v2/exercisebaseinfo/537/ HTTP/1.0" 200 3763
[17/Oct/2023 03:16:02] "GET /api/v2/exercisebaseinfo/539/ HTTP/1.0" 200 3591
[17/Oct/2023 03:16:06] "GET /api/v2/exercise/search/?term=bench+press+&language=en HTTP/1.0" 200 1770
[17/Oct/2023 03:16:06] "GET /api/v2/exercisebaseinfo/185/ HTTP/1.0" 200 2988
[17/Oct/2023 03:16:06] "GET /api/v2/exercisebaseinfo/76/ HTTP/1.0" 200 3654
[17/Oct/2023 03:16:06] "GET /api/v2/exercisebaseinfo/538/ HTTP/1.0" 200 4459
[17/Oct/2023 03:16:06] "GET /api/v2/exercisebaseinfo/186/ HTTP/1.0" 200 2036
[17/Oct/2023 03:16:06] "GET /api/v2/exercisebaseinfo/537/ HTTP/1.0" 200 3763
[17/Oct/2023 03:16:06] "GET /api/v2/exercisebaseinfo/539/ HTTP/1.0" 200 3591
[17/Oct/2023 03:16:07] "GET / HTTP/1.0" 302 0

Let me know if more detail is needed, happy to provide it. Thanks!

bocklucas avatar Oct 17 '23 03:10 bocklucas

mhh, you are right! I'll take a look later today

rolandgeider avatar Oct 17 '23 09:10 rolandgeider

can you update the server and see if this keeps happening?

rolandgeider avatar Oct 17 '23 12:10 rolandgeider

can you update the server and see if this keeps happening?

Hmm I can try but that addon is out of my control, I could open an issue in that repo though.

bocklucas avatar Oct 17 '23 14:10 bocklucas

can you update the server and see if this keeps happening?

Hmm I can try but that addon is out of my control, I could open an issue in that repo though.

Yeah looks like I'd have to open a ticket in their repo, I'll do that today and post it here

bocklucas avatar Oct 17 '23 15:10 bocklucas

Great thank you!

Can you tag me as well?

rolandgeider avatar Oct 17 '23 16:10 rolandgeider

Great thank you!

Can you tag me as well?

Absolutely 😁

bocklucas avatar Oct 17 '23 17:10 bocklucas

Took a look at the code prior to making an issue, it appears it's supposed to pull the latest docker image and I saw it was recently updated on docker, clearing my local machine and trying again

bocklucas avatar Oct 17 '23 18:10 bocklucas

Took a look at the code prior to making an issue, it appears it's supposed to pull the latest docker image and I saw it was recently updated on docker, clearing my local machine and trying again

Hmm still having issues, will have to dig into this in a few hours, the wger code in the addon says it's pulling from the latest wger server docker image but I'm still having that issue so may still have to open a ticket but I'll be sure to tag you regardless

bocklucas avatar Oct 17 '23 18:10 bocklucas

We merged a PR yesterday that bumped the version to 2.2.0a3, so you should be able to check if it did in fact pull a new image

rolandgeider avatar Oct 17 '23 18:10 rolandgeider

I mean 2.2.0a4 😄

rolandgeider avatar Oct 17 '23 18:10 rolandgeider

Hmmm for the life of me I can not get it to version 2.2.0a4, its on 2.2.0a3 Screenshot from 2023-10-17 18-52-09

I've tried uninstalling and doing a fresh build several times but with no luck

bocklucas avatar Oct 17 '23 23:10 bocklucas

Hey @rolandgeider , quick update for you, I finally ended up deploying the docker-compose setup on another server instead of using the Home Assistant addon and am now seeing this, are you able to replicate? Screenshot_20231028_081122.jpg

bocklucas avatar Oct 28 '23 13:10 bocklucas

I might have seen this before but could never really reproduce it, does this alway happen to you or only sometimes?

rolandgeider avatar Oct 28 '23 14:10 rolandgeider

Oh interesting, yeah this is happening all the time

bocklucas avatar Oct 28 '23 17:10 bocklucas

@rolandgeider will this require server side fixes or flutter fixes do you think?

bocklucas avatar Oct 29 '23 16:10 bocklucas

I'd guess this is a flutter problem, we're probably not handling some corner case properly

rolandgeider avatar Oct 29 '23 16:10 rolandgeider

We'll not a corner case for you 😄😄

rolandgeider avatar Oct 29 '23 16:10 rolandgeider

I just setup a brand new wger instance, using the docker procedure. First login using the mobile app, installed from fdroid, I get this error.

nvm: I reran sync-exercises and the error has gone away.

justinkirby avatar Nov 06 '23 20:11 justinkirby

@justinkirby are you able to elaborate what steps you took to rerun sync-exercises? 🙏

bocklucas avatar Nov 08 '23 03:11 bocklucas

@bocklucas you mean manually triggering the sync? You can just do docker compose exec web python3 manage.py sync-exercises

rolandgeider avatar Nov 08 '23 13:11 rolandgeider

@bocklucas you mean manually triggering the sync? You can just do docker compose exec web python3 manage.py sync-exercises

@rolandgeider correct yeah. Ooo awesome, OK I'll try that, not sure how that'll work in the Home Assistant setup but I'll give that a crack, thanks 😀

bocklucas avatar Nov 08 '23 13:11 bocklucas

I've used wger.de with my browser for a few days, today I downloaded the app. I am using the default server with android wger 1.5.6 - downloaded from F-Droid. I'm on Android 13. I'm getting the same error.

Also, every time I open the app,

  • My weight logs do not appear on mobile. If I add an entry I'm able to pull down (triggering a refresh) - this updates the graph with the logs added from the website.
  • My "workout plans" do not appear on mobile. If I add an entry I'm able to pull down (triggering a refresh) - this updates the list with the workouts added from the website. When I press on one of them, it's empty (probably because it can't get the exercises)

horseDeveloper avatar Nov 22 '23 06:11 horseDeveloper

hi! There should be a new version published on fdroid soon (as in it's been built, it just need to show up), can you try it with it once it's available?

rolandgeider avatar Nov 22 '23 06:11 rolandgeider

I just started with wger so I haven't logged any workouts yet, I'm just adding the exercises and testing things out, so I can't tell you anything about logging exercises yet. Good job :)

YESTERDAY - Quickly tested it, everything seems to work. Workouts come up, you can add exercises, weight logs are displayed. Everything comes up correctly as soon as I open the app, no need to pull-down-to-refresh .

TODAY - Weight logs are still displayed. Previously added workouts are correctly listed on mobile, but they have no exercises. I was able to add ONE exercise but after that one, now I get this error: Error: MissingRequiredKeysException: Required keys are missing: exercise_base.

TODAY PT.2 - I deleted data and cache, logged back in. Weight logs are still displayed. Previously added workouts are correctly listed on mobile, but they have no exercises. The exercise I added earlier has disappeared (but is visible from the website). Error: MissingRequiredKeysException: Required keys are missing: exercise_base

horseDeveloper avatar Nov 24 '23 18:11 horseDeveloper

For me I also get the error using the main instance. Anyway to solve this?

Vcele avatar Dec 20 '23 16:12 Vcele

I am also getting this error, and when I try to sync exercises I get an error saying one of the exercises is too long 200 chars? could someone have contributed one that is blowing everyone's instance up?

image

image

mikekay1 avatar Jan 05 '24 19:01 mikekay1

It's so sad, that wger is our only option for this, I honestly feel like this application could be rebuilt ground up. I am a DBA if anyone is interested in forking it. I cant believe there is no self hosted solution for something like this :(

mikekay1 avatar Jan 05 '24 19:01 mikekay1

turns out, we were writing garbage to the alias field, am cleaning it up right now but the sync should work again

rolandgeider avatar Jan 06 '24 12:01 rolandgeider