Location.reverseGeocodeAsync crashing in ios

Hello!

Similar to Location.reverseGeocodeAsync crashing w/ certain latlongs in ios

When I change region and try to make reverseGeocodeAsync for some values expo client crashed, for example

Location.reverseGeocodeAsync( { longitude: 30.133986502243097, latitude: 59.97234406586732 } )

Worst of all that the problem is not solved with try-catch or async

Device: iPhone 6

expo version 30.0.1

Thanks!

Hey @chelovek-18,

Can you throw the code that is causing the crash into a Snack so we can reproduce it on our end?

Cheers,

Adam

Thanks!

I truncated the code of the App.js file before:

Working version:

import React from 'react';
import { View, Text } from 'react-native';
import { Location } from 'expo';

export default class App extends React.Component {
    render() {
        ( async () => {
            let regionName = await Location.reverseGeocodeAsync( { longitude: 37.6172999, latitude: 55.755826 } );
        })();

        return (
            <View style={ { flex: 1 } }>
                <Text>Expo</Text>
                <Text>Expo</Text>
                <Text>Expo1</Text>
            </View>
        )
    }
}

Non-working version:

import React from 'react';
import { View, Text } from 'react-native';
import { Location } from 'expo';

export default class App extends React.Component {
    render() {
        ( async () => {
            let regionName = await Location.reverseGeocodeAsync( { longitude: 30.133986502243097, latitude: 59.97234406586732 } );
        })();

        return (
            <View style={ { flex: 1 } }>
                <Text>Expo</Text>
                <Text>Expo</Text>
                <Text>Expo2</Text>
            </View>
        )
    }
}

Difference only in coordinates. In the second version coordinates specify in the sea.

I wanted to receive coordinates from here:

<MapView
    style={{ position: 'absolute', zIndex: 50, width: _env.window.width, height: 400 }}
    region={ this.state.region }
    onRegionChange={ ( region ) => { regions.push( JSON.parse( JSON.stringify( region ) ) ); } }
/>

and wanted region name with reverseGeocodeAsync and write his to TextInput. In the android everything works perfectly. But the iPhone crashing on some coordinates.

Sorry for my English :slight_smile:

And happy holidays! :christmas_tree:

(The problem in

let regionName = await Location.reverseGeocodeAsync( { longitude: 30.133986502243097, latitude: 59.97234406586732 } );

when it run, application crashing in ios)

@adamjnav ?..

Hi, @adamjnav

I am sorry to bother you, but I wanted to know, wait me some answer or not. Thanks!

@adamjnav ?.. Please answer me?..

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