Skip to content

[Bug]: Crash / Error when using <UserLocation /> on iOS with RN 0.82 & Mapbox v11.15.2 #4060

@huytm2k3

Description

@huytm2k3

Mapbox Implementation

Mapbox

Mapbox Version

11.15.2

React Native Version

0.82.1

React Native Architecture

New Architecture (Fabric/TurboModules)

Platform

iOS

@rnmapbox/maps version

10.2.6

Standalone component to reproduce

import React from 'react';
import MapboxGL, { UserLocation } from '@rnmapbox/maps';
import { MapView } from '@rnmapbox/maps';
import { View } from 'react-native';

MapboxGL.setAccessToken('YOUR_ACCESS_TOKEN_HERE');

const App = () => {
  return (
    <View style={{ flex: 1 }}>
      <MapView style={{ flex: 1 }}>
        <UserLocation />
      </MapView>
    </View>
  );
};

export default App;

Observed behavior and steps to reproduce

Using the component causes repeated errors such as:

TypeError: this._listeners.forEach is not a function (it is undefined) at __callListeners (AnimatedNode.js:126:22) 
Image

Expected behavior

No response

Notes / preliminary analysis

should mount and display the user‐location puck on the map without throwing repeated animation/listener errors.
No crash or infinite loop of errors.

Additional links and references

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug 🪲Something isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions