Promise error The message port closed before a rep

2019-03-10 16:31发布

问题:

I've just started to get this error:

Uncaught (in promise) Objectmessage: "The message port closed before a reponse was received."

at chrome-extension://gppongmhjkpfnbhagpmjfkannfbllamg/js/browser-polyfill.js at this line:

const makeCallback = promise => {
  return (...callbackArgs) => {
    if (chrome.runtime.lastError) {
      promise.reject(chrome.runtime.lastError); // uncaught in promise
    } else if (callbackArgs.length === 1) {
      promise.resolve(callbackArgs[0]);
    } else {
      promise.resolve(callbackArgs);
    }
  };
};

Do you know what can cause it?

Thanks

回答1:

Update:

As of the comment by morficus, the problem has been fixed in the version: 4.0.1

The plugin will auto-update or you could reinstall from here:

https://chrome.google.com/webstore/detail/wappalyzer/gppongmhjkpfnbhagpmjfkannfbllamg

If anyone is interested in the issue the pull request is here:

https://github.com/AliasIO/Wappalyzer/pull/1491

2019 Edit:

If that is not solving your issue. You could try disabling all the chrome extensions and check if that solve your issue.

To disable you could type the below code in chrome url:

chrome://extensions/

or could go on

Settings > Extensions

After that you could enable each extensions and check the culprit.

Older issue:

It is not the chrome's bug but the bug with the wappalyzer extension.

I am not sure you are using it but i have used it and was just updated and got the same issue.

Here is the proof of the issue:

https://github.com/AliasIO/Wappalyzer/issues/1487

We need to wait until there is any solution for the extension or use the older version of the extension until it gets resolved.



回答2:

In my case was due to the extension 'Katalon recorder'. Probably the most generalistic solution is:

  • Disable all all extensions in chrome://extensions
  • Enable extensions one by one to detect which one is presenting de issue.


回答3:

Using Chrome ^71.0 and this issue pops in multiple extensions. I comprised a list that caused trouble for me + all other reporters in this thread:

  • Katalon Recorder
  • PictureMate
  • Pinterest Save Button
  • Wappalyzer


回答4:

Mine was due to the Google Publisher Toolbar extension. Disabled that and the error went away.



回答5:

In my case it happens because of Foxit PDF Creator 8.2.0.2 for the information.

Foxit PDF Creator



回答6:

this Helps me to overcome with this error by removing the Selenium (Chrome Extension)

Promise error:

The message port closed before a response was received

because you have installed Selenium (Chrome Extension)



回答7:

If you are using live-server to auto refresh the browser, then this error was coming up. I stopped the live-server and then opened the index.html file on browser this error didn't come up.