mojira.dev
WEB-6484

TypeError on all pages that use main.js

Last Checked: 17th May, 2023

Effected pages:
All pages with this script www.minecraft.net/etc.clientlibs/minecraft/clientlibs/main.{id_here}.js

Ex. https://www.minecraft.net/etc.clientlibs/minecraft/clientlibs/main.7c46a10e40e92a94207e6ac0119e2c27.js

 

On these pages in the console there is this error, "Uncaught TypeError: Cannot read properties of null (reading 'querySelectorAll')". This is due to them not checking if the response of `document.querySelector("#myModal")` is null or not. This would be perfectly fine on smaller websites, but is completely unacceptable on a huge website like minecraft.net. This is such a easily avoidable mistake to make while coding especially for a huge company like Mojang Studios.

Example of a page with this error:
https://www.minecraft.net/

Attachments

Comments 3

Hi there!

Could you please provide more details or/and media files.

Also, just a reminder, to make your bug report as effective as possible, please try and include the following steps to reproduce the problem:

Steps to Reproduce:

  • 1.

  • 2.

  • 3.

Observed Results:

(Briefly describe what happens)

Expected Results:

(Briefly describe what should happen)

If your ticket does not look like the example given here, then it's likely to be closed as incomplete.

This ticket will automatically reopen when you reply.

Quick Links:

📓 Issue Guidelines – 💬 Mojang Support – 📧 Suggestions – 📖 Minecraft Wiki

This may be closed as the issue has been fixed.

Closing as cannot reproduce.

Faav

web

minecraft.net

error

Retrieved