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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uncaught (in promise) TypeError: Cannot assign to read only property 'aroundRadius' of object '#<Object>' #6136
Labels
triage
Issues to be categorized by the team
Comments
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
More info for who will debug this: previous version was 7.1.0, for InstantSearch.js that means 4.57.0->4.66.1, helper 3.14.2->3.17.0 I don't yet have an idea what could cause this change in behaviour though, I don't see those parts of the code as being changed in that version range on first glance |
Bump anyone has taken the subject ? |
Haroenv
added a commit
that referenced
this issue
May 13, 2024
Because React props are not writable, behaviour inside _parseNumbers > merge in the helper requires the configure props to be writable. fixes #6136 This bug is reproducible by simply rendering `<Configure aroundRadius="all" />` or any other numeric (https://github.com/algolia/instantsearch/blob/d1aa720c8e4e1aad2d7b64e385a29b258240c7df/packages/algoliasearch-helper/src/SearchParameters/index.js#L239-L251) key as a non-number string.
Haroenv
added a commit
that referenced
this issue
May 14, 2024
* fix(Configure): prevent aroundRadius="all" throwing Because React props are not writable, behaviour inside _parseNumbers > merge in the helper requires the configure props to be writable. fixes #6136 This bug is reproducible by simply rendering `<Configure aroundRadius="all" />` or any other numeric (https://github.com/algolia/instantsearch/blob/d1aa720c8e4e1aad2d7b64e385a29b258240c7df/packages/algoliasearch-helper/src/SearchParameters/index.js#L239-L251) key as a non-number string. * chore(bundlesize): update limit This seems to be needed because the location of the babel helpers needs to change to support this new usage of spread. I don't see any rhyme or reason to why it actually happens or why that has such a large impact for just moved code, but the babel helpers clearly are already very inefficient (many duplicates of the same helper functions) that this probably is fixed if we take a look later to improve this.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
馃悰 Current behavior
Since the version 7.7.1 of react-instantsearch-core when using Configure a crash and a type error appear when aroundRadius is set at "all"
Stack trace:
merge.js:48 Uncaught (in promise) TypeError: Cannot assign to read only property 'aroundRadius' of object '#'
at _merge (merge.js:48:1)
at merge (merge.js:78:1)
at push../node_modules/algoliasearch-helper/src/SearchParameters/index.js.SearchParameters._parseNumbers (index.js:303:1)
at new SearchParameters (index.js:98:1)
at Object.getRenderState (connectConfigure.js:72:1)
at index.js:414:1
at Array.forEach ()
at Object.render (index.js:412:1)
at index.js:431:1
at Array.forEach ()
at Object.render (index.js:422:1)
at InstantSearch.js:105:1
at defer.js:18:1
The above error occurred in the component:
React will try to recreate this component tree from scratch using the error boundary you provided, ErrorBoundary.
馃攳 Steps to reproduce
clone this repo: https://github.com/pass-culture/pass-culture-app-native
run: git checkout PC-27546/fix-algolia-search
run: yarn
run: yarn start:web:testing
(be carefull and do not share your location)
got to search
click on the search box
This probleme appear in file src/features/search/components/SearchSuggestions/SearchSuggestions.tsx line 103
Live reproduction
/
馃挱 Expected behavior
not to crash
Package version
"@algolia/client-search": "^4.23.3", "algoliasearch": "^4.23.3", "instantsearch.js": "^4.66.1", "react-instantsearch": "^7.7.1", "react-instantsearch-core": "^7.7.1", "search-insights": "^2.13.0"
Operating system
macOs 14.4
Browser
arc, chrome
Code of Conduct
The text was updated successfully, but these errors were encountered: