If we use `__meteor_runtime_config__.ROOT_URL` directly, as we were
previously, then we end up sending Cordova clients to http:// URLs even
if force-ssl is being used in the app. This is fairly bad on its own
(always sending cordova clients to http:// URLs instead of https://),
but made even worse by the fact that we don't set CORS headers on
force-ssl redirects (that is, the app breaks completely if the client
makes a DDP connection to an http:// URL for a force-ssl app).
These errors should look like connection errors, not clean closes:
- Heartbeat timeout (DDP-level or SockJS-level)
- Connection timeout (SockJS implementation)
The "disconnected with no error while waiting for something we asked
for" error in ServiceConnection is now a DDP.ConnectionError so that it
prints better.
If a command refuses to run due to a catalog sync error, it should print
the error. (Commands that merely warn that they could not sync don't
print that error, unless METEOR_LOG=debug.)
So far I have only removed files from packages that are included by
default in newly `meteor create`d projects. We should probably make a pass
over all the core packages, too.
This is to guard against a potential bug arising from the
way we poll to see if `Template.body` is rendered. It's
worth knowing that Cordova on Android hides the launch
screen automatically after a while, but on iOS it can hang
forever unless hidden explicitly.
Experiments have shown that HCP breaks when cordova.plugin is attached but the
properties of it are not. So we add just another duck tape polling to retry if
necessary.
Fixes#2817. Regular Expressions in JavaScript keep the state when matching for
the same string. When there are two documents with the same value of the
matching field, the minimongo can incorrectly filter collection because regexp
would return different values on different calls.