What's wrong with glocks?
From a general perspective, nothing but their fans. It's a firearm, not a miracle, and the abilities of said firearm get overstated... by a lot... frequently.. and usually loudy... accompanied by a healthy dose of crass ignorance.... and a willingness to demonstrate such. It's a good gun with plenty of nice folks who shoot it. However, if i don't know you, and you want to talk about your glock, the fanbase has pretty much trained me to think you an idiot until you prove otherwise.
When you get down to specifics, there are some things wrong with them, but no showstoppers mostly the type of things where is you pick one thing, another thing has to suffer for it, or you can't simply ahve both.
About the only thing i think is a design issue is the poorly supported chamber. Not bad in 9mm (what it was originally designed for), could use a redesign in .40, and borderline in .45. All are aceptable with factory new ammo with reasonable pressure. The .45 is ok enough that I'd simpy recommend being judicious with how far you push handloads. The .40 I would probably swap with a factory aftermarket barrel.
The rest of the issues withthe glock are in the realm of normal variance between models, and the kind of things you use to decide between what guns are OK and what guns you REALLY like.
Grip angle is probably number one. I don't like it, but people are different, so I'm not one of those folks who think every gun should be 1911 shaped. The current grip angle is quite usable, but i don't like it that much. The original, more severe grip angle, was a bit of a PITA for me. Kind of like the steyr is.
Polygonal rifling. Personally I like polygonal barrels just fine, but they mean shooting lead is a bad idea. You like lead, then you probably won't like the polygonal barrel.
Trigger. It tends towards feeling spongy. Without proper polishing, you can feel the springs drag on stuff, and when set up heavy you can really feel it stack. When lightening a trigger, there is a tendency for the reset to become weak and indistinct. You can get a decent feeling trigger set up, but it requires some luck or skill. This last bit applies to most production guns.
Sights. They suck out of the box. Dovetailed sights would be nice, but if not, at least make them durable and a bit nicer.
No restrike capability. Like most striker fired guns. For some this is a must have feature.
Magazines. There are like 6 variants at this point or something stupid. Some drop free, some don't. Some are more prone to jamming, while others are generally problem free. Magazines are one of the most often overlooked items in the quality and reliability of a firearm. Glock just makes getting what you want a bit more confusing.
Frame flex. comes with polymer unless you reinforce it with metal. So you get flex on recoil, or you get a slightly heavier gun. I prefer a metal subframe like the M&P and Steyr. others don't. I find it to be a non-issue with 9mm, but a hot .40 or a mild 10mm will demonstrate it pretty well. A hot 10mm round will demonstrate it a very well.
Finger grooves. Some glock fans will hunt down 2nd gen guns just because of this. Although I like finger grooves when they are in the right place, they can be a major annoyance if they aren't placed right for YOU. That happens to be the case for a significant number of people. I used to think it wasn't that big a deal until i tired someone's gun with finger grooves in the wrong place for me, and it was REALLY annoying. So now I have more sympathy for that particular gripe.
Sensitivity to limp wristing or light loads. Glocks certainly are not the worst offender with regards to this, but they are more sensitive than a number of competitors, so it goes on the list of what's less than perfect.
No beavertail. The gun lends itself to a high grip, which is good. But lots of folks with meaty hands or a REALLy high grip get cut by the slide. I've shot guns that make me bleed, and I have zero patience for it given the number of guns I like that don't do that.
Then there is what the glocks DON'T do despite fanboy claims to the contrary. They do jam. Mainly because they don't like ammo loaded long (especially hollowpoints), the aforementioned limp-wristing, and just gettting plain dirty. The gun DOES need maintenance despite claims to the contrary. There's nothign wrong with this, but the reputation for being maintennace free isn't deserved.