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

CustomDashboard REFRESH_COUNT triggered twice after sync #1468

Open
1t5j0y opened this issue Jul 23, 2024 · 1 comment
Open

CustomDashboard REFRESH_COUNT triggered twice after sync #1468

1t5j0y opened this issue Jul 23, 2024 · 1 comment

Comments

@1t5j0y
Copy link
Contributor

1t5j0y commented Jul 23, 2024

https://avni.freshdesk.com/a/tickets/4305

After foreground sync, REFRESH_COUNT is getting triggered twice causing the app to be unusable for longer than needed, especially for orgs which have dashboards that take some time to load.

Issue observed in versions 6.1.8, 7.3.1 and 9.1

Screencast.from.07-23-2024.11.14.05.AM.webm
logs

07-23 09:54:27.478 10788 11012 D ReactNativeJS: [9:54:27:478] [BaseService][Debug] Dispatching action: "CustomDashboard.REFRESH_COUNT"
07-23 09:54:27.481 10788 11012 D ReactNativeJS: [9:54:27:481] [ReportCardService][Debug] Executing report card: Pending
07-23 09:54:27.496 10788 11012 D ReactNativeJS: [9:54:27:495] [CustomDashboardActions][Debug] Pending took 14 ms
07-23 09:54:27.496 10788 11012 D ReactNativeJS: [9:54:27:496] [ReportCardService][Debug] Executing report card: Registrations
07-23 09:54:27.500 10788 11012 D ReactNativeJS: [9:54:27:499] [CustomDashboardActions][Debug] Registrations took 3 ms
07-23 09:54:27.500 10788 11012 D ReactNativeJS: [9:54:27:500] [ReportCardService][Debug] Executing report card: Scheduled visits
07-23 09:54:27.520 10788 11012 D ReactNativeJS: [9:54:27:520] [CustomDashboardActions][Debug] Scheduled visits took 20 ms
07-23 09:54:27.521 10788 11012 D ReactNativeJS: [9:54:27:521] [ReportCardService][Debug] Executing report card: Farmer endline not completed
07-23 09:54:51.450 10788 11012 D ReactNativeJS: [9:54:51:449] [CustomDashboardActions][Debug] Farmer endline not completed took 23929 ms
07-23 09:54:51.451 10788 11012 D ReactNativeJS: [9:54:51:450] [ReportCardService][Debug] Executing report card: Rejected
07-23 09:54:51.462 10788 11012 D ReactNativeJS: [9:54:51:462] [CustomDashboardActions][Debug] Rejected took 12 ms
07-23 09:54:51.463 10788 11012 D ReactNativeJS: [9:54:51:463] [ReportCardService][Debug] Executing report card: Enrolments
07-23 09:54:51.466 10788 11012 D ReactNativeJS: [9:54:51:465] [CustomDashboardActions][Debug] Enrolments took 2 ms
07-23 09:54:51.466 10788 11012 D ReactNativeJS: [9:54:51:466] [ReportCardService][Debug] Executing report card: Total
07-23 09:54:51.469 10788 11012 D ReactNativeJS: [9:54:51:469] [CustomDashboardActions][Debug] Total took 2 ms
07-23 09:54:51.470 10788 11012 D ReactNativeJS: [9:54:51:469] [ReportCardService][Debug] Executing report card: Excavating Machine endline not completed
07-23 09:55:05.447 10788 11012 D ReactNativeJS: [9:55:05:447] [CustomDashboardActions][Debug] Excavating Machine endline not completed took 13978 ms
07-23 09:55:05.448 10788 11012 D ReactNativeJS: [9:55:05:448] [ReportCardService][Debug] Executing report card: Approved
07-23 09:55:05.467 10788 11012 D ReactNativeJS: [9:55:05:467] [CustomDashboardActions][Debug] Approved took 18 ms
07-23 09:55:05.468 10788 11012 D ReactNativeJS: [9:55:05:467] [ReportCardService][Debug] Executing report card: Visits
07-23 09:55:05.472 10788 11012 D ReactNativeJS: [9:55:05:472] [CustomDashboardActions][Debug] Visits took 5 ms
07-23 09:55:05.473 10788 11012 D ReactNativeJS: [9:55:05:472] [ReportCardService][Debug] Executing report card: Comments
07-23 09:55:05.475 10788 11012 D ReactNativeJS: [9:55:05:475] [CustomDashboardActions][Debug] Comments took 3 ms
07-23 09:55:05.476 10788 11012 D ReactNativeJS: [9:55:05:475] [ReportCardService][Debug] Executing report card: Work order endline not completed
07-23 09:55:10.618 10788 11012 D ReactNativeJS: [9:55:10:617] [CustomDashboardActions][Debug] Work order endline not completed took 5142 ms
07-23 09:55:10.618 10788 11012 D ReactNativeJS: [9:55:10:618] [ReportCardService][Debug] Executing report card: Unverified phone numbers
07-23 09:55:11.789 10788 11012 D ReactNativeJS: [9:55:11:789] [CustomDashboardActions][Debug] Unverified phone numbers took 1171 ms
07-23 09:55:11.789 10788 11012 D ReactNativeJS: [9:55:11:789] [ReportCardService][Debug] Executing report card: Overdue visits
07-23 09:55:11.804 10788 11012 D ReactNativeJS: [9:55:11:804] [CustomDashboardActions][Debug] Overdue visits took 15 ms
07-23 09:55:11.805 10788 11012 D ReactNativeJS: [9:55:11:805] [ReportCardService][Debug] Executing report card: Gram panchayat endline not completed
07-23 09:55:13.095 10788 11012 D ReactNativeJS: [9:55:13:095] [CustomDashboardActions][Debug] Gram panchayat endline not completed took 1291 ms
07-23 09:55:13.096 10788 11012 D ReactNativeJS: [9:55:13:096] [ReportCardService][Debug] Executing report card: Comments
07-23 09:55:13.098 10788 11012 D ReactNativeJS: [9:55:13:098] [CustomDashboardActions][Debug] Comments took 3 ms
07-23 09:55:13.098 10788 11012 D ReactNativeJS: [9:55:13:098] [ReportCardService][Debug] Executing report card: Daily recording farmer and machine
07-23 09:55:14.004 10788 11012 D ReactNativeJS: [9:55:14:003] [CustomDashboardActions][Debug] Daily recording farmer and machine took 905 ms
07-23 09:55:14.007 10788 11012 D ReactNativeJS: [9:55:14:006] [CustomDashboardView][Debug] render
07-23 09:55:14.594 10788 11012 D ReactNativeJS: [9:55:14:594] [CustomDashboardView::AC][Debug] Dispatching action: "CustomDashboard.REFRESH_COUNT"
07-23 09:55:14.598 10788 11012 D ReactNativeJS: [9:55:14:597] [ReportCardService][Debug] Executing report card: Pending
07-23 09:55:14.611 10788 11012 D ReactNativeJS: [9:55:14:611] [CustomDashboardActions][Debug] Pending took 14 ms
07-23 09:55:14.612 10788 11012 D ReactNativeJS: [9:55:14:612] [ReportCardService][Debug] Executing report card: Registrations
07-23 09:55:14.615 10788 11012 D ReactNativeJS: [9:55:14:615] [CustomDashboardActions][Debug] Registrations took 4 ms
07-23 09:55:14.616 10788 11012 D ReactNativeJS: [9:55:14:616] [ReportCardService][Debug] Executing report card: Scheduled visits
07-23 09:55:14.630 10788 11012 D ReactNativeJS: [9:55:14:630] [CustomDashboardActions][Debug] Scheduled visits took 14 ms
07-23 09:55:14.631 10788 11012 D ReactNativeJS: [9:55:14:630] [ReportCardService][Debug] Executing report card: Farmer endline not completed
07-23 09:55:34.620 10788 11012 D ReactNativeJS: [9:55:34:620] [CustomDashboardActions][Debug] Farmer endline not completed took 19990 ms
07-23 09:55:34.621 10788 11012 D ReactNativeJS: [9:55:34:621] [ReportCardService][Debug] Executing report card: Rejected
07-23 09:55:34.632 10788 11012 D ReactNativeJS: [9:55:34:631] [CustomDashboardActions][Debug] Rejected took 11 ms
07-23 09:55:34.632 10788 11012 D ReactNativeJS: [9:55:34:632] [ReportCardService][Debug] Executing report card: Enrolments
07-23 09:55:34.634 10788 11012 D ReactNativeJS: [9:55:34:634] [CustomDashboardActions][Debug] Enrolments took 2 ms
07-23 09:55:34.634 10788 11012 D ReactNativeJS: [9:55:34:634] [ReportCardService][Debug] Executing report card: Total
07-23 09:55:34.636 10788 11012 D ReactNativeJS: [9:55:34:636] [CustomDashboardActions][Debug] Total took 2 ms
07-23 09:55:34.636 10788 11012 D ReactNativeJS: [9:55:34:636] [ReportCardService][Debug] Executing report card: Excavating Machine endline not completed
07-23 09:55:45.838 10788 11012 D ReactNativeJS: [9:55:45:837] [CustomDashboardActions][Debug] Excavating Machine endline not completed took 11201 ms
07-23 09:55:45.838 10788 11012 D ReactNativeJS: [9:55:45:838] [ReportCardService][Debug] Executing report card: Approved
07-23 09:55:45.853 10788 11012 D ReactNativeJS: [9:55:45:852] [CustomDashboardActions][Debug] Approved took 14 ms
07-23 09:55:45.853 10788 11012 D ReactNativeJS: [9:55:45:853] [ReportCardService][Debug] Executing report card: Visits
07-23 09:55:45.856 10788 11012 D ReactNativeJS: [9:55:45:856] [CustomDashboardActions][Debug] Visits took 3 ms
07-23 09:55:45.856 10788 11012 D ReactNativeJS: [9:55:45:856] [ReportCardService][Debug] Executing report card: Comments
07-23 09:55:45.859 10788 11012 D ReactNativeJS: [9:55:45:858] [CustomDashboardActions][Debug] Comments took 2 ms
07-23 09:55:45.859 10788 11012 D ReactNativeJS: [9:55:45:859] [ReportCardService][Debug] Executing report card: Work order endline not completed
07-23 09:55:50.334 10788 11012 D ReactNativeJS: [9:55:50:334] [CustomDashboardActions][Debug] Work order endline not completed took 4475 ms
07-23 09:55:50.335 10788 11012 D ReactNativeJS: [9:55:50:335] [ReportCardService][Debug] Executing report card: Unverified phone numbers
07-23 09:55:51.278 10788 11012 D ReactNativeJS: [9:55:51:278] [CustomDashboardActions][Debug] Unverified phone numbers took 943 ms
07-23 09:55:51.279 10788 11012 D ReactNativeJS: [9:55:51:278] [ReportCardService][Debug] Executing report card: Overdue visits
07-23 09:55:51.291 10788 11012 D ReactNativeJS: [9:55:51:290] [CustomDashboardActions][Debug] Overdue visits took 12 ms
07-23 09:55:51.291 10788 11012 D ReactNativeJS: [9:55:51:291] [ReportCardService][Debug] Executing report card: Gram panchayat endline not completed
07-23 09:55:52.493 10788 11012 D ReactNativeJS: [9:55:52:493] [CustomDashboardActions][Debug] Gram panchayat endline not completed took 1201 ms
07-23 09:55:52.493 10788 11012 D ReactNativeJS: [9:55:52:493] [ReportCardService][Debug] Executing report card: Comments
07-23 09:55:52.503 10788 11012 D ReactNativeJS: [9:55:52:495] [CustomDashboardActions][Debug] Comments took 2 ms
07-23 09:55:52.503 10788 11012 D ReactNativeJS: [9:55:52:503] [ReportCardService][Debug] Executing report card: Daily recording farmer and machine
07-23 09:55:53.336 10788 11012 D ReactNativeJS: [9:55:53:335] [CustomDashboardActions][Debug] Daily recording farmer and machine took 832 ms
07-23 09:55:53.338 10788 11012 D ReactNativeJS: [9:55:53:338] [CustomDashboardView][Debug] render
07-23 09:55:53.751 10788 11012 D ReactNativeJS: [9:55:53:751] [CustomDashboardView::AC][Debug] Dispatched action completed: "CustomDashboard.REFRESH_COUNT" {"loading":false,"reportCardSectionMappings":{"entityClass":function DashboardSectionCardMapping() { [bytecode] },"realmCollection":<realm-collection>,"array":[]},"cardToCountResultMap":{"9cc7893c-b4b8-4939-bf2f-b50b38bbc542#0":{"primaryValue":BELOW_DEPTH,"secondaryValue":BELOW_DEPTH,"clickable":BELOW_DEPTH},"681253e9-6a74-431a-8a66-fbf5dae7ec36#0":{"primaryValue":BELOW_DEPTH,"secondaryValue":BELOW_DEPTH,"clickable":BELOW_DEPTH},"5b6e4f4f-d50a-4517-bd49-f38f1230c783#0":{"primaryValue":BELOW_DEPTH,"secondaryValue":BELOW_DEPTH,"clickable":BELOW_DEPTH},"0f2f2bf0-4530-4aa1-86a3-3bc1fe8715d5#0":{"primaryValue":BELOW_DEPTH,"secondaryValue":BELOW_DEPTH,"clickable":BELOW_DEPTH},"b6c94138-f643-4a85-a8ad-03b3e78a56d6#0":{"primaryValue":BELOW_DEPTH,"secondaryValue":BELOW_DEPTH,"clickable":BELOW_DEPTH},"ad74695e-25e4-447f-9e39-d1b25a67e4e3#0":{"primaryValue":BELOW_DEPTH,"secondaryValue":BELOW_DEPTH,"clickable":BELOW_DEPTH},"15b74d69-481f-41ad-b03f-ce7b6e922d0b#0":{"primaryValue":BELOW_DEPTH,"secondaryValue":BELOW_DEPTH,"clickable":BELOW_DEPTH},"198efef6-9c79-49e1-95f6-241273980ae3#0":{"primaryValue":BELOW_DEPTH,"secondaryValue":BELOW_DEPTH,"clickable":BELOW_DEPTH},"92201a89-bb29-4a4e-9b6c-23f3800b6dbe#0":{"primaryValue":BELOW_DEPTH,"secondaryValue":BELOW_DEPTH,"clickable":BELOW_DEPTH},"cc5ca2c6-b691-4a78-8ba9-86780226c980#0":{"primaryValue":BELOW_DEPTH,"secondaryValue":BELOW_DEPTH,"clickable":BELOW_DEPTH},"dee1e6d7-de9a-4df9-9237-82fd2cfe214f#0":{"primaryValue":BELOW_DEPTH,"secondaryValue":BELOW_DEPTH,"clickable":BELOW_DEPTH},"27c946c7-6f19-416b-9faf-3497440f5821#0":{"primaryValue":BELOW_DEPTH,"secondaryValue":BELOW_DEPTH,"clickable":BELOW_DEPTH},"54ceae49-dad9-418c-b3ed-8864f89f3883#0":{"primaryValue":BELOW_DEPTH,"secondaryValue":BELOW_DEPTH,"clickable":BELOW_DEPTH},"0d53d083-28a4-409e-820f-8d214c099418#0":{"primaryValue":BELOW_DEPTH,"secondaryValue":BELOW_DEPTH,"clickable":BELOW_DEPTH},"1e246874-428e-465b-a132-da2589b7c9a2#0":{"primaryValue":BELOW_DEPTH,"secondaryValue":BELOW_DEPTH,"clickable":BELOW_DEPTH},"e0f891b2-0999-49e7-a08a-e6a1bfd3188e#0":{"primaryValue":BELOW_DEPTH,"secondaryValue":BELOW_DEPTH,"clickable":BELOW_DEPTH}},"countUpdateTime":{},"hasFilters":true,"ruleInput":{"ruleInputArray":null},"activeDashboardUUID":"726853d3-c8de-48c7-936c-ab8a3e174d5a","customDashboardFilters":{"date":{},"applied":false,"selectedLocations":[],"selectedCustomFilters":[],"selectedGenders":[]},"dashboards":[{"that":BELOW_DEPTH}],"filtersPresent":true,"filterConfigsChecksum":undefined}
07-23 09:55:54.284 10788 11012 D ReactNativeJS: [9:55:54:283] [CustomDashboardView::AC][Debug] Dispatching action: "CustomDashboard.LOAD_INDICATOR"

AC:

  • Cherrypick and release a new version of apk if fixing of queries is not sufficient,.

Analysis:

If fixing the dashboard queries doesn't suffice, this will get prioritised.

@1t5j0y 1t5j0y converted this from a draft issue Jul 23, 2024
@mahalakshme mahalakshme moved this from New Issues to Timelines decision in Avni Product Jul 23, 2024
@mahalakshme mahalakshme moved this from Timelines decision to In Analysis in Avni Product Jul 23, 2024
@1t5j0y
Copy link
Contributor Author

1t5j0y commented Jul 23, 2024

Already addressed in 10.0

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

No branches or pull requests

1 participant