Driverless vehicles promise a future with less congestion and pollution, fewer accidents resulting from human error and better mobility for people with disabilities, supporters say.

But every now and then, one of the cars runs into trouble in a way that casts a bit of doubt on that bold vision.

So it was on Tuesday in San Francisco, where a driverless car somehow drove into a city paving project and got stuck in wet concrete.

Paul Harvey, 74, a retired contractor who lives in the city’s Western Addition neighborhood, took a photo of the car with roof-mounted sensors, tipped slightly forward, its front wheels mired in the freshly poured concrete.

“I thought it was funny,” Mr. Harvey said in an interview on Wednesday. “I was kind of pleased because it illustrated how creepy and weird the whole thing is to me.”

The incident, previously reported by SFgate.com, happened just days after California regulators agreed to expand driverless taxi services in San Francisco, despite the safety concerns of local officials and community activists.

In a 3-to-1 vote last week, the California Public Utilities Commission, which regulates self-driving cars in the state, gave Cruise and Waymo permission to offer paid rides anytime during the day, throughout the city.

Cruise, a General Motors subsidiary, had been offering taxi service in one-third of the city while Waymo, which is owned by Google’s parent company, Alphabet, was offering free trips to passengers.

The mishap on Tuesday involved a Cruise vehicle, according to city officials who said it was not clear how the car had ended up in concrete.

Rachel Gordon, a spokeswoman for the San Francisco Department of Public Works, said that the paving project on Golden Gate Avenue had been marked off with construction cones and that there were workers with flags at each end of the block.

“That portion of the road has to be repaved, at Cruise’s expense,” Ms. Gordon said. “Fortunately, no one was injured.”

Ms. Gordon said that city officials had been “voicing concerns” about the vehicles, which have driven onto fire hoses or “just stopped in the middle of the road.” She said that the city was willing to work with the companies but that “there’s still a lot of work to do, we believe.”

A Cruise spokesman, Drew Pusateri, confirmed that one of the company’s driverless vehicles had “entered a construction area and stopped in wet concrete.”

Mr. Pusateri said the company had “recovered” the vehicle, although it was not clear if it was able to drive out of the concrete or if it had to be pulled out. He said the company was in contact with city officials about the incident.

Driverless cars have become a common sight in San Francisco, a tech hub where they are often seen on test drives, gathering data that is used to improve their autonomous technology.

Though driverless cars have not been blamed for any serious injuries or crashes in San Francisco, they have been involved in several jarring episodes.

On Friday night, as many as 10 Cruise driverless cars stopped working near a music festival in San Francisco’s North Beach, causing traffic to back up, according to The San Francisco Chronicle, which reported that the company had blamed “wireless connectivity issues.”

In January, a Cruise vehicle entered an area where firefighters were working and did not stop until a firefighter started “banging on its hood and smashing the vehicle’s window,” according to city records. In May, a driverless Waymo car blocked a fire vehicle while it was backing into a station.

Driverless-car companies have strongly defended their safety records, particularly when compared with the tens of thousands of people who die in car crashes every year in the United States.

Referring to its autonomous vehicles, Cruise said in a statement in April, “Throughout our first million driverless miles, our A.V.s were involved in fewer collisions, were the primary contributor to fewer collisions and were involved in fewer severe collisions with meaningful risk of injury than human drivers were in a comparable driving environment.”

Paul Leonardi, a professor of technology management at the University of California, Santa Barbara, said it would be foolish to expect driverless cars to operate perfectly. The cars, like any new technology that relies on machine learning, need to operate in real-world conditions to improve.

“It needs to experience a diverse set of use cases so it can learn, and driving into wet concrete is one of those use cases,” Professor Leonardi said. “We might frame this as a positive that all it did was get stuck in the concrete.”

He added that when driverless cars encounter conditions like cones and wet concrete, they “can learn from it and the machines can figure out what to do better next time.”

Yiwen Lu contributed reporting.