The timeout is set at the end of the second script used by the GEE App:
it uses : **ui.util.setTimeout(func, delay)** function from the GEE Code Editor API
This is however bad programming from my side, as I should find where is the asynchronous method in the script that causes this random behavior (though it should all be synchronous...), sadly after spending a few hours trying to figure it out I gave up and used this kind of brute-force approach, however I will try to fix the root issue in a few weeks.
If you are curious about the GEE App used by Collect Earth do take a look at these scripts (which are the ones used by the app):
Script called from the **GEE App** that takes the URL parameters and sends them to the "main" script: https://code.earthengine.google.com/?scriptPath=users%2Fsanchezpauspro%2FApps%3ACollectEarthPlotAncillary
The **main** script mounting the UI : https://code.earthengine.google.com/?scriptPath=users%2Fcollectearth%2Fce_scripts%3Aframes_landsat_v4
The auxiliary scripts used by the "main" one :
**Charts** : https://code.earthengine.google.com/?scriptPath=users%2Fcollectearth%2Fce_scripts%3Acommon%2Fcharts_v2
**Landsat imagery** : https://code.earthengine.google.com/?scriptPath=users%2Fcollectearth%2Fce_scripts%3Acommon%2FSentinelLandsatImagery
**Sentinel imagery** : https://code.earthengine.google.com/?scriptPath=users%2Fcollectearth%2Fce_scripts%3Acommon%2Fsentinel2
**UI helper** methods : https://code.earthengine.google.com/?scriptPath=users%2Fcollectearth%2Fce_scripts%3Acommon%2Fui
More **helper** methods for imagery : https://code.earthengine.google.com/?scriptPath=users%2Fcollectearth%2Fce_scripts%3Acommon%2Futils
Many examples here with the full repository: repository
----------------------------------------
https://code.earthengine.google.com/?accept_repo=users/collectearth/ce_scripts
![alt text][1]
[1]: http://www.openforis.org/support/upfiles/chrome_2021-01-09_10-42-24.png