A poor internet connection can cause breaks in the code as your device tries to communicate with the locator. There can also be browser conflicts; try another one. Some browsers can cause conflicts with security software and block the location pop-up.
Also, make sure you have enabled Location permissions.