Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exercise added with SQL not shown on android app, only grey screen. #1399

Open
erikderzweite opened this issue Jul 30, 2023 · 4 comments
Open

Comments

@erikderzweite
Copy link

erikderzweite commented Jul 30, 2023

Self-hosted docker image of wger with nginx/traefik.

I have a database of exercises for my Bio Force, I try to add them with SQL, on the webpage they are shown ok-ish, but on the android app I get grey screen only.

Steps to Reproduce

  1. add an exercise as follows:
INSERT INTO exercises_equipment VALUES ( '12', 'Fußschlaufen');
INSERT INTO exercises_equipment VALUES ( '13', 'Handgriffe');
INSERT INTO exercises_equipment VALUES ( '14', 'Latzugstange');
INSERT INTO exercises_equipment VALUES ( '15', 'Sitz');
INSERT INTO exercises_equipment VALUES ( '16', 'Beinstrecker');
INSERT INTO exercises_exercisebase VALUES ('3001', 'HAMMER SPORT AG', '9', 2, NULL, 'ae83749b-273b-ff12-7814-56fea441efe3', '2023-07-30', '2023-07-30 19:07:52.205965+0200', '', '', '', '' );
INSERT INTO exercises_exercise VALUES (3001, 'HAMMER SPORT AG', '<p>START: Stehen Sie mit sicherem Stand zum Gerät hin. Halten Sie die unteren Handgriffe auf Schulterhöhe. </p><p>BEWEGUNG: In die Knie gehen, bis Oberschenkel parallel zum Boden sind. Anspannung kurz halten und zur Ausgangsposition zurückkehren. </p><p>TIPPS: Knie auf gleicher Höhe mit den Füßen halten. Gewicht auf den ganzen Fuß verteilen, nicht nur auf Zehen oder Fersen. Oberkörper während der kompletten Übung gerade halten. </p><p>Schwierigkeit: Anfänger </p>', 'KNIEBEUGEN ', '2023-07-30', '1', 2, 'ae83749b-273b-ff12-7814-56fea441efe3', '3001', '2023-07-30 19:07:52.205965+0200', '', '', '', '' );
INSERT INTO exercises_exerciseimage VALUES (400, 'HAMMER SPORT AG', 'exercise-images/renamed_images/44-1.gif', 't', '3001', 2, '5c43079b-13e2-4744-593b-d172758fa803', 4 , '', '', '', '');
INSERT INTO exercises_exerciseimage VALUES (401, 'HAMMER SPORT AG', 'exercise-images/renamed_images/44-1-pulleys.png', 'f',  '3001', 2, '9affbec5-e651-fdaf-5729-cba0b73c8bb9', 4 , '', '', '', '');
INSERT INTO exercises_exerciseimage VALUES (402, 'HAMMER SPORT AG', 'exercise-images/renamed_images/44-1-1.png', 'f',  '3001', 2, '42389e22-547b-8797-4612-ce9d5168cdb5', 4 , '', '', '', '');
INSERT INTO exercises_exerciseimage VALUES (403, 'HAMMER SPORT AG', 'exercise-images/renamed_images/44-1-2.png', 'f',  '3001', 2, 'f66a37fd-a774-c1b7-86b1-32a5760cb9e2', 4 , '', '', '', '');
INSERT INTO exercises_exercisebase_equipment VALUES ('500', '3001', '11' );
INSERT INTO exercises_exercisebase_equipment VALUES ('501', '3001', '13' );
INSERT INTO exercises_exercisebase_muscles VALUES ('600', '3001', '10' );
INSERT INTO exercises_exercisebase_muscles VALUES ('601', '3001', '8' );
INSERT INTO exercises_exercisebase_muscles VALUES ('602', '3001', '7' );

INSERT INTO exercises_exercise VALUES (3002, 'HAMMER SPORT AG', '<p>START:  Stand facing frame. Feet hip width apart on base. Grip handles at shoulders. </p><p>Motion:  Flex knees, hips and ankles. Lower until thighs are parallel to floor or slightly higher. Press up to starting position. </p><p>TIPS:  Keep knees in line with toes. Center weight over arches, not toes or heels. Lift chest and keep back straight as hips lower. Keep head lifted and in line with spine. Contract abdominals to stabilize back. </p><p>DIFFICULTY:  Beginner </p>', 'SQUAT ', '2023-07-30', 2, 2, 'f9f74dec-9ae5-7b55-69ed-e7977657baa4', '3001', '2023-07-30 19:07:52.205965+0200', '', '', '', '' );
  1. Add exercise to a routine and view it on android app.

Expected results:
The exercise is shown

Actual results:
Grey screen

Don't really see anything suspicious in the logs. Could one maybe reproduce the issue?

Did try to add an exercise without images altogether, same effect.

@rolandgeider
Copy link
Member

Hi! Ah, you are adding new equipment! My first idea is that the mobile app caches these things more aggressively, while the mobile app loads everything on demand, but I'd need to check (and before you ask, currently there isn't a way in the app to force a cache refresh 😅)

@erikderzweite
Copy link
Author

erikderzweite commented Jul 31, 2023

Deleting and re-installing wger app did not help. The exercises were showing in the 1.4.* versions of the mobile app just fine. I tried installling the old version, but it does not work correctly with my docker instance.

Is the way I try to add exercises via SQL correct? Or am I missing some vital table?

@erikderzweite
Copy link
Author

The issue still persists. Is there a specific format needed like webp with a certain resolution? Is png a wrong format to use?

@erikderzweite
Copy link
Author

Update: if I create the excersise with exactly the same pictures via webgui, then the overview page shows just fine. For the exercises added via SQL: grey screen. I see nothing in the logs, any idea how I could debug it?

A broader question: how do I batch-add exercises to wger?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants