Today I faced the same issue, What I found is, If you execute tests "inside your office" using physical device, the GPS locator can be disturbed by external things like walls, or by the simple reason that you are trying to do this operation "indoor" and, generally, this should be executed outdoor.
My suggestion is: try geolocation using enableHighAccuracy set to true
, if this fail with location request timed out error (in the office this can fail), retry with false
, this should work, in my case it did.
Hope this will help you.