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.

After upgrading to v0.65.1 i get the following warning on iOS. EventEmitter.removeListener('url', ...): Method has been deprecated. Please instead use `remove()` on the subscription returned by `EventEmitter.addListener`.

See original GitHub issue

Description

This warning appeared after upgrading from react native 0.64.2 to 0.65.1

React Native version:

info Fetching system and libraries information...
System:
    OS: macOS 11.5.2
    CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
    Memory: 50.48 MB / 16.00 GB
    Shell: 5.8 - /bin/zsh
  Binaries:
    Node: 12.13.1 - ~/.nvm/versions/node/v12.13.1/bin/node
    Yarn: 1.19.1 - ~/.yvm/versions/v1.19.1/bin/yarn
    npm: 6.12.1 - ~/.nvm/versions/node/v12.13.1/bin/npm
    Watchman: 4.9.0 - /usr/local/bin/watchman
  Managers:
    CocoaPods: 1.10.1 - /usr/local/bin/pod
  SDKs:
    iOS SDK:
      Platforms: iOS 14.5, DriverKit 20.4, macOS 11.3, tvOS 14.5, watchOS 7.4
    Android SDK:
      API Levels: 23, 26, 28, 29, 30
      Build Tools: 28.0.3, 29.0.2, 29.0.3, 30.0.2
      System Images: android-26 | Google APIs Intel x86 Atom, android-28 | Google Play Intel x86 Atom, android-29 | Google Play Intel x86 Atom, android-30 | Google APIs Intel x86 Atom
      Android NDK: Not Found
  IDEs:
    Android Studio: 4.1 AI-201.8743.12.41.7042882
    Xcode: 12.5.1/12E507 - /usr/bin/xcodebuild
  Languages:
    Java: 1.8.0_212 - /usr/bin/javac
  npmPackages:
    @react-native-community/cli: 5.0.1 => 5.0.1
    react: 17.0.2 => 17.0.2
    react-native: 0.65.1 => 0.65.1
    react-native-macos: Not Found
  npmGlobalPackages:

Steps To Reproduce

Provide a detailed list of steps that reproduce the issue.

  1. create a debug build
  2. run the app on simulator
  3. enable debug mode

Expected Results

Not throw any warning

Snack, code example, screenshot, or link to a repository:

Screenshot 2021-09-15 at 6 14 56 PM

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:3
  • Comments:9

github_iconTop GitHub Comments

4reactions
kkkorezcommented, Sep 24, 2021

after upgrading “@react-navigation/native” to “5.9.8” the issue resolved

4reactions
zucchacommented, Sep 22, 2021

Yet the method signature for AppState.addEventListener has void as return type.

Read more comments on GitHub >

github_iconTop Results From Across the Web

React Native Warning: Receiving warning from the console
removeListener (\'change\', ...): Method has been deprecated. Please instead use `remove()` on the subscription returned by `EventEmitter.
Read more >
react-native-codegen | Yarn - Package Manager
Changelog. v0.70.3. Fixed. Stop styles from being reset when detaching Animated.Values in old renderer (2f58e52006 by @javache) ...
Read more >
React Native - EventEmitter removeListener Method has been ...
Method has been deprecated. Please instead use remove() on the subscription returned by EventEmitter.addListener .
Read more >
react-native/CHANGELOG.md - UNPKG
89, - Upgrade deprecated-react-native-prop-types dependency ... Instead, use the `remove()` method on the subscription object returned by `addListener`.
Read more >
How to use removeListener function in EventEmitter - Tabnine
Remove event listener * @param {String} event - Event name * @param ... removeListener.apply(this.emitter, arguments); //Return object so it can be chained ...
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