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

Some activity schedules cause push notifications to break #94

Closed
avaidyam opened this issue Jan 13, 2021 · 19 comments
Closed

Some activity schedules cause push notifications to break #94

avaidyam opened this issue Jan 13, 2021 · 19 comments
Assignees
Labels
backend LAMP-server, LAMP-worker, and LAMP-app-gateway bug Something isn't working NO ETA No "days of effort required" assigned yet

Comments

@avaidyam
Copy link
Member

avaidyam commented Jan 13, 2021

Collaborator: We noticed the notifications stopped coming through for two of our surveys. Because there is no option to set the schedule for just Monday-Friday and Saturday-Sunday, we've had to enter the schedule as separate weekly notifications. We are not sure if setting the schedule this way was the reason the notification stopped coming through or if it's due to something else. The notifications stopped last Tuesday (12/29/2020). We created new surveys called "Weekday Combined Surveys" and Weekend Combined Surveys".
image

A related issue: Notifications for "Weekend Combined Surveys", set to for a schedule on the weekends are now appearing on weekdays. I have attached a picture of the schedule for reference.
image

@avaidyam avaidyam added bug Something isn't working NO ETA No "days of effort required" assigned yet backend LAMP-server, LAMP-worker, and LAMP-app-gateway labels Jan 13, 2021
@Linoy339
Copy link

@avaidyam . We will test this scenario again.
We couldn't find much from app-gateway logs. . Also, can you give some logs, activity id or redis details to login?

@avaidyam
Copy link
Member Author

@Linoy339 Unfortunately I don't have any other info from the collaborator. Could you try to recreate these schedules in the staging server and test that perhaps?

@avaidyam
Copy link
Member Author

avaidyam commented Jan 13, 2021

Here is a screen recording of a relevant issue where notifications are being received but not opening correctly:

Video.MOV

@Linoy339
Copy link

Linoy339 commented Jan 13, 2021

@avaidyam .Yes, we will do it as priority.
Also we have fixed an issue regarding notification which you merged yesterday(#fixes notification - excluding type as open_page). The issue was that device details for the participant was not fetched properly, as first data comes from the db will be open_page(This was done some days before in the front end to save open_page as type in sensor_event) in some scenario.
Can you ask them to update all these schedules without making any change (update simply as it is) and check whether its getting or not?
or else you can recreate schedules by restarting the server, so that ActivitySchedulerJob will create all schedules in cache again.
If its their server, we have to update it with our latest lamp-server code.

@Linoy339
Copy link

Linoy339 commented Feb 3, 2021

@avaidyam This issue couldn't be reproduced.

@avaidyam
Copy link
Member Author

avaidyam commented Feb 3, 2021

@Linoy339 Can you share the testing method or configuration that failed to reproduce the issue? (Or a screen recording, etc. if also available.)

@Linoy339
Copy link

Linoy339 commented Feb 4, 2021

@avaidyam. We have tested with same scenario: An activity called WeekDay_Mon_Fri was created and schedules were created from monday to friday and an activity named WeekEnds_Sat_Sun was also created to trigger in saturday and sunday.
It was triggering notifications properly.
Can you clarify: Do the issue still exists for them?

We will continue testing this week too and will update the further details.
Following is the scenario which we tested :
Weekday_End_Notifications

@avaidyam
Copy link
Member Author

avaidyam commented Feb 4, 2021

Yes - the issue still exists for the collaborator. They are on the BIDMC server - can you check the server and/or app gateway logs? In the mean time I will get access for you/the team to test with their researcher account.

@Linoy339
Copy link

Linoy339 commented Feb 4, 2021

Okay. BIDMC server. Also, can you give access to their redis account?

@avaidyam
Copy link
Member Author

avaidyam commented Feb 4, 2021

@Linoy339 The Researcher ID is emtgfsvp2ztfxwpztx4q (and by BIDMC server I mean the production server, so you already have access to Redis).

@avaidyam
Copy link
Member Author

avaidyam commented Feb 4, 2021

@Linoy339 Here is another report that may help diagnose the issue:

Collaborator: There are 5 surveys that I set on different days and different times to repeat on a weekly interval. Last week I tried redoing the schedule but it did not really work. Andy (iOS) did get one push notification but did not get any since, and I had surveys set every day Friday -> Tuesday. On Android I have not gotten a single push notification since I logged myself on as a participant, though the app shows a little number 1 on the corner on my home screen. I have double checked that all my permissions are set to yes.

Their Researcher ID is 3a8bgz4z43t02q64k75f and they are also on the production/BIDMC server.

@Linoy339
Copy link

Linoy339 commented Feb 4, 2021

@avaidyam .Okay. I'll check this.

@Linoy339
Copy link

Linoy339 commented Feb 4, 2021

@avaidyam. Can you please check redis client https://mq.lamp.digital/main/statistics. It seems no connection in present inside

@avaidyam
Copy link
Member Author

avaidyam commented Feb 4, 2021

It's been resolved; I'm not sure why it disconnected but I just had to re-add the Redis instance message_queue:6379 and it works again.

@Linoy339
Copy link

Linoy339 commented Feb 4, 2021

Okay

@Linoy339
Copy link

Linoy339 commented Feb 4, 2021

@avaidyam . The participant and device tokens are stored properly in redis. Also, We could not see anything in log. It look likes everything is fine for triggering notifications.
Now, the following are the schedules seen :
1)Weekend Combined Survey -> weekly every Tuesday at 01:00:00 UTC (0 1 * * 2)
2) Weekday Combined Survey -> thrice every week (0 1 * * 1,3,5) at 01:00:00 UTC, biweekly every week (0 1 * * 2,4) at 01:00:00 UTC.
Now, no schedules have been configured for saturday and sunday.
Can we get a sample participant id under the study "SHORE40" or can we create a new participant id under this study for testing?

@Linoy339
Copy link

Linoy339 commented Feb 5, 2021

@avaidyam .We couldn't find an exact reason for this. We also tested it from local environment with the same activity and dummy device token. But its sent properly to the gateway.
Also, not all the participants have this issue. Please see below:

Weekday Combined Survey :
NOT SENT
U0423844275
U3023817818
U8086352296
U7689198864
U3001716614
U5400724887 (ANDROID)
U3728539309 (ANDROID)
U0419893689
U8753039136 (ANDROID)
U6198225284 (ANDROID)
U3367968025

SENT
U9684428612
U3872945576
U4001046902
U9613823843
U4730370193
U3477517355
U4076551232
U3934618940
U5485048619

We will continue tracing it. Can You Please let us know whether we can create a participant under this study or nor, for testing purpose ?

@avaidyam
Copy link
Member Author

avaidyam commented Feb 5, 2021

@Linoy339 Yes, you may create a Participant under this study but please add a name/alias DEBUG to it for reference.

@avaidyam
Copy link
Member Author

@Linoy339 Here is a new report of schedules that a collaborator tested:

Balloon Risk for M,W,F starting 2/17
Pop the Bubbles for weekly starting W 2/17 at Noon, 1 time on Friday 2/19 at 9:45am, and daily starting Friday 2/19 at 7pm.

for Balloon risk, the notification came at the right times 10am on Wed 2/17 and Fri 2/19 but the app crashed (white screen) right after the mindlamp2 login screen on Wed and Fri

for Pop the Bubbles, there was no notification for the 2/17 or 9:45am 2/19 date but I got a notification on 2/19 at 7pm. The notification opened up Mindlamp2 to a white screen where nothing happened. Touching the back < at the top left of the screen crashed the program (white screen).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend LAMP-server, LAMP-worker, and LAMP-app-gateway bug Something isn't working NO ETA No "days of effort required" assigned yet
Projects
None yet
Development

No branches or pull requests

2 participants