Location Services bug?

Hi,

I have a problem with the Location Services.

I have two physical test devices, a Samsung J3 and a Samsung J5.
The J3 is running Android version 8.0
The J5 is running Android version 7.0

        const { status } = await Permissions.askAsync(Permissions.LOCATION);
        console.log('GPS Status: ', status);
        if (status === 'granted') {
            let location = Location.getCurrentPositionAsync({enableHighAccuracy: true});
            console.log('Location', location);
        } else {
            throw new Error('Location permission not granted');
        }

The above code works correctly on the J5 running 7.0
However this appears broken on the J3 running 8.0

Console outputs:
GPS Status: granted
Location:

Promise {_40: 0, _65: 0, _55: null, _72: null}
_40: 0
_51: 0
_55: Error: Location services are disabled at createErrorFromErrorData (blob:http://192.168.0.20:19001/6feb0b5c-2a95-4e61-a85a-49da6a2b6678:3160:17) at blob:http://192.168.0.20:19001/6feb0b5c-2a95-4e61-a85a-49da6a2b6678:3112:27 at MessageQueue.__invokeCallback (blob:http://192.168.0.20:19001/6feb0b5c-2a95-4e61-a85a-49da6a2b6678:3552:18) at blob:http://192.168.0.20:19001/6feb0b5c-2a95-4e61-a85a-49da6a2b6678:3299:18 at MessageQueue.__guard (blob:http://192.168.0.20:19001/6feb0b5c-2a95-4e61-a85a-49da6a2b6678:3456:13) at MessageQueue.invokeCallbackAndReturnFlushedQueue (blob:http://192.168.0.20:19001/6feb0b5c-2a95-4e61-a85a-49da6a2b6678:3298:14) at http://192.168.0.20:19001/debugger-ui/debuggerWorker.js:72:58
_65: 2
_72: null

The error:

Possible Unhandled Promise Rejection (id: 0):
Error: Location services are disabled
Error: Location services are disabled
    at createErrorFromErrorData (blob:http://192.168.0.20:19001/6feb0b5c-2a95-4e61-a85a-49da6a2b6678:3160:17)
    at blob:http://192.168.0.20:19001/6feb0b5c-2a95-4e61-a85a-49da6a2b6678:3112:27
    at MessageQueue.__invokeCallback (blob:http://192.168.0.20:19001/6feb0b5c-2a95-4e61-a85a-49da6a2b6678:3552:18)
    at blob:http://192.168.0.20:19001/6feb0b5c-2a95-4e61-a85a-49da6a2b6678:3299:18
    at MessageQueue.__guard (blob:http://192.168.0.20:19001/6feb0b5c-2a95-4e61-a85a-49da6a2b6678:3456:13)
    at MessageQueue.invokeCallbackAndReturnFlushedQueue (blob:http://192.168.0.20:19001/6feb0b5c-2a95-4e61-a85a-49da6a2b6678:3298:14)
    at http://192.168.0.20:19001/debugger-ui/debuggerWorker.js:72:58

This was happening in expo v28, i have now upgraded to v31 just in case and the problem still persists.

Any ideas?

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.