It might be argued that it is happening now, by degrees, and that the scientists are telling us by degrees. The frog doesn't know when it's too late if the water in the pot is heated gradually.
Let's see--we've got humongous holes in the ozone layer, and the amphibious life is dying (again, frogs). It's just a lowly part of the food chain at this point. The pH of the oceans has become more acidic, the whales are beaching themselves (the only thing they think might be doing it is submarine sonar, but it isn't entirely known), a huge chunk of a gargantuan, ancient iceberg is sloughing off, and there are massive wildfires that are destroying huge amounts of acreage in the west.
Fishing off the northeast coast of the U.S. is declining from over-fishing. Run-off from farms is polluting the water--hormones and antibiotics are in the meats we eat (including fish) and it is being documented that both young human males and females are exhibiting signs of heightened estrogen levels which help induce early puberty and give males gynecomastia and other female characteristics.
Super germs are resistant to antibiotics these days, in part due to their overusage in the past by doctors, but also partly because of antibiotic use in animals (whether they show symptoms of an illness or not) that we consume.
There are smog alerts in our larger cities of the world--Los Angeles, Mexico City, Houston, etc., where people have to stay inside if they have sensitivity to poor air quality.
Individually, none of these things would probably herald the end of humanity as we know it. Individually, many of these things could be remedied, e.g., stopping the injudicious use of antibiotics and hormones in cattle and poultry, and the overuse of fertilizers on our crops. But here come the major corporation attorneys to represent their clients' interests above all others...
Earth will continue to exist whether human beings are on it or not. I think our species is trying very hard to kill itself, and it will succeed gradually. More ailments--less access to health care and less funds devoted to prevention.
Then there is always war. With the exception of the babies conceived before the soldiers ship out, war is always successful in decreasing the population. Add to this Mutual Assured Destruction, building nukes that are "deterrents" but will always have someone there with the launch codes in case the Prez gets an idea.*
Barring having a comet or a bunch of them coming to hit us dead on, we are not going to get a big warning that we're all going to die.
At that point I am sort of 50/50 on whether we should know it or not, but the newspapers and TV will be intent on selling the story right up until the bitter end.Have a nice day.

------------------------------
*Edited to say: In fairness, I want to include
any world leaders, or terrorists, who have access to nukes and get the crazy idea to use them!