Beamer - ! File ended while scanning use of \next
The fix was 2-part
\end{frame}
can NOT be indented\end{frame}
cannot have any comments directly after it
Changing this line fixed the error.
I got the same error message and the problem was a [fragile]
in
\begin{frame}[fragile]{Title}
...
\end{frame}
that I use for frames that contain LaTeX Listings code. I put it there before actually using Listings in that frame.