  We present a general approach for detecting when a fusion category symmetry
is anomalous, based on the existence of a special kind of Lagrangian algebra of
the corresponding Drinfeld center. The Drinfeld center of a fusion category
$\mathcal{A}$ describes a $(2+1)D$ topological order whose gapped boundaries
enumerate all $(1+1)D$ gapped phases with the fusion category symmetry, which
may be spontaneously broken. There always exists a gapped boundary, given by
the \emph{electric} Lagrangian algebra, that describes a phase with
$\mathcal{A}$ fully spontaneously broken. The symmetry defects of this boundary
can be identified with the objects in $\mathcal{A}$. We observe that if there
exists a different gapped boundary, given by a \emph{magnetic} Lagrangian
algebra, then there exists a gapped phase where $\mathcal{A}$ is not
spontaneously broken at all, which means that $\mathcal{A}$ is not anomalous.
In certain cases, we show that requiring the existence of such a magnetic
Lagrangian algebra leads to highly computable obstructions to $\mathcal{A}$
being anomaly-free. As an application, we consider the Drinfeld centers of
$\mathbb{Z}_N\times\mathbb{Z}_N$ Tambara-Yamagami fusion categories and recover
known results from the study of fiber functors.
