Mozilla Monitor website will be down for 2 hours starting 5/20/2025 at 6 AM PT. Visit our status site for updates.

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

Opening a mp4 file = videoElement is undefined (chrome://global/content/TopLevelVideoDocument.js:21)

  • 4 replies
  • 1 has this problem
  • 84 views
  • Last reply by FredMcD

Update: The issue comes from the latest NoScript update v11.2.14 (2021-12-30). Disabling the extension fixed the issue. I'll report it to them. The report is available here.

Hi,

Since the latest stable firefox version (95.0.2), it seems like opening a video file which can be played in the browser, like a mp4 file for instance, will result in an error:

   05:05:35,632 Uncaught TypeError: videoElement is undefined
       setFocusToVideoElement chrome://global/content/TopLevelVideoDocument.js:21
       <anonymous> chrome://global/content/TopLevelVideoDocument.js:29
   TopLevelVideoDocument.js:21:5  

The video will plays normally, just to make it clear. Just that the error will appear in the console. And the error will keep reoccuring. Here are some video samples if you need, to see if the error is individual or global.

I checked the source changes on that file but wasn't able to find any change there so not sure why this error is occuring atm, must be a deeper reason. I was aware of that error because i'm using a GreaseMonkey script to automatically redirect some links opened to only have the video displayed with custom settings to avoid having to allow some JavaScript. The error occurs independently of the extension (checked with the script disabled, and the extension disabled).

'''Update:''' The issue comes from the latest NoScript update v11.2.14 (2021-12-30). Disabling the extension fixed the issue. I'll report it to them. [https://forums.informaction.com/viewtopic.php?f=10&t=26491 The report is available here]. Hi, Since the latest stable firefox version (95.0.2), it seems like opening a video file which can be played in the browser, like a mp4 file for instance, will result in an error: 05:05:35,632 Uncaught TypeError: videoElement is undefined setFocusToVideoElement chrome://global/content/TopLevelVideoDocument.js:21 <anonymous> chrome://global/content/TopLevelVideoDocument.js:29 TopLevelVideoDocument.js:21:5 The video will plays normally, just to make it clear. Just that the error will appear in the console. And the error will keep reoccuring. Here are [https://sample-videos.com/index.php#sample-mp4-video some video samples] if you need, to see if the error is individual or global. I checked the source changes on that file but wasn't able to find any change there so not sure why this error is occuring atm, must be a deeper reason. I was aware of that error because i'm using a GreaseMonkey script to automatically redirect some links opened to only have the video displayed with custom settings to avoid having to allow some JavaScript. The error occurs independently of the extension (checked with the script disabled, and the extension disabled).

Modified by Harest

Chosen solution

@FredMcD: Thanks for the info. I do have 95.0.2. I didn't have the latest Widevine and Firefox didn't want to download the latest version until i toggle DRM off/on. It didn't fix the issue though. Not sure what's the N / KN version of W10. I updated my original message though to make it clearer the video is working. It's just that there's a Javascript error, which as a consequence prevent my GreaseMonkey script to work.

I just searched for the N / KN version and no i've a standard W10 version. Windows Media Player is installed, etc.

If i'm the only one with the issue i guess i'll have to check with another profile. I'd have assumed the issue was maybe global. It's really something you can easily miss as it'll impact almost no user. Edit: Just did, from about:profiles using the button to "open it in a new browser" (on an unused "default" profile). I didn't have the error. I guess i'll have to troubleshoot further. Well it was quick enough to find the extension. Seems like disabling NoScript fix the issue. I guess i'll have to report to them instead. And the extension got updated yesterday, v11.2.14.

Read this answer in context 👍 0

All Replies (4)

This is a possibility: https://support.mozilla.org/en-US/kb/update-firefox-latest-version?cache=no Did you update Firefox to the latest version?

Version 95.0, first offered to Release channel users on December 7, 2021 Version 95.0.1, first offered to Release channel users on December 16, 2021 Version 95.0.2, first offered to Release channel users on December 19, 2021


https://support.mozilla.org/en-US/questions/1359657#answer-1463359 and updated to 95.0. . . . I finally found where the plugin "Widevine Content Decryption Module provided by Google Inc." was not updating to the newest version of December 1, 2021. Ver #4.10.2391.0

cor-el; Make sure you have the latest Widevine version. You can toggle DRM off/on to see if that makes Firefox (re)load DRM components.

You can possibly check the XHR requests in the Browser Console if this doesn't work.

Chosen Solution

@FredMcD: Thanks for the info. I do have 95.0.2. I didn't have the latest Widevine and Firefox didn't want to download the latest version until i toggle DRM off/on. It didn't fix the issue though. Not sure what's the N / KN version of W10. I updated my original message though to make it clearer the video is working. It's just that there's a Javascript error, which as a consequence prevent my GreaseMonkey script to work.

I just searched for the N / KN version and no i've a standard W10 version. Windows Media Player is installed, etc.

If i'm the only one with the issue i guess i'll have to check with another profile. I'd have assumed the issue was maybe global. It's really something you can easily miss as it'll impact almost no user. Edit: Just did, from about:profiles using the button to "open it in a new browser" (on an unused "default" profile). I didn't have the error. I guess i'll have to troubleshoot further. Well it was quick enough to find the extension. Seems like disabling NoScript fix the issue. I guess i'll have to report to them instead. And the extension got updated yesterday, v11.2.14.

Modified by Harest

That was very good work. Well Done.