Skip to content
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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: Cannot read property 'addEventListener' of null #12

Open
iangwaigdev opened this issue Mar 5, 2018 · 11 comments
Open

TypeError: Cannot read property 'addEventListener' of null #12

iangwaigdev opened this issue Mar 5, 2018 · 11 comments

Comments

@iangwaigdev
Copy link

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.

@AlexThomas90210
Copy link

Same issue here, did you find a solution?

@xmeltrut
Copy link

xmeltrut commented May 2, 2018

+1

@xmeltrut
Copy link

xmeltrut commented May 2, 2018

I downgraded to version 0.2.3 and that solved it.

@ghost
Copy link

ghost commented Jun 8, 2018

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

@ghost
Copy link

ghost commented Jun 8, 2018

@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
Copy link

ghost commented Jun 18, 2018

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.

@iangwaigdev
Copy link
Author

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.

@rupalipemare
Copy link

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.

@joshuaiz
Copy link

Still getting this error. Makes this unusable.

@alouane
Copy link

alouane commented Sep 7, 2018

moving back to 0.2.3 fixed the problem

@tito300
Copy link

tito300 commented Mar 12, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants