question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Warnings with RN 0.66.1

See original GitHub issue

Describe the bug
When I exec unsubscribe method appear the next warnings

 WARN  EventEmitter.removeListener('MapboxOfflineRegionProgress', ...): Method has been deprecated. Please instead use `remove()` on the subscription returned by `EventEmitter.addListener`.
 WARN  EventEmitter.removeListener('MapboxOfflineRegionError', ...): Method has been deprecated. Please instead use `remove()` on the subscription returned by `EventEmitter.addListener`.

To Reproduce Execute MapboxGL.offlineManager.unsubscribe(<packName>); while a <packName> is downloading

Expected behavior
MapboxGL.offlineManager.unsubscribe works without warnings

Actual behavior
MapboxGL.offlineManager.unsubscribe works with warnings

Versions:

  • Platform: Android
  • Platform OS: Android 11
  • Device: Emulator
  • Emulator/ Simulator: yes
  • Dev OS: OSX 11.6
  • react-native-mapbox-gl Version 8.4.0
  • React Native Version 0.66.1

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

3reactions
ferdicuscommented, Nov 3, 2021

@emoreno-94 , @1mike12, can you please check with PR #1615 if you find the time. Should get rid of the warnings.

Cheers 🍻

1reaction
1mike12commented, Nov 20, 2021

@ferdicus thanks very much for the quick fix. Everything working great now

Read more comments on GitHub >

github_iconTop Results From Across the Web

RNW 0.66.1: A warning is emitted if AppTheme is used at ...
Problem Description Issue 1 If there is a reference to AppTheme, a yellow-box warning for 'new NativeEventEmitter()' was called with a ...
Read more >
React-native: 'Attempted to remove more RCTLinkingManager ...
I'm facing issue that whenever I logout from my app, the warning 'Attempted to remove more RCTLinkingManager listeners than added' occurs.
Read more >
New warning? Internal React error : r/reactnative - Reddit
Internal React error: Attempted to capture a commit phase error inside a detached tree. This indicates a bug in React.
Read more >
react-native-reanimated - npm
More powerful alternative to Animated library for React Native.. Latest version: 2.13.0, last published: a month ago.
Read more >
`new nativeeventemitter()` was called with a non-null ...
If it bothers you, you can hide the warning for now (source): ... What did you do? upgrade react-native to latest version 0.66.1...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found