Skip to content

[Bug]: Only safe (?.) or non-null asserted (!!.) calls are allowed on a nullable receiver of type 'ReadableArray?'. #3877

@lvothnrv

Description

@lvothnrv

Mapbox Implementation

Mapbox

Mapbox Version

11.8.0

React Native Version

0.80.0

Platform

Android

@rnmapbox/maps version

10.1.38, 10.1.36, 10.1.33

Standalone component to reproduce

import React from 'react';
import {
  MapView,
  ShapeSource,
  LineLayer,
  Camera,
} from '@rnmapbox/maps';

const aLine = {
  type: 'LineString',
  coordinates: [
    [-74.00597, 40.71427],
    [-74.00697, 40.71527],
  ],
};

class BugReportExample extends React.Component {
  render() {
    return (
      <MapView style={{flex: 1}}>
        <Camera centerCoordinate={[-74.00597, 40.71427]} zoomLevel={14} />
        <ShapeSource id="idStreetLayer" shape={aLine}>
          <LineLayer id="idStreetLayer" />
        </ShapeSource>
      </MapView>
    );
  }
}

Observed behavior and steps to reproduce

Hello everyone,

I'm encountering an issue with React Native Mapbox where I get the following error:

Only safe (?.) or non-null asserted (!!.) calls are allowed on a nullable receiver of type 'ReadableArray?'.

I've tried several versions of the rnmapbox package (10.1.39, 10.1.38, 10.1.36, 10.1.33) but without success.

I also saw some people mentioning react-native-reanimated. I'm currently using version "react-native-reanimated": "^3.18.0".

Thanks in advance for your help.

Expected behavior

No response

Notes / preliminary analysis

No response

Additional links and references

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug 🪲Something isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions