SevenTV / Extension

The Web Extension for 7TV, bringing new features, emotes, vanity and performance to Twitch, Kick & YouTube
Other
389 stars 98 forks source link

[BUG] Extension Errors #987

Open akumaren666 opened 8 months ago

akumaren666 commented 8 months ago

Is there an existing issue for this?

This issue exists in the latest nightly version

What browsers are you seeing the problem on?

Opera

Current Behavior

Hello everyone,

I have been having constantly the past 2 days extensions errors on the Opera GX Browser. I know nothing about js on fixing, so I am hoping I could get a solution here.

See as per screenshots attached.

Uncaught (in promise) Error: Duplicate script ID 'seventv-youtube' background.js:0 (anonymous function)

Uncaught (in promise) Error: Could not establish connection. Receiving end does not exist. background.js:0 (anonymous function)

image_2024-01-08_153626399 image_2024-01-08_153648916

Expected Behavior

I expect the errors to be resolved.

Steps To Reproduce

Starting the browser always shows an error.

blauer4 commented 3 months ago

Hi, got the same error on brave v1.66.113 based on chromium 125.0.6422.76. This part of the code seems to be the issue, it's in the background.ts file at line 85.

chrome.scripting.registerContentScripts([{
    id: "seventv-youtube",
    js: ["content.js"],
    matches: ["*://*.youtube.com/*", "*://*.kick.com/*"],
},
]);

Right now I don't have time to look at this in particular, but it seems that when more tabs are open, it calls this piece of code multiple times.