I found several persistent errors in the Chrome Extension in developer mode, primarily related to inter-component communication and incorrect chrome.action.setBadgeText API usage. A screenshot of the full stack trace is attached.
Summary of Issues:
Uncaught (in promise) TypeError: ko.runtime.connect is not a function: Occurs in content.js:32. Suggests the Chrome APIs are inaccessible because the code is running in a modified or sandboxed context (possibly userscript-related) instead of a valid extension context. Action: Verify content.js execution context in manifest.json.
Uncaught (in promise) Error: Could not establish connection. Receiving end does not exist.: A common developer-mode error when a script reloads (e.g., background script via "Update" button) but the target page/script isn't reloaded, causing message passing to fail. Action: Implement better error handling for disconnects or prompt users to reload tabs after dev updates.
Error in event handler: TypeError: ... tabId: Value must be at least 0.: Occurs in background.js. An invalid (likely negative) tabId is being passed to chrome.action.setBadgeText(), possibly from a special Chrome page or a recently closed tab. Action: Add validation to ensure tabId is a non-negative integer before calling setBadgeText.
I found several persistent errors in the Chrome Extension in developer mode, primarily related to inter-component communication and incorrect chrome.action.setBadgeText API usage. A screenshot of the full stack trace is attached.
Summary of Issues: Uncaught (in promise) TypeError: ko.runtime.connect is not a function: Occurs in content.js:32. Suggests the Chrome APIs are inaccessible because the code is running in a modified or sandboxed context (possibly userscript-related) instead of a valid extension context. Action: Verify content.js execution context in manifest.json.
Uncaught (in promise) Error: Could not establish connection. Receiving end does not exist.: A common developer-mode error when a script reloads (e.g., background script via "Update" button) but the target page/script isn't reloaded, causing message passing to fail. Action: Implement better error handling for disconnects or prompt users to reload tabs after dev updates.
Error in event handler: TypeError: ... tabId: Value must be at least 0.: Occurs in background.js. An invalid (likely negative) tabId is being passed to chrome.action.setBadgeText(), possibly from a special Chrome page or a recently closed tab. Action: Add validation to ensure tabId is a non-negative integer before calling setBadgeText.