I found the solution. It is because of the Ktor version. Changing Ktor version from 3.2.0 to 3.2.1 solved my issue.