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

Uncaught (in promise) TypeError: Cannot read property 'toLowerCase' of undefined #790

Open
malvika1596 opened this issue Aug 10, 2021 · 3 comments

Comments

@malvika1596
Copy link

Hi,
I am seeing this error in console of browser-

Uncaught (in promise) TypeError: Cannot read property 'toLowerCase' of undefined
at ReactTags.js:485
at Array.filter ()
at ReactTags.filteredSuggestions (ReactTags.js:484)
at ReactTags.updateSuggestions (ReactTags.js:518)
at ReactTags.componentDidUpdate (ReactTags.js:118)
at commitLifeCycles (react-dom.development.js:20684)
at commitLayoutEffects (react-dom.development.js:23426)
at HTMLUnknownElement.callCallback (react-dom.development.js:3945)
at Object.invokeGuardedCallbackDev (react-dom.development.js:3994)
at invokeGuardedCallback (react-dom.development.js:4056)

The above error occurred in the component:

at ReactTags (http://localhost:8888/ivt-react/dev/app.js:75512:6)
at DndProvider (http://localhost:8888/ivt-react/dev/app.js:68434:24)
at WithContext
at div
at div
at Tags (http://localhost:8888/ivt-react/dev/app.js:76323:6)
at ConnectFunction (http://localhost:8888/ivt-react/dev/app.js:31886:37)
at div
at SearchTags (http://localhost:8888/ivt-react/dev/app.js:88868:6)
at ConnectFunction (http://localhost:8888/ivt-react/dev/app.js:31886:37)
at div
at ConnectedField (http://localhost:8888/ivt-react/dev/app.js:38105:32)
at ConnectFunction (http://localhost:8888/ivt-react/dev/app.js:31886:37)
at Connect(ConnectedField)
at Field (http://localhost:8888/ivt-react/dev/app.js:39975:27)
at Hoc (http://localhost:8888/ivt-react/dev/app.js:39182:32)
at Field
at SearchTagsField (http://localhost:8888/ivt-react/dev/app.js:88959:6)
at SearchTagsValidated
at ConnectFunction (http://localhost:8888/ivt-react/dev/app.js:31886:37)
at div
at GridCell (http://localhost:8888/ivt-react/dev/app.js:63432:6)
at div
at GridRow (http://localhost:8888/ivt-react/dev/app.js:63494:6)
at div
at div
at GridCell (http://localhost:8888/ivt-react/dev/app.js:63432:6)
at div
at GridRow (http://localhost:8888/ivt-react/dev/app.js:63494:6)
at div
at Grid (http://localhost:8888/ivt-react/dev/app.js:63536:6)
at form
at SearchForm (http://localhost:8888/ivt-react/dev/app.js:89822:6)
at Form (http://localhost:8888/ivt-react/dev/app.js:41745:42)
at ConnectFunction (http://localhost:8888/ivt-react/dev/app.js:31886:37)
at Connect(Form(SearchForm))
at ReduxForm (http://localhost:8888/ivt-react/dev/app.js:42484:44)
at Hoc (http://localhost:8888/ivt-react/dev/app.js:39182:32)
at ReduxForm
at ConnectFunction (http://localhost:8888/ivt-react/dev/app.js:31886:37)
at div
at SearchComponent (http://localhost:8888/ivt-react/dev/app.js:90115:6)
at ConnectFunction (http://localhost:8888/ivt-react/dev/app.js:31886:37)
at Route (http://localhost:8888/ivt-react/dev/app.js:78638:30)
at Switch (http://localhost:8888/ivt-react/dev/app.js:78844:30)
at div
at div
at App (http://localhost:8888/ivt-react/dev/app.js:99972:6)
at ConnectFunction (http://localhost:8888/ivt-react/dev/app.js:31886:37)
at C (http://localhost:8888/ivt-react/dev/app.js:78899:38)
at Router (http://localhost:8888/ivt-react/dev/app.js:78297:31)
at BrowserRouter (http://localhost:8888/ivt-react/dev/app.js:78962:36)
at Provider (http://localhost:8888/ivt-react/dev/app.js:31498:21)

I have dependencies installed-

"react": "17.0.2",
"react-dnd": "14.0.2",
"react-dnd-html5-backend": "14.0.0",
"react-dom": "17.0.2",

What is the issue here exactly? Can someone help me please? Kindly tell me if there is more info needed here.

Thanks.

@ad1992
Copy link
Member

ad1992 commented Aug 27, 2021

Hi @malvika1596, when are you getting this error ? do you mind sharing an code sandbox example ?

@malvika1596
Copy link
Author

malvika1596 commented Aug 30, 2021

Hi @ad1992, In the legacy app i am working on, while upgrading all the dependencies in the app, I upgraded already present react-tag-input to its latest version from "4.9.1", this error was showing up in console and page didn't load too. For right now, I have restored it back to "4.9.1" and the app is back to running.
It could have been due to the redux-form library present in the parent class or many updates in the component itself. I wasn't able to debug more and due to time constraint, I needed to find the solution. You can close this issue for now.
Thanks, have a good day!

@realPrimoh
Copy link

I got this error when there was a null value in the tags array or when an id was undefined within a tag in the tags array.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants