algolia / algoliasearch-helper-js

Helper for implementing advanced search features with Algolia
https://instantsearchjs.netlify.app/algoliasearch-helper-js/
MIT License
174 stars 46 forks source link

`Failed to execute 'insertBefore' on 'Node'` when using rangeSlider and Web Components Polyfill #618

Closed rjcorwin closed 6 years ago

rjcorwin commented 6 years ago
screen shot 2018-09-04 at 12 54 59 pm

Hi there. We're running into an issue that seems to be related to our use of rangeSlider in combination with the Web Components polyfill. It's hard for us to track this down, maps don't seem to be working quite right in Firefox but figured I'd post here in case anyone else was also having the issue.

Haroenv commented 6 years ago

Hey @rjsteinert, this looks like an issue of InstantSearch.js, and not the helper. Would it be possible to create a sandbox of the environment you have, so it can be found what's conflicting?

We have an example here: http://codesandbox.io/s/github/algolia/create-instantsearch-app/tree/templates/instantsearch.js

rjcorwin commented 6 years ago

@Haroenv That's correct, it's an issue I'm having with the InstanSearch.js rangeSlider widget. I had some trouble getting things working right on codesandbox but I took what you had there and got it working glitch. Also, in the example using rangeSlider and the webcomponents polyfill is working with Firefox which is encouraging! Now I have to dig in and figure out why this error happens in my project only when I have the webcomponents polyfill included.

Working example -> https://pyrite-skate.glitch.me/

rjcorwin commented 6 years ago

Upgrading InstantSearch.js in my project from 2.7.2 to 2.10.1 fixed the problem. I'm not sure what the issue was but I'm glad it's gone :-). Thanks for the encouragement @Haroenv.

Haroenv commented 6 years ago

okay, that makes sense, sorry for not answering earlier, I was in meetings. Glad you followed up and found the solution. In the future you can make issues https://github.com/algolia/instantsearch.js by the way, that's the correct spot for InstantSearch.js things

rjcorwin commented 6 years ago

@Haroenv With the instantsearch upgrade, the error is gone from the console but it's getting caught and messing some other things up :). I refiled this issue over here: https://github.com/algolia/instantsearch.js/issues/3099