When I define amsthm theorem environments with shared counters,
autoref messes up the names of the references.
For example, in the output below, we should have "Definition 2" instead of "Theorem 2".
\documentclass{article}
\usepackage{amsthm}
\usepackage{hyperref}
\theoremstyle{theorem}
\newtheorem{theorem}{Theorem}
\theoremstyle{definition}
\newtheorem{definition}[theorem]{Definition}
\begin{document}
\begin{theorem}
\label{wonderful-theorem}
This is a wonderful theorem.
\end{theorem}
\begin{definition}
\label{awesome-definition}
This is an awesome definition.
\end{definition}
Look at the wonderful \autoref{wonderful-theorem}
and the awesome \autoref{awesome-definition}.
\end{document}



\theoremstyle{theorem}is not defined by default (as pointed out by skpblack in a comment to his answer). You probably meantplain? – Josse Jul 18 '18 at 14:29