It's definitely a problem with the "mixed use" buildings going up on the SF peninsula. The ground floor stores are marginal, vacant, or used as office space. A 5-story building can't support a convenience store by itself.
There have been startups which tried convenience stores that were giant vending machines, but that hasn't been successful. Amazon Go didn't really work out; there are a few stores, but no major deployment. There's a startup in China which puts automated stores in a shipping container sized box, but that hasn't been successful in the US.
Also most apartment developers don't know how to rent commercial spaces. So some ground floor spaces are vacant because it was only put in to allow the apartments above and so it isn't actually possible to get a commercial lease. (commercial leases allow a lot of remodeling and have other terms different from the standard residential lease, so anyone looking that a commercial lease will refuse the space)