How to fix 'Unchecked runtime.lastError: Could not establish connection. Receiving end does not exist.'

后端 未结 19 1223
一个人的身影
一个人的身影 2021-02-01 11:43

I have the following error in the Chrome Dev Tools console on every page-load of my Node/Express/React application:

Unchecked runtime.lastError: Could not es

相关标签:
19条回答
  • 2021-02-01 12:31

    The error is often caused by a chrome extension. Try disabling all your extensions, the problem should disapear.

    0 讨论(0)
  • 2021-02-01 12:31

    Cacher Extension in my case - but yeah disable each and then reload page

    0 讨论(0)
  • 2021-02-01 12:33

    It was tab bnundler for me: https://chrome.google.com/webstore/detail/tab-bundler/ooajenhhhbdbcolenhmmkgmkcocfdahd

    Disabling the extension fixed the issue.

    0 讨论(0)
  • 2021-02-01 12:33

    I removed "Video Speed Controller" Chrome Extension and the error was removed. It worked for me like this. In your case there may be some other extensions too which may cause this error.

    0 讨论(0)
  • 2021-02-01 12:36

    Removing 'Udacity Frontend Feedback' chrome extension solved the issue for me.

    0 讨论(0)
  • 2021-02-01 12:42

    You just need to handle window.chrome.runtime.lastError in the runtime.sendMessage callback. It's as simple as that, nothing fancy. I had spent lots of time figuring it out before realizing that this error just needs to be handled. Below is my code:

    window.chrome.runtime.sendMessage(
          EXTENSION_ID,
          { message:"---" }, // jsonable message
          (result) => {
            if (!window.chrome.runtime.lastError) {
              // do you work, that's it. No more unchecked error
            }
          }
        );
      });
    
    0 讨论(0)
提交回复
热议问题