WASHINGTON — A rare thing emerged in Washington early this year: agreement. Republicans and Democrats in Congress, as well as the Trump White House, all said they wanted a new federal law to protect people’s online privacy. Numerous tech companies urged them on.

And they had a deadline. With a broad California privacy law set to go into effect early next year, many federal lawmakers and the tech companies wanted to get ahead of it and avoid having state-by-state rules.

But after months of talks, a national privacy law is nowhere in sight.

The window to pass a law this year is now quickly closing. Lawmakers continue to disagree on parts of the bill, including how best to enforce a new law and how much freedom states should have to pass their own rules. And some California lawmakers have balked at efforts to override their state’s new law.

Several lawmakers and their aides insist that they are making headway, meeting regularly to sort out the remaining roadblocks.