Ok. The spinner eventually does goes away, but it does take about 30 seconds to do so and then the picker appears. It works the same regardless of which RunItem you pick, the first one is very quick, the second one is very slow.
I think it’s garbage collection issue as if you wait about a minute between opening the picker, it opens right away. Note that this only seems to happen on iPads.
It appears to be when we call this.show() in the ticket/item/picker.js code, is where it hangs, but debugging though I can see it loading data.
UPDATE: Ok. There appears to be an issue with the indexedDbShim update. One (or more) of the databases is not ready (creating and/or recreating) and can’t open a transaction yet. While debugging I noticed that the sync would repeatedly call for the same objects over and over again, even though they had been successfully downloaded and saved.
It appears that the server, after sending the EventSource “done” event, is ending the response stream but the client is still keeping the stream open until the data is saved. On slow computers, the EventSource connection sees the stream being closed as a error and automatically reconnects to the server, thus restarting that objects sync stream again. Yusuke found that that if he closes the connection stream on the done event, that appears to fix the problem.
Mingle Card: 3703 Analysis
Patience you must have, my young padawan. Too eager you are to get your item picker quickly. Wait you must, for the picker to open. mmmhhhHHH.
::\`--._,'.::.`._.--'/::::
::.`. ` __::__ ' .::::::
::::.`-:.`'..`' .:-:::::::
::::::::\ `--' /::::::::::
`--'
Ok. The spinner eventually does goes away, but it does take about 30 seconds to do so and then the picker appears. It works the same regardless of which RunItem you pick, the first one is very quick, the second one is very slow.
I think it’s garbage collection issue as if you wait about a minute between opening the picker, it opens right away. Note that this only seems to happen on iPads.
It appears to be when we call this.show() in the ticket/item/picker.js code, is where it hangs, but debugging though I can see it loading data.
UPDATE: Ok. There appears to be an issue with the indexedDbShim update. One (or more) of the databases is not ready (creating and/or recreating) and can’t open a transaction yet. While debugging I noticed that the sync would repeatedly call for the same objects over and over again, even though they had been successfully downloaded and saved.
It appears that the server, after sending the EventSource “done” event, is ending the response stream but the client is still keeping the stream open until the data is saved. On slow computers, the EventSource connection sees the stream being closed as a error and automatically reconnects to the server, thus restarting that objects sync stream again. Yusuke found that that if he closes the connection stream on the done event, that appears to fix the problem.
UPDATE (12/8/2015): It looks like this is no longer an issue and was fixed as part of Yusuke’s PR to fix Sync Race Conditions (https://github.com/Liquidframeworks/alpine-mobile/pull/1598).
Steps to reproduce
Expected result
Should open child price book item picker
Actual Result
Fx Spinner keeps on spinning
Related Cards
Test Plan
Tarantula: Dynamic Parenting - Add children to an existing ticket item
Checklist for Merging