I'm learning about anomalies and I'm a bit confused about their relationships to 2-cocycles and 3-cocycles (in the group cohomology $H^{\bullet}(G, U(1))$). The below might only apply to 't Hooft anomalies.
I read in some places (e.g. this answer) that an anomaly corresponds to a nontrivial 2-cocycle, i.e. when the Hilbert space transforms under a projective representation.
Elsewhere (e.g. p4 of this paper) 't Hooft anomalies in a $D$-dimensional theory correspond instead to non-trivial (D+1)-cocycles; later in s2.2 the author refers to a `nontrivial extension with a trivial anomaly'. I asked a prof and he said the anomaly is the obstruction to uplifting the projective representation to a genuine representation. But I was under the impression that you could always uplift to a genuine representation of a central extension.
Would appreciate any clarification/classification/pointers to references where the two things are discussed together - and of course corrections for anything I have misunderstood.