TypeError: undefined is not a function (Keyboard.removeListener())
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- react-native
- Domain
- mobile
Research direction
Start at the SearchBar implementation and inspect its Keyboard listener cleanup, focusing on the deprecated removeListener() call described in the issue. Reproduce the listed steps with react-native-elements 3.4.3, then verify that typing and navigating back no longer produce the error.
Written by the indexing model from the issue text.
Description
Is there an existing issue for this?
- I have searched the existing issues
Explain what you did
I am using the search bar from react-native-elements when I enter the text in the search bar. I get this error
TypeError: undefined is not a function
This error is located at:
in SearchBar (created by SearchBar)
in SearchBar
in Themed.SearchBar (created by SelectCountry)
in RCTView (created by View)
in View (created by SelectCountry)
in RCTView (created by View)
in View (created by SelectCountry)
in RNCSafeAreaView
in Unknown (created by SelectCountry)
in RCTView (created by View)
in View (created by PageWithLoader)
in RNCSafeAreaView
in Unknown (created by PageWithLoader)
in PageWithLoader (created by Connect(PageWithLoader))
in Connect(PageWithLoader) (created by SelectCountry)
in SelectCountry (created by Connect(SelectCountry))
in Connect(SelectCountry) (created by SceneView)
in StaticContainer
in EnsureSingleNavigator (created by SceneView)
in SceneView (created by CardContainer)
in RCTView (created by View)
in View (created by CardContainer)
in RCTView (created by View)
in View (created by CardContainer)
in RCTView (created by View)
in View
in CardSheet (created by Card)
in RCTView (created by View)
in View (created by AnimatedComponent)
in AnimatedComponent
in AnimatedComponentWrapper (created by PanGestureHandler)
in PanGestureHandler (created by PanGestureHandler)
in PanGestureHandler (created by Card)
in RCTView (created by View)
in View (created by AnimatedComponent)
in AnimatedComponent
in AnimatedComponentWrapper (created by Card)
in RCTView (created by View)
in View (created by Card)
in Card (created by CardContainer)
in CardContainer (created by CardStack)
in RNSScreen (created by AnimatedComponent)
in AnimatedComponent
in AnimatedComponentWrapper (created by InnerScreen)
in Suspender (created by Freeze)
in Suspense (created by Freeze)
in Freeze (created by DelayedFreeze)
in DelayedFreeze (created by InnerScreen)
in InnerScreen (created by Screen)
in Screen (created by MaybeScreen)
in MaybeScreen (created by CardStack)
in RNSScreenContainer (created by ScreenContainer)
in ScreenContainer (created by MaybeScreenContainer)
in MaybeScreenContainer (created by CardStack)
in RCTView (created by View)
in View (created by Background)
in Background (created by CardStack)
in CardStack (created by HeaderShownContext)
in RCTView (created by View)
in View (created by SafeAreaInsetsContext)
in SafeAreaProviderCompat (created by StackView)
in RNGestureHandlerRootView (created by GestureHandlerRootView)
in GestureHandlerRootView (created by StackView)
in StackView (created by StackNavigator)
in PreventRemoveProvider (created by NavigationContent)
in NavigationContent
in Unknown (created by StackNavigator)
in StackNavigator (created by LoginScreens)
in LoginScreens (created by SceneView)
in StaticContainer
in EnsureSingleNavigator (created by SceneView)
in SceneView (created by CardContainer)
in RCTView (created by View)
in View (created by CardContainer)
in RCTView (created by View)
in View (created by CardContainer)
in RCTView (created by View)
in View
in CardSheet (created by Card)
in RCTView (created by View)
in View (created by AnimatedComponent)
in AnimatedComponent
in AnimatedComponentWrapper (created by PanGestureHandler)
in PanGestureHandler (created by PanGestureHandler)
in PanGestureHandler (created by Card)
in RCTView (created by View)
in View (created by AnimatedComponent)
in AnimatedComponent
in AnimatedComponentWrapper (created by Card)
in RCTView (created by View)
in View (created by Card)
in Card (created by CardContainer)
in CardContainer (created by CardStack)
in RNSScreen (created by AnimatedComponent)
in AnimatedComponent
in AnimatedComponentWrapper (created by InnerScreen)
in Suspender (created by Freeze)
in Suspense (created by Freeze)
in Freeze (created by DelayedFreeze)
in DelayedFreeze (created by InnerScreen)
in InnerScreen (created by Screen)
in Screen (created by MaybeScreen)
in MaybeScreen (created by CardStack)
in RNSScreenContainer (created by ScreenContainer)
in ScreenContainer (created by MaybeScreenContainer)
in MaybeScreenContainer (created by CardStack)
in RCTView (created by View)
in View (created by Background)
in Background (created by CardStack)
in CardStack (created by HeaderShownContext)
in RCTView (created by View)
in View (created by SafeAreaInsetsContext)
in SafeAreaProviderCompat (created by StackView)
in RNGestureHandlerRootView (created by GestureHandlerRootView)
in GestureHandlerRootView (created by StackView)
in StackView (created by StackNavigator)
in PreventRemoveProvider (created by NavigationContent)
in NavigationContent
in Unknown (created by StackNavigator)
in StackNavigator (created by AppNavigator)
in EnsureSingleNavigator
in BaseNavigationContainer
in Them
eProvider
in NavigationContainerInner (created by AppNavigator)
in AppNavigator (created by App)
in $29383e587d62412a$export$9f8ac96af4b1b2ae (created by NativeBaseProvider)
in ToastProvider (created by NativeBaseProvider)
in PortalProvider (created by NativeBaseProvider)
in HybridProvider (created by NativeBaseProvider)
in ResponsiveQueryProvider (created by NativeBaseProvider)
in RNCSafeAreaProvider (created by SafeAreaProvider)
in SafeAreaProvider (created by NativeBaseProvider)
in NativeBaseConfigProviderProvider (created by NativeBaseProvider)
in NativeBaseProvider (created by App)
in PersistGate (created by App)
in Provider (created by App)
in App
in RCTView (created by View)
in View (created by AppContainer)
in RCTView (created by View)
in View (created by AppContainer)
in AppContainer
Expected behavior
There should not be any error.
Describe the bug
removeListener()
static removeListener(eventName, callback)
Deprecated. Use the remove() method on the event subscription returned by addListener().
Steps To Reproduce
1. I am using "react-native-elements": "^3.4.3"
2. Use SearchBar
3. Type any Text
4. Go Back and see the error
Screenshots
Your Environment
`npx @rneui/envinfo`
```
Output from `npx @rneui/envinfo` goes here.
```
- Dominant language
- MDX
- Stars
- 25.9k
- Forks
- 4.7k
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from react-native-elements/react-native-elements
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
react-native-elements/react-native-elements#4035 · 1 comment ·
-
Needs Triage
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
react-native-elements/react-native-elements#3963 · 2 comments · 2 reactions ·
-
component: Button
react-native-elements/react-native-elements#4032 · 1 assignee ·
-
TS Bug - @rneui/base@5.0.0 — Undeclared type dependency causes IconProps to lose color/name/size Opencomponent: Icon
react-native-elements/react-native-elements#4027 · 2 comments · 4 reactions · 1 assignee ·
-
📞 Needs Response from Author
react-native-elements/react-native-elements#4022 · 9 comments · 2 reactions · 1 assignee ·
All issues in react-native-elements/react-native-elements
Similar issues
-
Build Failure: agora_rtc_engine compiled against android-31 while dependencies require android-34+ Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
avniproject/avni-client#2135 ·
-
react-doctor severity:warning tech-debt
Difficulty 1/5 Under an hour Newbie friendliness 88/100
digidem/comapeo-cloud-app#403 ·
-
Icon Requests Opensupported
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
LawnchairLauncher/lawnicons#4100 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 92/100
CypherBoxLLC/Cypher-Box#284 ·