You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A piece of our network logic involves a delay to collect WS messages for batch sends. The relevant code looks like this:
if(!currentBatchPromise){logger.debug('Enqueueing new batch promise');currentBatchPromise=newPromise((resolve,reject)=>setTimeout(()=>sendCurrentBatch(resolve,reject),10));}
Most of the time, this works fine. However, sometimes the timeout handler (sendCurrentBatch) is never invoked. Typically, this happens when transitioning between different screens; I’m not sure which project this bug should be filed under: RN or RNN? I have a vague suspicion that it might be something like facebook/react-native#22089 (“Timers do not run if specified before App mounts”), compounded by the fact that (if I understand correctly) RNN, on some level, creates more than one “app”. I do not know the details.
But it seems very…wrong…that a function like setTimeout can somehow stop working in the middle of a running application.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
If you believe the issue is still relevant, please test on the latest Detox and report back. Thank you for your contributions.
Issue Description
A piece of our network logic involves a delay to collect WS messages for batch sends. The relevant code looks like this:
Most of the time, this works fine. However, sometimes the timeout handler (
sendCurrentBatch
) is never invoked. Typically, this happens when transitioning between different screens; I’m not sure which project this bug should be filed under: RN or RNN? I have a vague suspicion that it might be something like facebook/react-native#22089 (“Timers do not run if specified before App mounts”), compounded by the fact that (if I understand correctly) RNN, on some level, creates more than one “app”. I do not know the details.But it seems very…wrong…that a function like
setTimeout
can somehow stop working in the middle of a running application.Environment
The text was updated successfully, but these errors were encountered: