How to fix 'Unchecked runtime.lastError: The message port closed before a response was received' chrome issue?

前端 未结 17 2032
孤街浪徒
孤街浪徒 2020-12-07 08:43

I\'m using VueJS and Laravel for my project. This issue started to show lately and it shows even in the old git branches.

This error only shows in Chrome browser.

17条回答
  •  我在风中等你
    2020-12-07 09:25

    For those coming here to debug this error in Chrome 73, one possibility is because Chrome 73 onwards disallows cross-origin requests in content scripts.

    More reading:

    1. https://www.chromestatus.com/feature/5629709824032768
    2. https://www.chromium.org/Home/chromium-security/extension-content-script-fetches

    This affects many Chrome extension authors, who now need to scramble to fix the extensions because Chrome thinks "Our data shows that most extensions will not be affected by this change."

    (it has nothing to do with your app code)

    UPDATE: I fixed the CORs issue but I still see this error. I suspect it is Chrome's fault here.

提交回复
热议问题