Space is big. Like, really, really big. You have no idea how hugely, mind-bogglingly big it is. So, in all that empty space, it makes perfect sense you could hide a whole lot of stuff, right?
Well, not really. Space may be big, but it's also pretty much empty, with not a lot of things to hide behind. Anything that puts out any amount of any kind of energy can be readily spotted against the near-absolute-zero background of space, and any object with sufficient mass to be troublesome would reflect enough light to be just as visible (at least, in theory).
But that just doesn't make for a very interesting story. If you can see the alien battlefleet when it's six months away, and have six months to prepare an appropriate welcome, a lot of the drama and tension can get sucked out of the story right there. If the Earth-shattering asteroid is spotted before it ever even enters the solar system, there's no need for an ad-hoc plan to send a Ragtag Bunch of Misfits up to destroy it, you can make a plan or two, and three or four contingency plans if those fail.
Thus, we have this trope, when something that really should have been readily visible to anyone who actually watches the sky for a living (to say nothing of amateurs with decent telescopes), but somehow everyone misses it until it's right at our doorstep.
Can be a Justified Trope, if the object in question has some kind of stealth technology, or at times on Earth (or other alien worlds) where astronomy was functionally nonexistent. Can also be justified depending on how Faster-Than-Light Travel works in the setting: if FTL is accurate enough to drop a ship or fleet into an orbit around their target, and there's no way to detect ships in FTL, then the ship can literally appear over its target with no warning (one of many reasons aspiring Sci-Fi writers are encouraged to think long and hard about the rules of their FTL drives). Can also be Truth in Television (see Real Life, below) for objects small enough that they aren't easily visible, but still big enough to cause lots of damage (not necessarily extinction-level damage, but enough to be worrisome).
Compare Stealth in Space, where someone manages to deliberately hide themselves while in space.
- Starship Troopers. The Bugs send a large asteroid to impact the Earth. Even though the Federation has considerably more advanced technology than present-day Earth (including starships), it somehow misses seeing the asteroid approaching. This leads to Earth (later in the story but earlier in the narrative) upgrading its defenses to stop other incoming "Bug Meteors," and lends to the fan-theory that the war with the Bugs was engineered by the Federation in the first place.
- Armageddon: The person who first notices the Texas-sized asteroid that is going to hit Earth is an amateur astronomer, and the fact that NASA (or any other space agency on the planet, for that matter) didn't detect said asteroid at all until then (when the asteroid is about two weeks away from hitting Earth) and that there are no other actual plans that may work (other than than the one that is Crazy Enough to Work) because it is so close is lampshaded to the point of Anviliciousness.
- Deep Impact: Zigzagged. It is an amateur astronomer who first notices the approaching comet, but his first reaction is to ask a professional astronomer with a much more powerful telescope to double-check this unknown light in the sky (another amateur mistakes it for the star Megrez). On the other hand, the comet is detected well over a year before impact, giving the various nations plenty of time to come up with ideas for countermeasures.
- Independence Day: The huge alien ship (one-quarter the size of the moon!) and its attending fleet coming to attack Earth is first noticed when it begins transmitting a signal, by which point it's within the lunar orbit. Once they know it's there they're able to track it fairly reliably.
- Justified in Independence Day: Resurgence, as the massive (3,000 mile wide!) mothership is shown to have a cloaking device of some kind. Likely the mothership in the previous film had one, as well.
- The Hitchhiker's Guide to the Galaxy Hand Waves Earth's obliviousness to the approach of the Vogon Constructor Fleet in the book:
The huge yellow something went unnoticed at Goonhilly, they passed over Cape Canaveral without a blip, Woomera and Jodrell Bank looked straight through them, which was a pity because it was exactly the sort of thing they'd been looking for all these years.
- Calling Captain Future by Edmond Hamilton begins with a Do Not Adjust Your Set moment where a mysterious person warns of a danger; an incoming dark star that will destroy the Solar System unless all its resources are entrusted to him to avert the danger. The star is already close enough to be seen through an amateur's telescope, yet the professional astronomers have noticed nothing, so naturally, after this kind of blunder no one trusts them when they say it's merely a low-mass dust cloud. Subverted at the end; it's nothing but an enormous hologram, so naturally nothing could be detected until the projectors were turned on.
- Probably one of the more realistic versions in the third book of The Enchantment Emporium. There are two objects very close to each other in the sky from their point of view so while they do notice the first one it's going to be a standard near miss (in cosmic terms) but it kept them from noticing the one behind it on a collision course until it's too late.
- Comet! by Laurence E. Dahners, Hearth-Daster Comet itself is not hidden (it become visible by unassisted eyes shortly after being discovered), NASA instead insists that naming it Earth-Disaster is very bad humor and it will miss Earth by at least 100 000 miles They lied on direct orders of president to prevent global panic while trying to delivery nuclear devices to correct it's trajectory. Situations becomes much more interesting when trajectory begins changing 'by itself' .
- Stargate SG-1:
- Justified in one episode. An asteroid is coming at Earth, and isn't noticed for quite some time because it's not going through the ecliptic (the plane of space where the planets and the asteroid belt are, and thus where all of Earth's observation equipment is aimed). It was blind luck an amateur astronomer noticed it. Turns out the asteroid isn't from the Solar System, and probably launched at Earth from that improbable angle deliberately.
- After the climactic battle over Antarctica in the seventh season, a season 8 episode dealt with the Stargate Program having to scramble to cover up the fact that some astronomers did notice the fleet of alien spaceships getting blown up.
- Played for Laughs and subverted in an episode of Eureka. Sheriff Carter overhears Fargo talking about Nemesis, a star which may intersect Earth's orbital path and wipe out all life on the planet. Carter immediately goes into damage-control mode, assuming he'll have to do his typical "rally his brilliant friends and come up with a wacky plan to save the day" thing, and asks Fargo how long they have. Fargo replies several thousand years. Carter immediately realizes this is not his problem and ceases to care.
- Initially played straight then subverted in Salvation. An MIT student discovers "Samson", an asteroid on a collision course with Earth in 190 days. After his professor disappears, he goes to the tech billionaire Darius Tanz. Being Genre Savvy, Tanz immediately goes to the US government and demands to know more about it. The officials reluctantly admit to have known about the asteroid for awhile but didn't want to cause a panic among the populace, hoping to end the threat before anyone else learns of it.
- Dawn Of War II: Subverted: the Tyranid fleet goes undetected until it's already on several Aurelian planets because the Eldar are interfering with the astronomic data (in the hopes that the Tyranids wouldn't go after a downed craftworld on the planet's surface). When the Blood Ravens send the real data, the planetary administrator finally suffers an intense Break the Haughty moment (and the Tyranid swarm appears on the loading screen).
- Averted in Outpost. The asteroid "Vulcan's Hammer" is detected far away enough that there's time to build an interstellar ship as well as to launch a nuclear weapon for diverting its path. It fails.
- As noted in the page quotes, this is one of many tropes CinemaSins points out. Repeatedly.
- Justified in the The Avengers: Earth's Mightiest Heroes! episode "Assault on 42," which features a prison in the Negative Zone, an alternate dimension that was thought to consist of just energy. Since there wasn't any indication that anything could live there, the prison was built without any sensors pointing out. Therefore nobody (except the semi-telepathic Leader) knows that an alien army is approaching until they start banging on the walls. After that they have to use the sensors from sets of Powered Armor to figure out what's going on.
- Near-Earth Object tracking and response has become an increasingly-high priority with NASA, as the understanding of how devastating such objects can be has increased. While NASA has catalogued and tracked a large number of really big NEOs, there's a lot of smaller, but still devastating, ones that they can't quite find yet.
- As explained in the introduction above just the millions of amateur astronomers worlwide, often with gear a professional observatory would envy, and Internet are the main reasons why the claims of some conspiracy theorists about "NASA hiding that Planet Xnote /Nibiru/whatever is approaching Earth" cannot be taken seriously. While NASA could have detected said planet when it still was far away and hide that fact, somehow with no leaks, sooner or later amateur astronomers would have spotted that object as it approached and reported its presencenote .