Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Navigating away from Map causes unhandled promise rejection for "setHandledMapChangedEvents" #3492

Open
fractalscape13 opened this issue May 17, 2024 · 0 comments
Labels
bug 🪲 Something isn't working

Comments

@fractalscape13
Copy link

fractalscape13 commented May 17, 2024

Mapbox Implementation

Mapbox

Mapbox Version

default

React Native Version

0.72.6

Platform

iOS

@rnmapbox/maps version

10.1.19

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

I have a basic bottom tab navigation setup in my React Native app. Map is the first tab. Changing to any other tab from the map causes this error (I am getting 1000s of these events logged in Sentry):

WARN Possible Unhandled Promise Rejection (id: 2):
Object {
"code": "setHandledMapChangedEvents",
"domain": "RCTErrorDomain",
"message": "Unknown reactTag: 550",
"nativeStackIOS": Array [
"0 app 0x0000000103283670 RCTJSErrorFromCodeMessageAndNSError + 112",
"1 app 0x0000000103607798 ___ZZN8facebook5react15ObjCTurboModule13createPromiseERNS_3jsi7RuntimeENSt3__112basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEEU13block_pointerFvU13block_pointerFvP11objc_objectEU13block_pointerFvP8NSStringSH_P7NSErrorEEENK3$_0clES4_RKNS2_5ValueEPSQ_m_block_invoke.116 + 440",
"2 app 0x000000010415da59 __58-[RNMBXMapViewModule withMapView:block:reject:methodName:]_block_invoke + 425",
"3 app 0x000000010329c5ec __30-[RCTViewRegistry addUIBlock:]_block_invoke + 108",
"4 app 0x00000001032796a6 __44-[RCTUIManager flushUIBlocksWithCompletion:]_block_invoke + 374",
"5 app 0x00000001032799b9 __44-[RCTUIManager flushUIBlocksWithCompletion:]_block_invoke.493 + 393",
"6 app 0x0000000103281fda __RCTExecuteOnMainQueue_block_invoke + 26",
"7 libdispatch.dylib 0x0000000129e29747 _dispatch_call_block_and_release + 12",
"8 libdispatch.dylib 0x0000000129e2a9f7 _dispatch_client_callout + 8",
"9 libdispatch.dylib 0x0000000129e3a856 _dispatch_main_queue_drain + 1362",
"10 libdispatch.dylib 0x0000000129e3a2f6 _dispatch_main_queue_callback_4CF + 31",
"11 CoreFoundation 0x0000000128617850 CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE + 9",
"12 CoreFoundation 0x000000012861218b __CFRunLoopRun + 2463",
"13 CoreFoundation 0x0000000128611409 CFRunLoopRunSpecific + 557",
"14 GraphicsServices 0x000000012caa8187 GSEventRunModal + 137",
"15 UIKitCore 0x00000001541b63a2 -[UIApplication _run] + 972",
"16 UIKitCore 0x00000001541bae10 UIApplicationMain + 123",
"17 app 0x00000001027153c0 main + 96",
"18 dyld 0x0000000112d693ee start_sim + 10",
"19 ??? 0x000000020ac373a6 0x0 + 8770515878",
],
"userInfo": null,
}

Expected behavior

No response

Notes / preliminary analysis

No response

Additional links and references

Screen.Recording.2024-05-17.at.10.42.16.AM.mov
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🪲 Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant