'"Attempted to remove more RCTLinkingManager listeners than added" error in react-native

"Attempted to remove more RCTLinkingManager listeners than added" error in react-native

I am using 0.67 upgraded from 0.60, sunddely this error appear I dont use any amplify library and no such thing removeListener.

enter image description here



Solution 1:[1]

For the time being, new version under unstable tag on npm,

"aws-amplify": "4.3.3-unstable.4"

checkout this github issue : Open Issue

Solution 2:[2]

I had the same issue, I was using and old version of react-navigation (2.x), I fixed the issue by just commenting and using patch-package :

Linking.addEventListener('url', this._handleOpenURL);
Linking.removeEventListener('url', this._handleOpenURL);

in node_modules/react-navigation/src/createNavigationContainer.js

I thinks it's for deeplinking but I'm handling it myself anyway.

It's a crappy solution and I will update react-navigation very soon.

So may be it's react-navigation may be not, but one of your node module probably is trying to remove a listener that doesn't exist anymore, you should look for removeEventListener and/or removeListener

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 sidverma
Solution 2 ajulien