NavMeshAgent getting stuck on a random point

Hello I can’t figure out why my player gets stuck on a navmesh surface on a random point, the agent suddenly stops calculating path. I need to move the agent manually from the scene to another point of the navmesh surface in order for the agent to start calculating path again. This just happened when I started using the “Runtime navmesh baker” from the github section. GitHub - Unity-Technologies/NavMeshComponents: High Level API Components for Runtime NavMesh Building

Here’s the video of what’s happening: NavMeshAgent Stuck Randomly - YouTube

if I added the terrain manually and bake the navmesh manually, the bug is not occurring. Any idea why this is? Thanks.

I was not able to determine the cause, but I was able to create a code as a get around, this code will detect if that navmeshagent stops randomly, it will re enable the navmesh agent. Place this code in LateUpdate or Update.

if (anim.GetBool("isWalking") && !navMeshAgent.hasPath && navMeshAgent.pathStatus == NavMeshPathStatus.PathComplete) {
            Debug.Log("Character stuck");
            navMeshAgent.enabled = false;
            navMeshAgent.enabled = true;
            Debug.Log("navmesh re enabled");
            // navmesh agent will start moving again
}