react-audioplayer icon indicating copy to clipboard operation
react-audioplayer copied to clipboard

TypeError: Cannot read property 'addEventListener' of null

Open iangwaigdev opened this issue 7 years ago • 11 comments

n.value node_modules/react-audioplayer/build/react-audioplayer.js:1

TypeError: Cannot read property 'addEventListener' of null TypeError: Cannot read property 'removeEventListener' of null

two errors when trying to load component inside render.

<Audio width={600} height={400} autoPlay={true} fullPlayer={true} playlist={p} style={{ paddingTop: 5 }} onCommentSubmit={text => { console.log(text); }} />

const p is an array with song objects.

iangwaigdev avatar Mar 05 '18 12:03 iangwaigdev

Same issue here, did you find a solution?

AlexThomas90210 avatar Apr 04 '18 09:04 AlexThomas90210

+1

xmeltrut avatar May 02 '18 08:05 xmeltrut

I downgraded to version 0.2.3 and that solved it.

xmeltrut avatar May 02 '18 08:05 xmeltrut

same here.... to say that I see this exploding bug.

ghost avatar Jun 08 '18 17:06 ghost

@xmeltrut This might resolve the issue, I haven't tested but it introduces 355 vulnerabilities from what NPM is screaming about.

trying this npm install [email protected] --save npm audit fix

ghost avatar Jun 08 '18 18:06 ghost

No this still exploded...

The stacktrace is so large I am lost as to what really broke this. Either it's really small or really large this bug..

either way , I am not sure if I should risk such a potential explosion.

ghost avatar Jun 18 '18 19:06 ghost

Actually, I found out that the issue is somewhere in the comments module. So i removed the call to render the comments from the overall player and I think that solved it. Don't remember what else I did, but it's really a pain so I might still be changing to something else soon.

iangwaigdev avatar Jun 19 '18 08:06 iangwaigdev

I downgraded to version 0.2.3 but still the same , also tried removing comments module , no use. Same error continues.

Looking for a solution. Thanks in advance.

rupalipemare avatar Jul 16 '18 08:07 rupalipemare

Still getting this error. Makes this unusable.

joshuaiz avatar Aug 22 '18 20:08 joshuaiz

moving back to 0.2.3 fixed the problem

alouane avatar Sep 07 '18 14:09 alouane

I was able to solve my issue by switching from npm install to yarn install. Apparently, the project was set up using yarn originally and I just joined and was used to npm. Not sure why that fixed it but it did.

tito300 avatar Mar 12 '21 21:03 tito300