SideeX / sideex

The Official Repository of SideeX 2
http://sideex.org
187 stars 53 forks source link

Error in console for all websites about could not establish a connection #1

Closed stokescomp closed 7 years ago

stokescomp commented 7 years ago

I see this error in the dev tools console for any webpage that I go to. As soon as I disable SideeX it goes away. Some pages show it multiple times when ever ajax calls are made. Here is the error I see: Uncaught in promise: Could not establish connection. Receiving end does not exist. from browser-polyfill.js line 588. At: chrome-extension://nefadabeoagfkgmkgegmjgdhegbllple/browser-polyfill.js

Here is where the error is:

const makeCallback = promise => {
        return (...callbackArgs) => {
          if (chrome.runtime.lastError) {
            promise.reject(chrome.runtime.lastError);
          } else if (callbackArgs.length === 1) {
            promise.resolve(callbackArgs[0]); //This is the line it is complaining about.
          } else {
            promise.resolve(callbackArgs);
          }
        };
      };
petermouse commented 7 years ago

Hi! @stokescomp

Thank you for reporting this! It seems like message from content scripts to a non-existing panel will cause error. So I let error been caught first, preventing from making annoying messages.

Fixed in 1a9ebef and also in f24a930 to prevent continuous recording. We will update it in next version.