Consider the 2-sphere $\mathbb{S}^2\subseteq \mathbb{R}^3$ so that it can be parametrized locally by the spherical coordinates $(\theta,\phi)$, i.e., $\hat{n} = (\sin \theta \cos \phi, \sin \theta \sin \phi, \cos\theta)$. Let me define locally a 1-form by $$ A = \frac{1}{2}(1-\cos\theta )d\phi $$ It's clear (I think) that $A$ can be extended to a smooth 1-form on $\mathbb{S}^2$. Now let's say I have a simple closed contour $\gamma$ in $\mathbb{S}^2$ such that $\gamma (s) = (\theta_0, s)$ where $\theta_0$ is constant in this context and $s\in [0,2\pi]$. Then it's not hard to see that $$ \oint_\gamma A= \pi(1-\cos\theta_0) $$ Now by Stokes' theorem, it seems that $\gamma$ is the boundary of the "upper-sphere" parametrized by $0<\theta < \theta_0$ and $\phi \in (0,2\pi)$ and thus we can apply Stokes' theorem so that $$ \oint_\gamma A = \int_\text{upper} dA = \frac{1}{2} \int_\text{upper} \sin \theta d\theta d\phi $$ Notice that $\sin \theta d\theta d\phi$ is the induced surface measure and thus the RHS is just the solid angle $\Omega(\text{upper})$ enclosed by $\gamma$ divided by 2, i.e., $=\Omega(\text{upper})/2$.
Now this is all good so far. However, one can although think of $-\gamma$ (reversed orientation) as the boundary of the "lower sphere", i.e., that parametrized by $\theta_0 <\theta<\pi$. In this case, you would think that you could apply Stokes' theorem again so that $$ \oint_\gamma A = -\oint_{-\gamma} A = -\int_\text{lower} dA = -\frac{\Omega(\text{lower})}{2} $$ However, this obviously can't be true since this would imply that the solid angle of the entire 2-sphere is $$ \Omega(\text{upper}) +\Omega(\text{lower})=0 $$ I think this is somehow related to the Chern number, but I don't quite understand where I went wrong in my reasoning.
EDIT. After a closer look, it seems that $A$ might not be well-defined near the south pole, i.e., $\theta = \pi$. Indeed, near the south pole, it seems that $A\sim d\phi$ which would mean any sufficiently small contour around the south pole would give $\oint_\gamma A = 2\pi$ and does not converge to zero. Is this the reason why the above reasoning doesn't work?