At 2 p.m. Eastern time on Wednesday, during the first nationwide test of the Emergency Alert System, all television channels and radio stations in the United States were supposed to be interrupted by piercing emergency tones. Not a song by Lady Gaga.

But as tests often go, there were some failures, with viewers and listeners in many states saying they saw and heard the alerts at the scheduled time, while others did not. Some DirecTV subscribers said they heard Lady Gaga’s “Paparazzi” when the test was under way. Some Comcast subscribers in northern Virginia said their TV sets were switched over to QVC before the alert was shown.

The federal agencies charged with testing the alert system found that there were flaws, particularly in the system’s connections to cable and satellite distributors. In some cases, the test messages were delayed, perhaps because they were designed to trickle down from one place — the White House in this case — to thousands of stations and distributors.

In Los Angeles, some viewers said the alert, intended for 30 seconds, lasted for almost half an hour; in New York, some viewers didn’t see it at all. But many others reported that the alert arrived right on time and ended right away.