Google Maps crashes app on Android

Hello,
I have a problem opening Google Maps on Android. I have followed all steps necessary in MapView docs. The app crashes both when using Expo XDE (it crashes whole expo app) and when running the built app on several Android devices. The app works on ios (using Apple Maps).

dependencies: expo: “^25.0.0”, react: “16.2.0”, react-native: “0.52.0”

Unfortunately, I am not getting any logs in Expo XDE about the error. I tried running adb logcat to see any usable output, but unfortunately I was not able to spot anything since the logs are hard to read and follow (there was a lot of them, maybe a problem with the device?).

I was wondering if anyone had similar problem or how should I approach solving it?

I can provide additional information if needed.

Thank you.

Hi @lukasloukota - sorry you’re having trouble with this! Unfortunately the best way to figure out what’s going on is adb logcat. If you post the logs here from between when you launch the app and a bit after it crashes, we can help pick out the important bits :slight_smile:

Hi @esamelson,
thank you for your reply. After further inspection of adb logcat, I was able to pinpoint the cause of the error.
I will post it here along with the logs, if anyone has the same or similar problem.

When rendering a Marker on the map, I was setting identifier prop as a index (since I was rendering multiple Markers) and in the logs I got the following error:
E/unknown:ViewManager(13464): abi25_0_0.com.facebook.react.bridge.UnexpectedNativeTypeException: TypeError: expected dynamic type string', but had type int64’

So changing the identifier prop on Marker from index to marker.title (the title of the marker) solved the problem of the app crashing when opening Google Maps. Apple Maps do not crash when using int or string for the identifier prop.

Here are the logs before, during and after the crash (I limited it only for errors with adb logcat *:E):

adb logcat logs

E/ (13464): appName=cz.thinkeasy.kjuarko, acAppName=/system/bin/surfaceflinger
E/ (13464): 0
E/unknown:ViewManager(13464): Error while updating prop identifier
E/unknown:ViewManager(13464): abi25_0_0.com.facebook.react.bridge.UnexpectedNativeTypeException: TypeError: expected dynamic type string', but had type int64’
E/unknown:ViewManager(13464): at abi25_0_0.com.facebook.react.bridge.ReadableNativeMap.getString(Native Method)
E/unknown:ViewManager(13464): at abi25_0_0.com.facebook.react.uimanager.ReactStylesDiffMap.getString(ReactStylesDiffMap.java:73)
E/unknown:ViewManager(13464): at abi25_0_0.com.facebook.react.uimanager.ViewManagersPropertyCache$StringPropSetter.extractProperty(ViewManagersPropertyCache.java:243)
E/unknown:ViewManager(13464): at abi25_0_0.com.facebook.react.uimanager.ViewManagersPropertyCache$PropSetter.updateViewProp(ViewManagersPropertyCache.java:79)
E/unknown:ViewManager(13464): at abi25_0_0.com.facebook.react.uimanager.ViewManagerPropertyUpdater$FallbackViewManagerSetter.setProperty(ViewManagerPropertyUpdater.java:129)
E/unknown:ViewManager(13464): at abi25_0_0.com.facebook.react.uimanager.ViewManagerPropertyUpdater.updateProps(ViewManagerPropertyUpdater.java:48)
E/unknown:ViewManager(13464): at abi25_0_0.com.facebook.react.uimanager.ViewManager.updateProperties(ViewManager.java:34)
E/unknown:ViewManager(13464): at abi25_0_0.com.facebook.react.uimanager.NativeViewHierarchyManager.createView(NativeViewHierarchyManager.java:214)
E/unknown:ViewManager(13464): at abi25_0_0.com.facebook.react.uimanager.UIViewOperationQueue$CreateViewOperation.execute(UIViewOperationQueue.java:153)
E/unknown:ViewManager(13464): at abi25_0_0.com.facebook.react.uimanager.UIViewOperationQueue$1.run(UIViewOperationQueue.java:813)
E/unknown:ViewManager(13464): at abi25_0_0.com.facebook.react.uimanager.UIViewOperationQueue.flushPendingBatches(UIViewOperationQueue.java:926)
E/unknown:ViewManager(13464): at abi25_0_0.com.facebook.react.uimanager.UIViewOperationQueue.access$2100(UIViewOperationQueue.java:47)
E/unknown:ViewManager(13464): at abi25_0_0.com.facebook.react.uimanager.UIViewOperationQueue$DispatchUIFrameCallback.doFrameGuarded(UIViewOperationQueue.java:986)
E/unknown:ViewManager(13464): at abi25_0_0.com.facebook.react.uimanager.GuardedFrameCallback.doFrame(GuardedFrameCallback.java:31)
E/unknown:ViewManager(13464): at abi25_0_0.com.facebook.react.modules.core.ReactChoreographer$ReactChoreographerDispatcher.doFrame(ReactChoreographer.java:136)
E/unknown:ViewManager(13464): at abi25_0_0.com.facebook.react.modules.core.ChoreographerCompat$FrameCallback$1.doFrame(ChoreographerCompat.java:107)
E/unknown:ViewManager(13464): at android.view.Choreographer$CallbackRecord.run(Choreographer.java:798)
E/unknown:ViewManager(13464): at android.view.Choreographer.doCallbacks(Choreographer.java:603)
E/unknown:ViewManager(13464): at android.view.Choreographer.doFrame(Choreographer.java:571)
E/unknown:ViewManager(13464): at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:786)
E/unknown:ViewManager(13464): at android.os.Handler.handleCallback(Handler.java:815)
E/unknown:ViewManager(13464): at android.os.Handler.dispatchMessage(Handler.java:104)
E/unknown:ViewManager(13464): at android.os.Looper.loop(Looper.java:194)
E/unknown:ViewManager(13464): at android.app.ActivityThread.main(ActivityThread.java:5576)
E/unknown:ViewManager(13464): at java.lang.reflect.Method.invoke(Native Method)
E/unknown:ViewManager(13464): at java.lang.reflect.Method.invoke(Method.java:372)
E/unknown:ViewManager(13464): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:955)
E/unknown:ViewManager(13464): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:750)
E/AndroidRuntime(13464): FATAL EXCEPTION: main
E/AndroidRuntime(13464): Process: cz.thinkeasy.kjuarko, PID: 13464
E/AndroidRuntime(13464): abi25_0_0.com.facebook.react.bridge.JSApplicationIllegalArgumentException: Error while updating property ‘identifier’ of a view managed by: AIRMapMarker
E/AndroidRuntime(13464): at abi25_0_0.com.facebook.react.uimanager.ViewManagersPropertyCache$PropSetter.updateViewProp(ViewManagersPropertyCache.java:92)
E/AndroidRuntime(13464): at abi25_0_0.com.facebook.react.uimanager.ViewManagerPropertyUpdater$FallbackViewManagerSetter.setProperty(ViewManagerPropertyUpdater.java:129)
E/AndroidRuntime(13464): at abi25_0_0.com.facebook.react.uimanager.ViewManagerPropertyUpdater.updateProps(ViewManagerPropertyUpdater.java:48)
E/AndroidRuntime(13464): at abi25_0_0.com.facebook.react.uimanager.ViewManager.updateProperties(ViewManager.java:34)
E/AndroidRuntime(13464): at abi25_0_0.com.facebook.react.uimanager.NativeViewHierarchyManager.createView(NativeViewHierarchyManager.java:214)
E/AndroidRuntime(13464): at abi25_0_0.com.facebook.react.uimanager.UIViewOperationQueue$CreateViewOperation.execute(UIViewOperationQueue.java:153)
E/AndroidRuntime(13464): at abi25_0_0.com.facebook.react.uimanager.UIViewOperationQueue$1.run(UIViewOperationQueue.java:813)
E/AndroidRuntime(13464): at abi25_0_0.com.facebook.react.uimanager.UIViewOperationQueue.flushPendingBatches(UIViewOperationQueue.java:926)
E/AndroidRuntime(13464): at abi25_0_0.com.facebook.react.uimanager.UIViewOperationQueue.access$2100(UIViewOperationQueue.java:47)
E/AndroidRuntime(13464): at abi25_0_0.com.facebook.react.uimanager.UIViewOperationQueue$DispatchUIFrameCallback.doFrameGuarded(UIViewOperationQueue.java:986)
E/AndroidRuntime(13464): at abi25_0_0.com.facebook.react.uimanager.GuardedFrameCallback.doFrame(GuardedFrameCallback.java:31)
E/AndroidRuntime(13464): at abi25_0_0.com.facebook.react.modules.core.ReactChoreographer$ReactChoreographerDispatcher.doFrame(ReactChoreographer.java:136)
E/AndroidRuntime(13464): at abi25_0_0.com.facebook.react.modules.core.ChoreographerCompat$FrameCallback$1.doFrame(ChoreographerCompat.java:107)
E/AndroidRuntime(13464): at android.view.Choreographer$CallbackRecord.run(Choreographer.java:798)
E/AndroidRuntime(13464): at android.view.Choreographer.doCallbacks(Choreographer.java:603)
E/AndroidRuntime(13464): at android.view.Choreographer.doFrame(Choreographer.java:571)
E/AndroidRuntime(13464): at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:786)
E/AndroidRuntime(13464): at android.os.Handler.handleCallback(Handler.java:815)
E/AndroidRuntime(13464): at android.os.Handler.dispatchMessage(Handler.java:104)
E/AndroidRuntime(13464): at android.os.Looper.loop(Looper.java:194)
E/AndroidRuntime(13464): at android.app.ActivityThread.main(ActivityThread.java:5576)
E/AndroidRuntime(13464): at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime(13464): at java.lang.reflect.Method.invoke(Method.java:372)
E/AndroidRuntime(13464): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:955)
E/AndroidRuntime(13464): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:750)
E/AndroidRuntime(13464): Caused by: abi25_0_0.com.facebook.react.bridge.UnexpectedNativeTypeException: TypeError: expected dynamic type string', but had type int64’
E/AndroidRuntime(13464): at abi25_0_0.com.facebook.react.bridge.ReadableNativeMap.getString(Native Method)
E/AndroidRuntime(13464): at abi25_0_0.com.facebook.react.uimanager.ReactStylesDiffMap.getString(ReactStylesDiffMap.java:73)
E/AndroidRuntime(13464): at abi25_0_0.com.facebook.react.uimanager.ViewManagersPropertyCache$StringPropSetter.extractProperty(ViewManagersPropertyCache.java:243)
E/AndroidRuntime(13464): at abi25_0_0.com.facebook.react.uimanager.ViewManagersPropertyCache$PropSetter.updateViewProp(ViewManagersPropertyCache.java:79)
E/AndroidRuntime(13464): … 24 more
E/ ( 530): appName=system_server, acAppName=/system/bin/surfaceflinger
E/ ( 530): 0
E/hwcomposer( 133): [HWC] ION is invalid (handle=0xb6253580, num=-1, idx=-1) !!
E/hwcomposer( 133): [HWC] ION is invalid (handle=0xb444f6a0, num=-1, idx=-1) !!

Is there a way to view these logs when using the Expo XDE App? I am asking since the app now crashes in Google Maps again and without building it (if I understand it correctly) I won’t be able to see the changes I make “live”.
EDIT: I can just run the expo app and view adb logcat again. It occured to me after posting the question.

Thank you for your help.

1 Like

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