You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We see that on Sentry we get a lot of the error "Cannot read properties of null (reading 'hits')".
It's hard to investigate for us as the stack trace leads us from ../../../../node_modules/instantsearch.js/es/connectors/autocomplete/connectAutocomplete.js in indices at line 63:84 to ../../../../node_modules/instantsearch.js/es/lib/utils/defer.js in progress at line 18:16.
This project is not using nextjs, but we are in a monorepo and so are sharing some packages. We are just importing from react-instantsearch for things like useInfiniteHits, useHits, useRefinementList, the Configure component.
We have about 26 files using react-instantsearch so I'm happy to share some code examples although it's hard for us to know which part is causing the issue. So I wanted to open this issue incase it is a library bug. Happy to try and work through to understand if it's userland or not.
The most interesting part to reproduce would be the part where you're using connectAutocomplete. I wonder if it's possibly rendering conditionally and therefore at some timing where there's no results? It's odd because this is in a loop with the scopedResults array which therefore is definitely present, but it seems to imply that one of the results is null. Could this maybe be an adjacent index widget which is rendered conditionally as well?
We could guard for the case but I'd rather find out why results is null before, maybe something larger is wrong?
🐛 Current behavior
We see that on Sentry we get a lot of the error "Cannot read properties of null (reading 'hits')".
It's hard to investigate for us as the stack trace leads us from
../../../../node_modules/instantsearch.js/es/connectors/autocomplete/connectAutocomplete.js in indices at line 63:84
to../../../../node_modules/instantsearch.js/es/lib/utils/defer.js in progress at line 18:16
.Our dependencies are:
This project is not using nextjs, but we are in a monorepo and so are sharing some packages. We are just importing from
react-instantsearch
for things likeuseInfiniteHits
,useHits
,useRefinementList
, theConfigure
component.We have about 26 files using react-instantsearch so I'm happy to share some code examples although it's hard for us to know which part is causing the issue. So I wanted to open this issue incase it is a library bug. Happy to try and work through to understand if it's userland or not.
🔍 Steps to reproduce
Live reproduction
n/a
💭 Expected behavior
No error is thrown
Package version
[email protected]
Operating system
No response
Browser
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: