What's wrong with this proof that $0 = 1$?
Uniform convergence justifies taking the limit under the integral sign for functions with bounded domain, not for functions whose domain is $\mathbb R$.
Uniform convergence does not justify the interchange for an integral over an infinite interval. As an example, take $f_n(x) =1/n$ for $0\leqslant x\leqslant n$ and $f_n(x) =0$ for $x>n$.
If the improper integral is also uniformly convergent then it is permissible.