MapView causing crash on both Android and iOS

  1. SDK Version: 35
  2. Platforms: Android/iOS

We have just created a release using MapView react-native-maps. During testing locally everything working fine with the maps on both platforms through Expo.

The Standalone build however crashes for both. No report in Sentry.

A lot of similar issues point to app.json not being setup properly. From what i can see, i have everything in place as required;

...
"ios": {
      ...
      "config": {
        "googleMapsApiKey": "AIzaSyCCgxxx"
      }
    },
    "android": {
      "googleServicesFile": "./google-services.json",
      ...
      "config": {
        "googleMaps": {
          "apiKey": "AIzaSyBXUxxx"
        }
      }
    },
...

I created a separate API key for iOS and Android to see if that would help as the Android API key is restricted to Android use only. I set the iOS API key restricted to iOS and added the bundle name.

Is it possible that these changes are simply not being published via the OTA updates? If that is the case, it’s manageable but not ideal.

Otherwise, i am at a loss as to how to debug successfully.

1 Like

Somehow i had missed this part; https://docs.expo.io/versions/v35.0.0/workflow/publishing/#some-native-configuration-cant-be-updated-by

Looks like, more than likely, the issue is simply that this update can’t be done OTA

My project always crashed with the error message "Unfortunately, Expo has stopped.”
It was very simple mapview test project that returns only mapview element.
I did all the settings about google api key.
I’m really not sure what’s the reason is.
What I want to do is to run this simple test code(“https://docs.expo.io/versions/latest/sdk/map-view/”) in my local machine with android emulator.

import React from 'react';
import MapView from 'react-native-maps';
import { StyleSheet, View, Dimensions } from 'react-native';

export default class App extends React.Component {
  render() {
    return (
      <View style={styles.container}>
        <MapView style={styles.mapStyle} />
      </View>
    );
  }
}

const styles = StyleSheet.create({
  container: {
    flex: 1,
    backgroundColor: '#fff',
    alignItems: 'center',
    justifyContent: 'center',
  },
  mapStyle: {
    width: Dimensions.get('window').width,
    height: Dimensions.get('window').height,
  },
});

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