rnmapbox / maps

A Mapbox react native module for creating custom maps
MIT License
2.27k stars 849 forks source link

[Bug]: Android - (NOBRIDGE) ERROR Error: Unsupported top level event type "topRct.mapbox.map.change" dispatched #3583

Open ChrisBindy opened 3 months ago

ChrisBindy commented 3 months ago

Mapbox Implementation

Mapbox

Mapbox Version

default

React Native Version

0.74.5

Platform

Android

@rnmapbox/maps version

10.1.28

Standalone component to reproduce

import React from 'react';
import {
  SafeAreaView,
} from 'react-native';

import {
  Colors,
} from 'react-native/Libraries/NewAppScreen';
import MapboxGL from '@rnmapbox/maps';

const createSimpleMapView = (): React.JSX.Element => {
    return (
        <MapboxGL.MapView
            style={{height: 200, width: 200}}
            zoomEnabled={false}
            scrollEnabled={false}
            scaleBarEnabled={false}>
            <MapboxGL.Camera
                zoomLevel={14}
                centerCoordinate={[-0.118092, 51.509865]}
                animationMode={'none'}
                defaultSettings={{
                    centerCoordinate: [-0.118092, 51.509865],
                    zoomLevel: 14,
                }}
            />
        </MapboxGL.MapView>
    )
};

function App(): React.JSX.Element {
  return (
    <SafeAreaView>
        {createSimpleMapView()}
    </SafeAreaView>
  );
}

export default App;

Observed behavior and steps to reproduce

When the map loads the following error occurs: (NOBRIDGE) ERROR Error: Unsupported top level event type "topRct.mapbox.map.change" dispatched

To reproduce: 1 - enable new architecture in gradle.properties of the android project. 2 - Build project 3 - Start project

Expected behavior

Map to load without errors

Notes / preliminary analysis

No response

Additional links and references

No response

robin-pham commented 3 months ago

Just to note this is a dupe of https://github.com/rnmapbox/maps/issues/3493

ChrisBindy commented 2 months ago

Has there been any actual update on this issue as the linked dupe of #3493 is closed without a resolution to the problem?

opesto commented 2 months ago

I am also having the same issue with react-native: 0.75.2 and @rnmapbox/maps: 10.1.30. Any solutions yet?

Nachox07 commented 1 month ago

Could we please get an update here? This is a blocker for me to use the new architecture in my app

connorpmullins commented 1 month ago

Related bug in other libraries:

Seems like maybe some handler isn't getting registered? I'll keep looking into this a little bit more.

connorpmullins commented 1 month ago

@mfazekas - Have you considered using Opire or anything similar to enable bounties on bugs like this one?

I'm not sure it's what you want to do. If it is, though, Omnia would likely be willing to chip in on issues like this one given how heavily we rely on this project in production.

mfazekas commented 1 month ago

Can you try https://github.com/rnmapbox/maps/releases/tag/v10.1.32-rc.0 it contains #3656, which might fix the issue.

ChrisBindy commented 1 month ago

@mfazekas this RC version has stopped the errors in the console and stopped the crash when opening the map on device

Edit: nvm it is working, thanks for all your help

conor909 commented 2 weeks ago

I'm seeing this error on Android with the release candidate above

"@rnmapbox/maps": "10.1.32-rc.0",
"react-native": "0.74.5",
"expo": "51.0.38"