Giter Club home page Giter Club logo

Comments (5)

dianabarsan avatar dianabarsan commented on June 3, 2024

From artifact, it looks like the app is stuck while syncing and not updating the status:
image

from cht-core.

dianabarsan avatar dianabarsan commented on June 3, 2024

Browser logs reports no errors:

~~~~~~~~~~~~~ confirm initial list of cached resources ~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~ branding updates trigger login page refresh ~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~ branding updates trigger login page refresh ~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~ branding updates trigger login page refresh ~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~ branding updates trigger login page refresh ~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~ branding updates trigger login page refresh ~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~ branding updates trigger login page refresh ~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~ login page translation updates trigger login page refresh ~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~ login page translation updates trigger login page refresh ~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~ login page translation updates trigger login page refresh ~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~ login page translation updates trigger login page refresh ~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~ login page translation updates trigger login page refresh ~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~ login page translation updates trigger login page refresh ~~~~~~~~~~~~~~~~~~~~~~

from cht-core.

dianabarsan avatar dianabarsan commented on June 3, 2024

Based on API logs, replication should have been successful, all endpoints were called and service worker resources were updated:

2024-03-14T02:41:19.008 INFO: Service worker generated successfully 
2024-03-14T02:41:19.282 REQ: d204ca2f-8db9-429b-9560-ca5d228a810f 172.18.0.1 - GET /dbinfo HTTP/1.0
2024-03-14T02:41:19.292 RES: d204ca2f-8db9-429b-9560-ca5d228a810f 172.18.0.1 - GET /dbinfo HTTP/1.0 200 251 9.428 ms
2024-03-14T02:41:19.298 REQ: c8ab29cd-a737-4f2f-b147-0a062c14bdf6 172.18.0.1 - PUT /medic/_local/syNEeSCbx3aa6c0hHJEtoQ%3D%3D HTTP/1.0
2024-03-14T02:41:19.313 RES: c8ab29cd-a737-4f2f-b147-0a062c14bdf6 172.18.0.1 - PUT /medic/_local/syNEeSCbx3aa6c0hHJEtoQ%3D%3D HTTP/1.0 201 63 14.117 ms
2024-03-14T02:41:19.334 REQ: 16780ca5-aca4-4030-bab9-af8a176042c0 172.18.0.1 - GET /dbinfo HTTP/1.0
2024-03-14T02:41:19.345 REQ: b0f503bf-2348-45dc-a1b2-283863ccfa51 172.18.0.1 - GET /medic-user-bob-meta/ HTTP/1.0
2024-03-14T02:41:19.360 RES: b0f503bf-2348-45dc-a1b2-283863ccfa51 172.18.0.1 - GET /medic-user-bob-meta/ HTTP/1.0 404 58 14.459 ms
2024-03-14T02:41:19.372 RES: 16780ca5-aca4-4030-bab9-af8a176042c0 172.18.0.1 - GET /dbinfo HTTP/1.0 200 251 37.436 ms
2024-03-14T02:41:19.376 REQ: d4e00a1b-b69f-4e3b-bd44-63aa7934eae6 172.18.0.1 - PUT /medic-user-bob-meta/ HTTP/1.0
2024-03-14T02:41:19.377 REQ: a5322a43-a88e-486c-8b48-3d7da1558f99 172.18.0.1 - GET /medic/_local/syNEeSCbx3aa6c0hHJEtoQ%3D%3D? HTTP/1.0
2024-03-14T02:41:19.387 RES: a5322a43-a88e-486c-8b48-3d7da1558f99 172.18.0.1 - GET /medic/_local/syNEeSCbx3aa6c0hHJEtoQ%3D%3D? HTTP/1.0 200 236 9.875 ms
2024-03-14T02:41:19.397 REQ: f470313b-74cc-4d1b-93f5-9a3e53498ce3 172.18.0.1 - GET /medic/_local/syNEeSCbx3aa6c0hHJEtoQ%3D%3D? HTTP/1.0
2024-03-14T02:41:19.432 RES: f470313b-74cc-4d1b-93f5-9a3e53498ce3 172.18.0.1 - GET /medic/_local/syNEeSCbx3aa6c0hHJEtoQ%3D%3D? HTTP/1.0 200 236 34.513 ms
2024-03-14T02:41:19.443 REQ: 067385ad-f3b0-41f5-b27c-055eace0627b 172.18.0.1 - GET /api/v1/replication/get-ids HTTP/1.0
2024-03-14T02:41:19.526 RES: d4e00a1b-b69f-4e3b-bd44-63aa7934eae6 172.18.0.1 - PUT /medic-user-bob-meta/ HTTP/1.0 200 11 149.432 ms
2024-03-14T02:41:19.562 REQ: 2f71b928-d692-4b87-8a42-43fd8cd39b9b 172.18.0.1 - GET /dbinfo HTTP/1.0
2024-03-14T02:41:19.613 RES: 2f71b928-d692-4b87-8a42-43fd8cd39b9b 172.18.0.1 - GET /dbinfo HTTP/1.0 200 251 50.649 ms
2024-03-14T02:41:19.618 REQ: f416ca17-862b-47f6-99b8-ad63ed574298 172.18.0.1 - GET /dbinfo HTTP/1.0
2024-03-14T02:41:19.620 REQ: e045d36c-a39c-4bcb-abdd-5b4b0fc882a5 172.18.0.1 - GET /medic-user-bob-meta/_local/pvhOun_PYXMFT_WVCK1o8Q%3D%3D? HTTP/1.0
2024-03-14T02:41:19.632 RES: e045d36c-a39c-4bcb-abdd-5b4b0fc882a5 172.18.0.1 - GET /medic-user-bob-meta/_local/pvhOun_PYXMFT_WVCK1o8Q%3D%3D? HTTP/1.0 404 41 10.963 ms
2024-03-14T02:41:19.640 REQ: a5c4db85-6e4a-4087-ae32-23eb77518911 172.18.0.1 - GET /medic-user-bob-meta/_local/pvhOun_PYXMFT_WVCK1o8Q%3D%3D? HTTP/1.0
2024-03-14T02:41:19.656 RES: f416ca17-862b-47f6-99b8-ad63ed574298 172.18.0.1 - GET /dbinfo HTTP/1.0 200 251 37.044 ms
2024-03-14T02:41:19.659 RES: a5c4db85-6e4a-4087-ae32-23eb77518911 172.18.0.1 - GET /medic-user-bob-meta/_local/pvhOun_PYXMFT_WVCK1o8Q%3D%3D? HTTP/1.0 404 41 18.940 ms
2024-03-14T02:41:19.664 REQ: 671c3e66-9872-456e-945c-04314bcfc35f 172.18.0.1 - GET /medic-user-bob-meta/_changes?style=all_docs&since=0&limit=100 HTTP/1.0
2024-03-14T02:41:19.668 REQ: 565a0a1d-f939-46e0-af31-17a65dabce8d 172.18.0.1 - PUT /medic-user-bob-meta/_local/pvhOun_PYXMFT_WVCK1o8Q%3D%3D HTTP/1.0
2024-03-14T02:41:19.688 RES: 565a0a1d-f939-46e0-af31-17a65dabce8d 172.18.0.1 - PUT /medic-user-bob-meta/_local/pvhOun_PYXMFT_WVCK1o8Q%3D%3D HTTP/1.0 201 63 19.435 ms
2024-03-14T02:41:19.697 RES: 671c3e66-9872-456e-945c-04314bcfc35f 172.18.0.1 - GET /medic-user-bob-meta/_changes?style=all_docs&since=0&limit=100 HTTP/1.0 200 - 31.167 ms
2024-03-14T02:41:19.705 REQ: 6a874b8f-1168-4742-ba89-769411104cd7 172.18.0.1 - GET /medic-user-bob-meta/_changes?style=all_docs&since=1-g1AAAAOBeJylkkFqAjEUhlMtuHErvUOhMskYHVftFazmAHmJwzBMddV1T9ErtJpL9BRewjNU4z8gZBYOI2T1Q3jv430_qRhjw6Jv2ZPZfprC0ts1X_i42hpdVRjoaUYjpVZl0dfsAw8DbtdCct6-dhOZNpA1UNGzc_tATa20epq2b96kiiYVQEev3p8DdcZJpiZp3-zUr4GecO-y1KzbDIMrKp3bhRtMZqQQJsYMwD19eX8KVDnP1xOKMgPwvHlk70p93-OG0SVGEb8oOlySUJ5YPYnwA3IHJOLf-7-a_HB1zMR0riMcgTwBiVgodbjTEoUcED_OHRt9i0zklMdZorgjAj_K45byAtbOIZc&limit=100 HTTP/1.0
2024-03-14T02:41:19.707 REQ: e34ec716-2f14-4878-8653-d13fbdc87041 172.18.0.1 - POST /medic-user-bob-meta/_all_docs?conflicts=true&include_docs=true HTTP/1.0
2024-03-14T02:41:19.732 RES: 6a874b8f-1168-4742-ba89-769411104cd7 172.18.0.1 - GET /medic-user-bob-meta/_changes?style=all_docs&since=1-g1AAAAOBeJylkkFqAjEUhlMtuHErvUOhMskYHVftFazmAHmJwzBMddV1T9ErtJpL9BRewjNU4z8gZBYOI2T1Q3jv430_qRhjw6Jv2ZPZfprC0ts1X_i42hpdVRjoaUYjpVZl0dfsAw8DbtdCct6-dhOZNpA1UNGzc_tATa20epq2b96kiiYVQEev3p8DdcZJpiZp3-zUr4GecO-y1KzbDIMrKp3bhRtMZqQQJsYMwD19eX8KVDnP1xOKMgPwvHlk70p93-OG0SVGEb8oOlySUJ5YPYnwA3IHJOLf-7-a_HB1zMR0riMcgTwBiVgodbjTEoUcED_OHRt9i0zklMdZorgjAj_K45byAtbOIZc&limit=100 HTTP/1.0 200 - 24.617 ms
2024-03-14T02:41:19.733 RES: e34ec716-2f14-4878-8653-d13fbdc87041 172.18.0.1 - POST /medic-user-bob-meta/_all_docs?conflicts=true&include_docs=true HTTP/1.0 200 - 24.852 ms
2024-03-14T02:41:19.749 REQ: b7cdda61-2c19-4214-96c3-e4ff9006b761 172.18.0.1 - GET /medic-user-bob-meta/_local/Dy27uZxKKhM.zllCjWEP1A%3D%3D? HTTP/1.0
2024-03-14T02:41:19.757 RES: b7cdda61-2c19-4214-96c3-e4ff9006b761 172.18.0.1 - GET /medic-user-bob-meta/_local/Dy27uZxKKhM.zllCjWEP1A%3D%3D? HTTP/1.0 404 41 7.039 ms
2024-03-14T02:41:19.764 REQ: daa80d15-33ad-456c-965b-c4734eb1e058 172.18.0.1 - PUT /medic-user-bob-meta/_local/Dy27uZxKKhM.zllCjWEP1A%3D%3D HTTP/1.0
2024-03-14T02:41:19.765 DEBUG: Checking for a configured outgoing message service 
2024-03-14T02:41:19.777 RES: daa80d15-33ad-456c-965b-c4734eb1e058 172.18.0.1 - PUT /medic-user-bob-meta/_local/Dy27uZxKKhM.zllCjWEP1A%3D%3D HTTP/1.0 201 63 12.207 ms
2024-03-14T02:41:19.807 RES: 067385ad-f3b0-41f5-b27c-055eace0627b 172.18.0.1 - GET /api/v1/replication/get-ids HTTP/1.0 200 - 362.954 ms
2024-03-14T02:41:19.814 REQ: fb44edd5-60d1-4dc1-8b1c-03bad5769533 172.18.0.1 - POST /medic/_bulk_get?revs=true&attachments=true HTTP/1.0
2024-03-14T02:41:19.850 RES: fb44edd5-60d1-4dc1-8b1c-03bad5769533 172.18.0.1 - POST /medic/_bulk_get?revs=true&attachments=true HTTP/1.0 200 - 34.114 ms
2024-03-14T02:41:19.865 REQ: 69322471-5326-4c16-aa20-ce0063e0d05e 172.18.0.1 - GET /service-worker.js HTTP/1.0
2024-03-14T02:41:19.868 REQ: 83982848-e23a-4f05-b4dd-9668f39c68ec 172.18.0.1 - GET /dbinfo HTTP/1.0
2024-03-14T02:41:19.874 RES: 69322471-5326-4c16-aa20-ce0063e0d05e 172.18.0.1 - GET /service-worker.js HTTP/1.0 200 - 8.216 ms
2024-03-14T02:41:19.882 RES: 83982848-e23a-4f05-b4dd-9668f39c68ec 172.18.0.1 - GET /dbinfo HTTP/1.0 200 251 13.605 ms
2024-03-14T02:41:19.888 REQ: 52b1448c-a0e1-43c6-9174-a430dc274485 172.18.0.1 - GET /medic/_local/syNEeSCbx3aa6c0hHJEtoQ%3D%3D? HTTP/1.0
2024-03-14T02:41:19.889 REQ: b3cf0673-b696-4f03-bc69-d85e28c23b70 172.18.0.1 - GET /workbox-6606bb14.js HTTP/1.0
2024-03-14T02:41:19.895 RES: b3cf0673-b696-4f03-bc69-d85e28c23b70 172.18.0.1 - GET /workbox-6606bb14.js HTTP/1.0 200 - 4.255 ms
2024-03-14T02:41:19.897 RES: 52b1448c-a0e1-43c6-9174-a430dc274485 172.18.0.1 - GET /medic/_local/syNEeSCbx3aa6c0hHJEtoQ%3D%3D? HTTP/1.0 200 236 8.889 ms
2024-03-14T02:41:19.904 REQ: 83ed8fc9-15e9-4438-bbc5-8a60850a6c0b 172.18.0.1 - GET /manifest.json HTTP/1.0
2024-03-14T02:41:19.908 RES: 83ed8fc9-15e9-4438-bbc5-8a60850a6c0b 172.18.0.1 - GET /manifest.json HTTP/1.0 200 327 2.874 ms
2024-03-14T02:41:19.921 REQ: 8cfa4b69-d764-4d6b-82d9-7cd4ffc6a182 172.18.0.1 - GET /medic/login HTTP/1.0
2024-03-14T02:41:19.950 REQ: 2674288a-ad1c-4c8a-96a1-50d417c3e20f 172.18.0.1 - GET /medic/_local/syNEeSCbx3aa6c0hHJEtoQ%3D%3D? HTTP/1.0
2024-03-14T02:41:19.962 RES: 2674288a-ad1c-4c8a-96a1-50d417c3e20f 172.18.0.1 - GET /medic/_local/syNEeSCbx3aa6c0hHJEtoQ%3D%3D? HTTP/1.0 200 236 8.835 ms
2024-03-14T02:41:19.967 REQ: 9b18a130-e702-4021-9871-9e1d170e601a 172.18.0.1 - PUT /medic/_local/syNEeSCbx3aa6c0hHJEtoQ%3D%3D HTTP/1.0
2024-03-14T02:41:19.979 RES: 8cfa4b69-d764-4d6b-82d9-7cd4ffc6a182 172.18.0.1 - GET /medic/login HTTP/1.0 200 - 57.015 ms
2024-03-14T02:41:19.986 RES: 9b18a130-e702-4021-9871-9e1d170e601a 172.18.0.1 - PUT /medic/_local/syNEeSCbx3aa6c0hHJEtoQ%3D%3D HTTP/1.0 201 63 18.012 ms
2024-03-14T02:41:20.765 DEBUG: Checking for a configured outgoing message service 
2024-03-14T02:41:21.766 DEBUG: Checking for a configured outgoing message service 
2024-03-14T02:41:22.765 DEBUG: Checking for a configured outgoing message service 
2024-03-14T02:41:23.765 DEBUG: Checking for a configured outgoing message service 
2024-03-14T02:41:24.766 DEBUG: Checking for a configured outgoing message service 
2024-03-14T02:41:25.766 DEBUG: Checking for a configured outgoing message service 
2024-03-14T02:41:26.766 DEBUG: Checking for a configured outgoing message service 
2024-03-14T02:41:27.766 DEBUG: Checking for a configured outgoing message service 
2024-03-14T02:41:28.766 DEBUG: Checking for a configured outgoing message service 
2024-03-14T02:41:29.767 DEBUG: Checking for a configured outgoing message service 
2024-03-14T02:41:30.767 DEBUG: Checking for a configured outgoing message service 
2024-03-14T02:41:31.767 DEBUG: Checking for a configured outgoing message service 
2024-03-14T02:41:32.767 DEBUG: Checking for a configured outgoing message service 
2024-03-14T02:41:33.768 DEBUG: Checking for a configured outgoing message service 
2024-03-14T02:41:34.768 DEBUG: Checking for a configured outgoing message service 
2024-03-14T02:41:35.767 DEBUG: Checking for a configured outgoing message service 
2024-03-14T02:41:36.768 DEBUG: Checking for a configured outgoing message service 
2024-03-14T02:41:37.768 DEBUG: Checking for a configured outgoing message service 
2024-03-14T02:41:38.768 DEBUG: Checking for a configured outgoing message service 
2024-03-14T02:41:39.601 REQ: ee308f76-055c-4ee6-841e-a4e9d2abfcd4 172.18.0.1 admin GET /medic-test/?end=branding_updates_trigger_login_page_refresh HTTP/1.0

from cht-core.

dianabarsan avatar dianabarsan commented on June 3, 2024

I think we have a real race condition in webapp where replication to can become blocked.
I haven't been able to replicate this outside of this e2e test, and it appears to be caused by many actions happening at the same time: startup replication + updating the user's contact doc + updating the service worker + updating branding + triggering sync - all at the same time.

I added some debug logs and this is what I see when the test succeeds:

[debug] Console Api Event: [{"type":"string","value":"AuthService :: User missing online role. User roles: chw"}]
[debug] Console Api Event: [{"type":"string","value":"attempt sync"}]
[debug] Console Api Event: [{"type":"string","value":"replicate to retry"}]
[debug] Console Api Event: [{"type":"string","value":"Replication to successful"}]
[debug] Console Api Event: [{"type":"string","value":"replicate from"}]
[debug] Console Api Event: [{"type":"string","value":"replicating from"}]
[debug] Console Api Event: [{"type":"string","value":"got docs"}]
[debug] Console Api Event: [{"type":"string","value":"get missing docs"}]
[debug] Console Api Event: [{"type":"string","value":"Change notification firing"},{"type":"boolean","value":true},{"type":"object","className":"Object","description":"Object","objectId":"-6982501493123196399.5.73","preview":{"type":"object","description":"Object","overflow":false,"properties":[{"name":"id","type":"string","value":"_design/medic-user"},{"name":"changes","type":"object","value":"Array(1)","subtype":"array"},{"name":"doc","type":"object","value":"Object"},{"name":"seq","type":"number","value":"1"}]}}]
[debug] Console Api Event: [{"type":"string","value":"get deleted"}]
[debug] Console Api Event: [{"type":"string","value":"done replicating"}]
[debug] Console Api Event: [{"type":"string","value":"replicate from done"}]
[debug] Console Api Event: [{"type":"string","value":"Change notification firing"},{"type":"boolean","value":false},{"type":"object","className":"Object","description":"Object","objectId":"-6982501493123196399.5.74","preview":{"type":"object","description":"Object","overflow":false,"properties":[{"name":"id","type":"string","value":"service-worker-meta"},{"name":"changes","type":"object","value":"Array(1)","subtype":"array"},{"name":"doc","type":"object","value":"Object"},{"name":"seq","type":"number","value":"36"}]}}]
[debug] Console Api Event: [{"type":"string","value":"Change notification firing"},{"type":"boolean","value":false},{"type":"object","className":"Object","description":"Object","objectId":"-6982501493123196399.5.75","preview":{"type":"object","description":"Object","overflow":false,"properties":[{"name":"id","type":"string","value":"branding"},{"name":"changes","type":"object","value":"Array(1)","subtype":"array"},{"name":"doc","type":"object","value":"Object"},{"name":"seq","type":"number","value":"37"}]}}]
[debug] Console Api Event: [{"type":"string","value":"replicate to retry"}]
[debug] Console Api Event: [{"type":"string","value":"Replication to successful"}]
[debug] Console Api Event: [{"type":"string","value":"replicate from"}]
[debug] Console Api Event: [{"type":"string","value":"replicating from"}]
[debug] Console Api Event: [{"type":"string","value":"Service worker state changed to installed!"}]
[debug] Console Api Event: [{"type":"string","value":"Service worker state changed to activating!"}]
[debug] Console Api Event: [{"type":"string","value":"got docs"}]
[debug] Console Api Event: [{"type":"string","value":"get missing docs"}]
[debug] Console Api Event: [{"type":"string","value":"get deleted"}]
[debug] Console Api Event: [{"type":"string","value":"done replicating"}]
[debug] Console Api Event: [{"type":"string","value":"replicate from done"}]
[debug] Console Api Event: [{"type":"string","value":"Finished syncing!"}]
[debug] Console Api Event: [{"type":"string","value":"Delaying update"}]
[debug] Console Api Event: [{"type":"string","value":"attempt sync"}]
[debug] Console Api Event: [{"type":"string","value":"replicate to retry"}]
[debug] Console Api Event: [{"type":"string","value":"Replication to successful"}]
[debug] Console Api Event: [{"type":"string","value":"replicate from"}]
[debug] Console Api Event: [{"type":"string","value":"replicating from"}]
[debug] Console Api Event: [{"type":"string","value":"got docs"}]
[debug] Console Api Event: [{"type":"string","value":"get missing docs"}]
[debug] Console Api Event: [{"type":"string","value":"get deleted"}]
[debug] Console Api Event: [{"type":"string","value":"done replicating"}]
[debug] Console Api Event: [{"type":"string","value":"replicate from done"}]
[debug] Console Api Event: [{"type":"string","value":"Finished syncing!"}]
[warning] Console Api Event: [{"type":"string","value":"User must reauthenticate"}]
[debug] Console Api Event: [{"type":"string","value":"Emitting 'should-purge' event with:"},{"type":"boolean","value":true}]
[debug] Console Api Event: [{"type":"string","value":"Emitting 'start' event with:"},{"type":"undefined"}]
[debug] Console Api Event: [{"type":"string","value":"Emitting 'done' event with:"},{"type":"undefined"}]
[debug] Console Api Event: [{"type":"string","value":"attempt sync"}]
[debug] Console Api Event: [{"type":"string","value":"replicate to retry"}]
[debug] Console Api Event: [{"type":"string","value":"Replication to successful"}]
[debug] Console Api Event: [{"type":"string","value":"replicate from"}]
[debug] Console Api Event: [{"type":"string","value":"replicating from"}]
[debug] Console Api Event: [{"type":"string","value":"got docs"}]
[debug] Console Api Event: [{"type":"string","value":"get missing docs"}]
[debug] Console Api Event: [{"type":"string","value":"get deleted"}]
[debug] Console Api Event: [{"type":"string","value":"done replicating"}]
[debug] Console Api Event: [{"type":"string","value":"replicate from done"}]
[debug] Console Api Event: [{"type":"string","value":"Finished syncing!"}]
[debug] Console Api Event: [{"type":"string","value":"attempt sync"}]
[debug] Console Api Event: [{"type":"string","value":"replicate to retry"}]
[debug] Console Api Event: [{"type":"string","value":"Replication to successful"}]
[debug] Console Api Event: [{"type":"string","value":"replicate from"}]
[debug] Console Api Event: [{"type":"string","value":"replicating from"}]
[debug] Console Api Event: [{"type":"string","value":"got docs"}]
[debug] Console Api Event: [{"type":"string","value":"get missing docs"}]
[debug] Console Api Event: [{"type":"string","value":"get deleted"}]
[debug] Console Api Event: [{"type":"string","value":"done replicating"}]
[debug] Console Api Event: [{"type":"string","value":"replicate from done"}]
[debug] Console Api Event: [{"type":"string","value":"Finished syncing!"}]

This is what I see when the test fails:

[debug] Console Api Event: [{"type":"string","value":"attempt sync"}]
[debug] Console Api Event: [{"type":"string","value":"replicate to retry"}]
[debug] Console Api Event: [{"type":"string","value":"Replication to successful"}]
[debug] Console Api Event: [{"type":"string","value":"replicate from"}]
[debug] Console Api Event: [{"type":"string","value":"replicating from"}]
[debug] Console Api Event: [{"type":"string","value":"got docs"}]
[debug] Console Api Event: [{"type":"string","value":"get missing docs"}]
[debug] Console Api Event: [{"type":"string","value":"Change notification firing"},{"type":"boolean","value":true},{"type":"object","className":"Object","description":"Object","objectId":"-692493403576920690.5.73","preview":{"type":"object","description":"Object","overflow":false,"properties":[{"name":"id","type":"string","value":"_design/medic-user"},{"name":"changes","type":"object","value":"Array(1)","subtype":"array"},{"name":"doc","type":"object","value":"Object"},{"name":"seq","type":"number","value":"1"}]}}]
[debug] Console Api Event: [{"type":"string","value":"get deleted"}]
[debug] Console Api Event: [{"type":"string","value":"done replicating"}]
[debug] Console Api Event: [{"type":"string","value":"replicate from done"}]
[debug] Console Api Event: [{"type":"string","value":"Change notification firing"},{"type":"boolean","value":false},{"type":"object","className":"Object","description":"Object","objectId":"-692493403576920690.5.74","preview":{"type":"object","description":"Object","overflow":false,"properties":[{"name":"id","type":"string","value":"fixture:user:bob"},{"name":"changes","type":"object","value":"Array(1)","subtype":"array"},{"name":"doc","type":"object","value":"Object"},{"name":"seq","type":"number","value":"36"}]}}]
[debug] Console Api Event: [{"type":"string","value":"Change notification firing"},{"type":"boolean","value":false},{"type":"object","className":"Object","description":"Object","objectId":"-692493403576920690.5.75","preview":{"type":"object","description":"Object","overflow":false,"properties":[{"name":"id","type":"string","value":"service-worker-meta"},{"name":"changes","type":"object","value":"Array(1)","subtype":"array"},{"name":"doc","type":"object","value":"Object"},{"name":"seq","type":"number","value":"37"}]}}]
[debug] Console Api Event: [{"type":"string","value":"Change notification firing"},{"type":"boolean","value":false},{"type":"object","className":"Object","description":"Object","objectId":"-692493403576920690.5.76","preview":{"type":"object","description":"Object","overflow":false,"properties":[{"name":"id","type":"string","value":"branding"},{"name":"changes","type":"object","value":"Array(1)","subtype":"array"},{"name":"doc","type":"object","value":"Object"},{"name":"seq","type":"number","value":"38"}]}}]
[debug] Console Api Event: [{"type":"string","value":"replicate to retry"}]
[debug] Console Api Event: [{"type":"string","value":"Service worker state changed to installed!"}]
[debug] Console Api Event: [{"type":"string","value":"attempt sync"}]
[debug] Console Api Event: [{"type":"string","value":"sync already in progress"}]

from cht-core.

dianabarsan avatar dianabarsan commented on June 3, 2024

After pretty intensive debugging ( 😢 ) and test reruns, I'm quite convinced that this is some sort of service-worker update race condition taking up all browser bandwidth to a host, and requests end up being queued. I'm suspecting multiple service workers being queued up for update, and some not succeeding. This always corroborates with logs reporting of service workers that are in the "activating" state (which is transitory before they become installed) and then being marked as redundant later in the log.

I believe that addressing how service-worker updates are treated in webapp (detailed here #7375) will also solve this issue.

I haven't been able to trigger this programatically, and have only seen this behavior in e2e tests.

from cht-core.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.