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 #143

Open
ksamuel opened this issue Apr 19, 2021 · 1 comment
Open

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

ksamuel opened this issue Apr 19, 2021 · 1 comment
Labels
🐞 bug Something isn't working

Comments

@ksamuel
Copy link

ksamuel commented Apr 19, 2021

When submitting a solutino to https://projectlovelace.net/problems/habitable-exoplanets/, the spinner is stuck forever, and the console displays the error "TypeError: Cannot read property 'addEventListener' of null". The debugger points to this part of the code, where dropdown contains null:

  <script>
    var dropdown = document.querySelector('.dropdown');
    dropdown.addEventListener('click', function(event) {
      event.stopPropagation();
      dropdown.classList.toggle('is-active');
    });
  </script>

Indeed, I can't find any node with the ".dropdown" class.

Firefox 87.0 in Ubuntu 21.04 but I get the same error in Chromium.

@Vismai-Khanderao
Copy link
Contributor

Looks like the TypeError is on other problems too and appears in the console before any code is submitted even.

It also looks like the stuck spinner is caused due to a 500 error possibly as another error pops up in the console

image

And surely enough the response it's trying to parse is an html template with the title HTTP 500 Internal server error | Project Lovelace

We'll need to work on a fix for that

@Vismai-Khanderao Vismai-Khanderao added the 🐞 bug Something isn't working label Apr 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants