react-input-range icon indicating copy to clipboard operation
react-input-range copied to clipboard

Intermittent: TypeError: null is not an object (evaluating 'this.trackNode.getClientRect')

Open dcousineau opened this issue 6 years ago • 5 comments

I'm not even sure if I want to file this ticket, this error has appeared twice in my Rollbar production logs (in safari and chrome) but I'm unable to replicate it myself.

In once case the Rollbar telemetry showed the user already on another page (that did not contain this component at all but is definitely logically "after" a page that does) so it possibly may have something to do with a debounced or async function calling after the slider has been unmounted.

The other case is on a page where this component is contained in a pop-up type component so lots of rapid mounting and un-mounting.

Sorry I don't have more details/information, this may likely be a good area for more defensive coding possibly?

dcousineau avatar Jan 14 '19 21:01 dcousineau

I'm not going to be offended if you just close this, btw.

dcousineau avatar Jan 14 '19 22:01 dcousineau

I've seen this as well. We also see Cannot read property 'ownerDocument' of null, which seems to be related somehow - cleanup isn't done by the time the component unmounts, so it throws errors. I'll see if I can figure out where in the code it is.

Though at this point this project is looking just about abandoned... it might be worth forking.

tstirrat15 avatar Mar 21 '19 18:03 tstirrat15

Though at this point this project is looking just about abandoned... it might be worth forking.

Thinking the same thing. Hasn’t been a BIG enough issue to fork yet. If you do keep me posted (and vice versa)

dcousineau avatar Mar 23 '19 18:03 dcousineau

Any workaround on the issue?

cneltyn avatar Feb 14 '20 09:02 cneltyn

We migrated to rc-slider. It's got a bigger overall bundle size, but it's tree-shakeable and under active development.

tstirrat15 avatar Feb 14 '20 16:02 tstirrat15