react-native-maps / react-native-maps

React Native Mapview component for iOS + Android
MIT License
15k stars 4.84k forks source link

Crash on custom marker after enable new architecture IOS #4802

Open meghvarse opened 1 year ago

meghvarse commented 1 year ago

Summary

IOS app crashed if add any view inside with error after enable new architecture :-

*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[RCTViewComponentView view]: unrecognized selector sent to instance 0x7f8e0e612390'

Screenshot 2023-07-22 at 3 15 42 PM

Reproducible sample code

import React from 'react';
import { Marker } from 'react-native-maps';

<Marker
              key={index}
              zIndex={ZIndexValue}
              coordinate={{
                latitude: get(item, 'location.latitude', 0),
                longitude: get(item, 'location.longitude', 0),
              }}
              tracksViewChanges={mapMarkers.trackChanges}
            >
<View style={{
                width: 40,
                height: 40,
                justifyContent: 'center',
                alignItems: 'center',
                borderRadius: 40 / 2,
                backgroundColor: 'red',
              }}></View>
</Marker>

Steps to reproduce

Add View component inside Marker.

Expected result

Worked with custom marker.

Actual result

App crashed when add any view inside marker.

React Native Maps Version

1.7.1

What platforms are you seeing the problem on?

iOS (Google Maps)

React Native Version

0.72.3

What version of Expo are you using?

Not using Expo

Device(s)

IOS Simulator

Additional information

No response

ravindraguptacapgemini commented 1 year ago

@Simon-TechForm can you please check this issue, this is happening with many switching to new architecture

ravindraguptacapgemini commented 1 year ago

@meghvarse found any workaround for this issue?

meghvarse commented 1 year ago

@meghvarse found any workaround for this issue?

@ravindraguptacapgemini Not yet

meghvarse commented 11 months ago

Any update on this please?

github-actions[bot] commented 8 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If the issue remains relevant, simply comment Still relevant and the issue will remain open. Thank you for your contributions.

dhanasekarancm commented 8 months ago

I have referenced the example app and modified the API key as follows in AppDelegate.mm

[GMSServices provideAPIKey:[[NSBundle mainBundle] objectForInfoDictionaryKey:@"MAPS_API_KEY"]];

However, it only functions correctly when added as indicated in the documentation:

[GMSServices provideAPIKey:@"MAPS_API_KEY"];

github-actions[bot] commented 5 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If the issue remains relevant, simply comment Still relevant and the issue will remain open. Thank you for your contributions.

janoslc commented 5 months ago

Still relevant

github-actions[bot] commented 2 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If the issue remains relevant, simply comment Still relevant and the issue will remain open. Thank you for your contributions.

Flowwl commented 2 months ago

Still relevant