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

[PROD][STAGING] Applet builder of existing Flanker applet is blank #910

Open
natalia-muzyka opened this issue Jun 13, 2022 · 41 comments · May be fixed by ChildMindInstitute/mindlogger-backend#1311

Comments

@natalia-muzyka
Copy link

natalia-muzyka commented Jun 13, 2022

This task is in the priority issues to fix:
https://docs.google.com/spreadsheets/d/1efWyMMU0_jC-A42l3P3anAS5Y8aLNbmKkGuzyRt9n0w/edit#gid=0&range=B3

The issue affects only the very first protocol URL of the Flanker and responses that were collected before the release in July'22:
v1: https://raw.githubusercontent.com/mtg137/Flanker_applet/master/protocols/flanker/flanker_schema

It is not reproduced for applets/activities that were created with the second URL, as well as with the latest one:
v2: https://raw.githubusercontent.com/mtg137/Flanker_applet/staging/protocols/flanker/flanker_schema
v3: https://raw.githubusercontent.com/ChildMindInstitute/mindlogger-flanker-applet/master/protocols/flanker/flanker_schema

For the applets and activities, that were created with the very first Flanker URL or via adding the very first version of the Flanker_360 activity(non-configurable) in the builder we have the following issues on production:

1 - activity is not editable on the admin panel
Screenshot: https://images.zenhubusercontent.com/60ab57c8916945b978a3da92/ca378c40-af9c-48a8-9054-d782c74eee49

2 - app is crashed after tapping on the activity on the mobile app (iOS, Android)
Video: https://www.screencast.com/t/ZVrMmm1XFU

3 - export displays the trial type "q1" instead of the appropriate trial type (<<<<<, etc)
Screenshot: https://images.zenhubusercontent.com/60ab57c8916945b978a3da92/4b8f0d58-7dd4-49ee-8b0c-438d7df07ebe

4 - export is missing response_touch_timestamp values
Screenshot: https://images.zenhubusercontent.com/60ab57c8916945b978a3da92/97597b99-a115-4ff4-a217-0665f271db09

Environment:
https://admin-staging.mindlogger.org/
Win 10 / Chrome 102
ml_general_acc@protonmail.com 12345678
Cognitive tasks (final version)
Applet password Qwe123!!!

https://admin.mindlogger.org/
Win 10 / Chrome 108
anita_ml@protonmail.com qwe123!!!
Flanker_360 test
ml_general_acc@protonmail.com 12345678
Flanker_360, Flanker_360 (1)
Applet password Qwe123!!!

@jj105
Copy link
Contributor

jj105 commented Jun 13, 2022

I think existing flankers are not working on staging environment, because we updated schema of flanker items.

We didn't update github for existing flanker applets to new schema because github url is used in production as well.
I think we need to use this url for creating and editing flanker applets on staging for now

the schema of existing flanker applet will be updated on github after we release milestone 15 to production.
after that, users will be able to configure legacy flanker applets after they refresh applets.

@natalia-muzyka
Copy link
Author

@jj105 this issue is reproducible on the existing activities too,
will they be updated as well?

@jj105
Copy link
Contributor

jj105 commented Jun 14, 2022

@natalia-muzyka I think only applets linked to github url will be updated

@natalia-muzyka
Copy link
Author

@jj105 in this case is it possible to not show the "Edit" button on the activities which were created before the milestone 15 deployment?

cc: @WorldImpex

@jj105
Copy link
Contributor

jj105 commented Jun 14, 2022

we can do it for just flanker applets on staging.

@natalia-muzyka
Copy link
Author

@jj105 , yes, right, I mean to hide this Edit button on staging to prevent the same issue on prod after deployment

@jj105
Copy link
Contributor

jj105 commented Jun 15, 2022

I think the issue won't be reproducible on prod after deployment.
we are having issue on staging because url of configurable flanker is different from original flanker.

We can overwrite original flanker with new one after deployment.

@natalia-muzyka
Copy link
Author

natalia-muzyka commented Jun 15, 2022

@jj105 thank you for the clarification! Moving this ticket to QA Prod to make sure that the existing activities work as expected on prod after milestone 15 deployment.

cc: @WorldImpex

@natalia-muzyka
Copy link
Author

Previous version (milestone 14) of Flanker applet and activity is blank in the builder.
App crashes after an attempt to open it.
Original Flanker should be overwritten to fix this issue, as Ihor mentioned above.
Or we need to warn about this our stakeholders and ask to install a new protocol version to continues useing flanker applet.
cc: @WorldImpex

image.png

Environment:
https://admin.mindlogger.org/
Win 10 / Chrome 103
anita_ml@protonmail.com qwe123!!!
My mixed applet (with cognitive tasks)

@natalia-muzyka
Copy link
Author

To create a Flanker applet it needs to be uploaded with a GitHub protocol URL.
To create a Flanker activity it needs to be added manually in the applet builder (Add activity - Cognitive activity - Simple choice & reaction time task builder). Activity actually is created based on the protocol.
In Milestone 16 the new protocol was created for staging to avoid issues with existing applets on production.
To not let users loose their existing Flanker applets and activities after deployment to production, Ihor was going to overwrite the old version of protocol with a new one.

OLD Flanker protocol URL:
https://raw.githubusercontent.com/mtg137/Flanker_applet/master/protocols/flanker/flanker_schema

NEW Flanker protocol URL:
https://raw.githubusercontent.com/mtg137/Flanker_applet/staging/protocols/flanker/flanker_schema

@WorldImpex WorldImpex assigned karser and unassigned jj105 Aug 2, 2022
@natalia-muzyka
Copy link
Author

natalia-muzyka commented Aug 4, 2022

Cognitive applets CST touch, CST tilt and A/B Trails show an infinity loader after an attempt to edit applet.

Expected:
Stability_tracker_applet should contain Stability_Task_gyro editable activity.
Stability_tracker_applet_touch applet should contain Stability_Task_touch editable activity.
A-B-Trails should contain Trails_Mobile and Trails_iPad non-editable activities (with no edit button on the activity card).

To see how they look they can be created manually with the builder: Add activity - Cognitive activity - ...

Old URLs:
https://raw.githubusercontent.com/mtg137/Stability_tracker_applet/master/protocols/stability/stability_schema
https://raw.githubusercontent.com/mtg137/Stability_tracker_applet_touch/master/protocols/stability/stability_schema
https://raw.githubusercontent.com/ChildMindInstitute/A-B-Trails/main/protocols/ab_trails/ab_trails_schema

New URLs:

  1. https://raw.githubusercontent.com/ChildMindInstitute/stability_tilt_applet_schema/master/protocols/stability/stability_schema
  2. https://raw.githubusercontent.com/ChildMindInstitute/stability_touch_applet_schema/main/protocols/stability/stability_schema
  3. https://raw.githubusercontent.com/ChildMindInstitute/mindlogger-trails-task/main/protocols/ab_trails/ab_trails_schema

@natalia-muzyka
Copy link
Author

Sometimes I see 403 error, but mostly there are no errors, only infinity loader. Video: https://www.screencast.com/t/IewiPrPXC

@natalia-muzyka
Copy link
Author

@karser @WorldImpex was the script applied to legacy applets and activities or ticket was accidentally moved to ready for QA? I still see empty builders in the legacy single flanker activities and applets:

image.png

Environment:
https://admin-staging.mindlogger.org/
Win 10 / Chrome 102
ml_general_acc@protonmail.com 12345678
Flanker_360, Cognitive tasks (final version)
Applet password Qwe123!!!

@karser
Copy link
Contributor

karser commented Sep 24, 2022

@natalia-muzyka I wrote a script that fixes the Flanker activity without re-import.
I fixed the Flanker activity in Cognitive tasks (final version) applet. It is editable and there are no errors in the console.
Please check. If all is good, let's test with 1-2 more broken activities. And then against the entire database.
image

@natalia-muzyka
Copy link
Author

natalia-muzyka commented Sep 26, 2022

@karser I see content in the builder doesn't match the default Flanker activity. Because of that, on iOS - The app crashes after starting a Flanker test. On Android - There is a blank screen after starting a Flanker test.

image.png

Expected result:
For all the old protocol activities content should be a default. Content should match the applet created with the latest protocol.
The old configurable Flanker protocol and the latest protocol activities shouldn't be affected by the script.

Old protocol (Flanker applet, Flanker non-configurable activity): https://raw.githubusercontent.com/mtg137/Flanker_applet/master/protocols/flanker/flanker_schema

Old configurable Flanker protocol:
https://raw.githubusercontent.com/mtg137/Flanker_applet/staging/protocols/flanker/flanker_schema

The latest protocol:
https://raw.githubusercontent.com/ChildMindInstitute/mindlogger-flanker-applet/master/protocols/flanker/flanker_schema

Environment:
https://admin-staging.mindlogger.org/
Win 10 / Chrome 102
ml_general_acc@protonmail.com / 12345678 --- Cognitive tasks (final version)
jeraka1732@wodeda.com / 1234567890 --- Cognitive activities / Flanker_360, Flanker_360 (1)
jeligi9407@zneep.com / 123456 --- Cognitive tasks v2.0 (import) / Flanker_360
Applet password: Qwe123!!!

@karser
Copy link
Contributor

karser commented Sep 26, 2022

This activity is fixed and should work now
image.png

@natalia-muzyka
Copy link
Author

natalia-muzyka commented Sep 27, 2022

@karser builder and export look fine, but there are two new issues only for this particular activity on the mobile app side:

1 - iOS, Android - Flanker threshold doesn't work, video: https://www.screencast.com/t/bynYcDFnAd
Actual: There is a 75% default threshold on the builder side, but it has no impact on the app. User gets 73% accuracy, fails the practice, but proceeds to the main Test.
Expected: User has 3 attempts in the practice.
After failing the 1 or 2 attempts (a threshold of 75% is not met) user restarts the practice, like here in the video: https://www.screencast.com/t/B66nUxhh
After failing or passing the 3rd attempt there should be a redirect to the main test anyway.
If attempt 1st or 2nd was passed, then the user proceeds to the main test without the next practice attempt.

2 - Android - quantity of screens doesn't match the builder, video: https://www.screencast.com/t/KTGhUDeTzT
Screenshot(report): https://images.zenhubusercontent.com/60ab57c8916945b978a3da92/8e8e000d-50bc-4658-b9bf-4ca07ab24a35
Actual: On the app side there are 150 stimulus screens in the practice block and 1200 stimulus screens in every test block.
Expected: There are 30 stimulus screens for every practice block and 120 stimulus screens for every test block on the builder side and in the app.

None of the issues are reproduced on:

  • Flanker 360 (2) applet (the latest protocol, created 26.09) - applet Flanker_360 (2)
  • new config flanker activity (created 27.09) - applet New cognitive tasks

Environment:
ML v0.21.48, 0.21.52 staging
iPhone 13 // iOS 15.6
Google Pixel 5a // Android 11
ml_general_acc@protonmail.com / 12345678 --- Cognitive tasks (final version)
Applet password: Qwe123!!!

karser added a commit to ChildMindInstitute/mindlogger-backend that referenced this issue Sep 29, 2022
karser added a commit to ChildMindInstitute/mindlogger-backend that referenced this issue Dec 20, 2022
@natalia-muzyka
Copy link
Author

@karser recently converted activities are broken in the app:

Video 1 (crash after meeting threshold instead of proceeding to main test phase): https://www.screencast.com/t/7tNAlPm1Tu5
Video 2 (main test phase is started instead of restarting practice after failing the threshold): https://www.screencast.com/t/3dpohHIWDq

jeligi9407@zneep.com / 123456

applet Cognitive tasks (4) 627d1e2de50eef3d5567ee55 activity Flanker_360 (37) 627d1e26e50eef3d5567edf6
applet Flanker check 627e62ffe50eef1fcdb5ab9e activity Flanker_360 (42) 627e62fde50eef1fcdb5ab85
applet Flanker test 62a218ec768003624ea331f5 activity Flanker_360 (69) 62a218e9768003624ea331dc
applet Flanker test v2 62a7539e768003624ea3375b activity Flanker_360 (74) 62a7539b768003624ea33742
applet Flanker test V3 62a8a7cc768003624ea3389d activity Flanker_360 (75) 62a8a7c8768003624ea33884
applet Flanker v4 62ab3330768003624ea33ca4 activity Flanker_360 (83) 62ab332c768003624ea33c8b
applet Flanker V5 62b5bf9676800332ad4ea032 activity Flanker_360 (103) 62b5bf9176800332ad4ea011

ML v0.21.74 staging
iPhone 7 // iOS 13.1.1
Google Pixel 5a // Android 11

karser added a commit to ChildMindInstitute/mindlogger-admin-OLD-Vue that referenced this issue Dec 22, 2022
@karser
Copy link
Contributor

karser commented Dec 23, 2022

@natalia-muzyka I fixed it and I was able to complete the flanker for Cognitive tasks. Please test.
The problem was I invalidated the cache for activity but not for the applet.
I applied my fix for the following applets:

get_activities_for_account for jeligi9407@zneep.com / 123456
applet Cognitive tasks (4) 627d1e2de50eef3d5567ee55 activity Flanker_360 (37) 627d1e26e50eef3d5567edf6 - DONE
applet Flanker check 627e62ffe50eef1fcdb5ab9e activity Flanker_360 (42) 627e62fde50eef1fcdb5ab85 - DONE
applet Flanker test 62a218ec768003624ea331f5 activity Flanker_360 (69) 62a218e9768003624ea331dc - DONE
applet Flanker test v2 62a7539e768003624ea3375b activity Flanker_360 (74) 62a7539b768003624ea33742 - DONE
applet Flanker test V3 62a8a7cc768003624ea3389d activity Flanker_360 (75) 62a8a7c8768003624ea33884 DONE
applet Flanker v4 62ab3330768003624ea33ca4 activity Flanker_360 (83) 62ab332c768003624ea33c8b DONE
applet Flanker V5 62b5bf9676800332ad4ea032 activity Flanker_360 (103) 62b5bf9176800332ad4ea011 DONE

karser added a commit to ChildMindInstitute/mindlogger-backend that referenced this issue Dec 23, 2022
@natalia-muzyka
Copy link
Author

applet Cognitive tasks (4) 627d1e2de50eef3d5567ee55 activity Flanker_360 (37) 627d1e26e50eef3d5567edf6 - DONE - VERIFIED
applet Flanker check 627e62ffe50eef1fcdb5ab9e activity Flanker_360 (42) 627e62fde50eef1fcdb5ab85 - DONE - VERIFIED
applet Flanker test 62a218ec768003624ea331f5 activity Flanker_360 (69) 62a218e9768003624ea331dc - DONE - VERIFIED
applet Flanker test v2 62a7539e768003624ea3375b activity Flanker_360 (74) 62a7539b768003624ea33742 - DONE
applet Flanker test V3 62a8a7cc768003624ea3389d activity Flanker_360 (75) 62a8a7c8768003624ea33884 DONE
applet Flanker v4 62ab3330768003624ea33ca4 activity Flanker_360 (83) 62ab332c768003624ea33c8b DONE
applet Flanker V5 62b5bf9676800332ad4ea032 activity Flanker_360 (103) 62b5bf9176800332ad4ea011 DONE

@natalia-muzyka
Copy link
Author

natalia-muzyka commented Dec 27, 2022

1 - it is not possible to save any changes (even applet description) in the applets with the recently converted activities,
video: https://www.screencast.com/t/knDgShR9

jeligi9407@zneep.com / 123456 / Cognitive tasks, Flanker check, Flanker test v2
ml_general_acc@protonmail.com / 12345678 / Flanker_360, Flanker_360 (1)

2 - Flanker activity is missing in the applet builder for some of the non-converted applets (previously fixed), and converted the last time. Export is missing as well, but in the mobile app activity is present,
video: https://www.screencast.com/t/HIDxWPuFEcFM

jeligi9407@zneep.com / 123456
/ My applet (import) - activity Flanker_360 - non-converted last time
/ Flanker test - activity Flanker_360 (new) (url/png button images) - converted last time

Applets passwords: Qwe123!!!

karser added a commit to ChildMindInstitute/mindlogger-backend that referenced this issue Dec 27, 2022
karser added a commit to ChildMindInstitute/mindlogger-backend that referenced this issue Dec 27, 2022
karser added a commit to ChildMindInstitute/mindlogger-backend that referenced this issue Dec 27, 2022
karser added a commit to ChildMindInstitute/mindlogger-backend that referenced this issue Dec 27, 2022
karser added a commit to ChildMindInstitute/mindlogger-backend that referenced this issue Dec 27, 2022
karser added a commit to ChildMindInstitute/mindlogger-backend that referenced this issue Dec 27, 2022
karser added a commit to ChildMindInstitute/mindlogger-backend that referenced this issue Dec 27, 2022
karser added a commit to ChildMindInstitute/mindlogger-backend that referenced this issue Dec 29, 2022
@natalia-muzyka
Copy link
Author

natalia-muzyka commented Dec 29, 2022

@karser Cognitive tasks applet on jeligi9407 account is editable now.
But there are new issues. Changes in the Flanker_360 activity are applied only to practice #1 and tests.
Practice #2 and #3 are still displaying default content.

On the video I'm showing what was changed (threshold, some stimulus screens were deleted, randomize turned off), and how it looks in the app.

The issue is fixed after log out - log in

Video: https://www.screencast.com/t/qU9ESCWm

Reproduced on:
jeligi9407@zneep.com / 123456
applet: Cognitive tasks
activity: Flanker_360
ML v.0.21.76 staging

Not reproduced on:
jeligi9407@zneep.com / 123456 /
New Flanker, Simple & Choice Reaction Time Task Builder
Flanker_360 (3), Flanker_360
ML v.0.21.76 staging

@natalia-muzyka
Copy link
Author

@karser
2 - Flanker activity is missing in the applet builder for some of the non-converted applets (previously fixed), and converted the last time. Export is missing as well, but in the mobile app activity is present,
video: https://www.screencast.com/t/HIDxWPuFEcFM

jeligi9407@zneep.com / 123456
/ My applet (import) - activity Flanker_360 - non-converted last time
/ Flanker test - activity Flanker_360 (new) (url/png button images) - converted last time

Applets passwords: Qwe123!!!

karser added a commit to ChildMindInstitute/mindlogger-backend that referenced this issue Jan 4, 2023
karser added a commit to ChildMindInstitute/mindlogger-backend that referenced this issue Jan 4, 2023
karser added a commit to ChildMindInstitute/mindlogger-backend that referenced this issue Jan 4, 2023
karser added a commit to ChildMindInstitute/mindlogger-backend that referenced this issue Jan 4, 2023
karser added a commit to ChildMindInstitute/mindlogger-backend that referenced this issue Jan 4, 2023
karser added a commit to ChildMindInstitute/mindlogger-backend that referenced this issue Jan 4, 2023
karser added a commit to ChildMindInstitute/mindlogger-backend that referenced this issue Jan 4, 2023
karser added a commit to ChildMindInstitute/mindlogger-backend that referenced this issue Jan 4, 2023
@natalia-muzyka
Copy link
Author

natalia-muzyka commented Jan 4, 2023

@binarybottle please, take a look at the info in the ticket.

We have already fixed these issues on staging:
3 - export displays the trial type "q1" instead of the appropriate trial type (<<<<<, etc)
4 - export is missing response_touch_timestamp values

But still having new issues after an attempt to fix the:
1 - activity is not editable on the admin panel
2 - app is crashed after tapping on the activity on the mobile app (iOS, Android)

So far it looks like these are the last issues that are blocking us from release.
Question: is it acceptable to proceed with only export fixes for the old Flanker to meet the planned deadline?
The latest version of Flanker works as expected.

cc: @karser

@natalia-muzyka natalia-muzyka changed the title Applet builder of existing Flanker applet is blank [PROD][STAGING] Applet builder of existing Flanker applet is blank Jan 4, 2023
karser added a commit to ChildMindInstitute/mindlogger-backend that referenced this issue Jan 5, 2023
@karser
Copy link
Contributor

karser commented Jan 5, 2023

@natalia-muzyka I fixed the applet not being updated in mobile app, now it should be correct
jeligi9407@zneep.com / 123456 / Cognitive tasks

  • There was a bug in the 910 branch. You were editing this applet and it failed in the middle of the saving process. As a result it didn't set the identifier for items and remained applet.editing=True
  • I fixed the bug and marked applet.editing = False
  • because of the missing identifier for items it stopped keeping history for those items. That's why they didn't update properly in the mobile app for the "get only changed items" API method.
    image
  • Now I fixed the identifier in items and added to code handling the incorrect history items.

@karser Cognitive tasks applet on jeligi9407 account is editable now. But there are new issues. Changes in the Flanker_360 activity are applied only to practice #1 and tests. Practice #2 and #3 are still displaying default content.

On the video I'm showing what was changed (threshold, some stimulus screens were deleted, randomize turned off), and how it looks in the app.

The issue is fixed after log out - log in

Video: https://www.screencast.com/t/qU9ESCWm

Reproduced on: jeligi9407@zneep.com / 123456 applet: Cognitive tasks activity: Flanker_360 ML v.0.21.76 staging

Not reproduced on: jeligi9407@zneep.com / 123456 / New Flanker, Simple & Choice Reaction Time Task Builder Flanker_360 (3), Flanker_360 ML v.0.21.76 staging

@natalia-muzyka
Copy link
Author

@karser The applet is updated in mobile app now right after refresh.
Verified as fixed on: jeligi9407@zneep.com / 123456 applet: Cognitive tasks activity: Flanker_360 ML v.0.21.79 staging

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

Successfully merging a pull request may close this issue.

5 participants