  We construct a relative version of the Crane-Yetter topological quantum field
theory in four dimensions, from non-semisimple data. Our theory is defined
relative to the classical $G$-gauge theory in five dimensions -- this latter
theory assigns to each manifold $M$ the appropriate linearization of the moduli
stack of $G$-local systems, called the character stack. Our main result is to
establish a relative invertibility property for our construction. This
invertibility echoes -- recovers and greatly generalizes -- the key
invertibility property of the original Crane-Yetter theory which allowed it to
capture the framing anomaly of the celebrated Witten-Reshetikhin-Turaev theory.
In particular our invertibilty statement at the level of surfaces implies a
categorical, stacky version of the unicity theorem for skein algebras; at the
level of 3-manifolds it equips the character stack with a canonical line
bundle. Regarded as a topological symmetry defect of classical gauge theory,
our work establishes invertibility of this defect by a gauging procedure.
