[GH-ISSUE #16] Extension breaks some websites due to "ReferenceError: MediaKeyMessageEvent is not defined" #15

Closed
opened 2026-02-28 14:27:18 +03:00 by kerem · 3 comments
Owner

Originally created by @fireattack on GitHub (Dec 24, 2024).
Original GitHub issue: https://github.com/DevLARLEY/WidevineProxy2/issues/16

After installing this extension, I noticed that the "TP-LINK ID" page in my router's admin console became non-functional, even when this WebExt is not "enabled" in the dropdown setting menu.

Normal:

image

Broken:

image

Upon inspecting the console, I found multiple uncaught errors originating from content_script.js, such as:

Uncaught (in promise) ReferenceError: MediaKeyMessageEvent is not defined
    at wrappedListener (content_script.js:102:46)

This seems to interfere with the router's admin Web UI's built-in JavaScript code, likely causing the page to break.

Originally created by @fireattack on GitHub (Dec 24, 2024). Original GitHub issue: https://github.com/DevLARLEY/WidevineProxy2/issues/16 After installing this extension, I noticed that the "TP-LINK ID" page in my router's admin console became non-functional, even when this WebExt is not "enabled" in the dropdown setting menu. ### Normal: ![image](https://github.com/user-attachments/assets/cf4e9da3-d96d-4b17-8e8b-b9eb545cee75) ### Broken: ![image](https://github.com/user-attachments/assets/ade50522-1975-4bb8-bacb-fb5e846b4824) Upon inspecting the console, I found multiple uncaught errors originating from `content_script.js`, such as: ``` Uncaught (in promise) ReferenceError: MediaKeyMessageEvent is not defined at wrappedListener (content_script.js:102:46) ``` This seems to interfere with the router's admin Web UI's built-in JavaScript code, likely causing the page to break.
kerem closed this issue 2026-02-28 14:27:18 +03:00
Author
Owner

@DevLARLEY commented on GitHub (Dec 24, 2024):

Issues like these are pretty much bound to happen and it's not possible to find a cause or even fix it

<!-- gh-comment-id:2561470085 --> @DevLARLEY commented on GitHub (Dec 24, 2024): Issues like these are pretty much bound to happen and it's not possible to find a cause or even fix it
Author
Owner

@fireattack commented on GitHub (Dec 25, 2024):

I'm thinking of a simple fix, e.g. just checking if MediaKeyMessageEvent classinterface is defined first.

what do you think? Please see the PR. It works for me.

<!-- gh-comment-id:2561681415 --> @fireattack commented on GitHub (Dec 25, 2024): I'm thinking of a simple fix, e.g. just checking if MediaKeyMessageEvent ~~class~~interface is defined first. what do you think? Please see the PR. It works for me.
Author
Owner

@DevLARLEY commented on GitHub (Dec 25, 2024):

Hm, I expected the listener itself to collide with the TP-LINK panel.
I'll do some testing of your fix before accepting it

<!-- gh-comment-id:2561776584 --> @DevLARLEY commented on GitHub (Dec 25, 2024): Hm, I expected the listener itself to collide with the TP-LINK panel. I'll do some testing of your fix before accepting it
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/WidevineProxy2#15
No description provided.