ritwickdey / vscode-live-server

Launch a development local Server with live reload feature for static & dynamic pages.
https://ritwickdey.github.io/vscode-live-server
MIT License
5.79k stars 1.27k forks source link

error in chrome dev tools - Unchecked runtime.lastError: The message port closed before a response was received. #270

Open vk011 opened 5 years ago

vk011 commented 5 years ago

An error appears in the console in chrome dev tools upon launching Live Server

Unchecked runtime.lastError: The message port closed before a response was received.
adesugbaa commented 5 years ago

What version of the extension are you using?

vk011 commented 5 years ago

should be the latest one, 5.3.1 I think. This actually only started happening recently.

adesugbaa commented 5 years ago

Please download 5.4.0 from this repo (under Releases), and try installing that manually.

View -> Command Pallete... -> Extensions Install from VSIX...

If there is any error, please paste the errors or screenshot from the Developer Tools.

vk011 commented 5 years ago

Hello, I removed the live server version I had and I downloaded LiveServer-5.4.0.vsix from releases and installed it, however it looks identical to what I had before (still says latest update was 5.3.1 in the description) and I still get the same error in console. Just to make it clear the extension works, but there's that annoying console error message still:

Unchecked runtime.lastError: The message port closed before a response was received.
vk011 commented 5 years ago

Live server just updated to actual v 5.4 this time but the same error still persists in chrome.

dchapo commented 5 years ago

Hi vk011 - This might be an issue with an extension you have from chrome. Try disabling them (chrome://extensions) and enabling them one by one to find the culprit. This worked for me.

vk011 commented 5 years ago

@dchapo That was it man, thanks!

rohitkrishna094 commented 5 years ago

@vk011 Hey which extension caused the problem for you?

vk011 commented 5 years ago

@rohitkrishna094 I think it was some kind of a video downloader, not sure which one though.

ghost commented 5 years ago

I had the same problem today and resolved it by disabling the following Chrome Extension;

https://chrome.google.com/webstore/detail/video-downloader-professi/elicpjhcidhpjomhibiffojpinpmmpil?hl=en

ritwickdey commented 5 years ago

Hi @everyone. I figured out why it's happening. a small bug is there. You'll get an update with the fixes in this weekend. :)

bbb324 commented 5 years ago

Anything else? I still get such error with chrome 72.0.3626.121

ernsheong commented 5 years ago

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

More reading:

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

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."

UPDATE: After fixing my extension CORS issue, I still see this error. I don't know what is causing it :/

ghost commented 5 years ago

Hi, any updates on this?

jonathan-c commented 5 years ago

Wondering if there is any update on this as well

davision commented 5 years ago

Subscribing here.

szfiligon commented 5 years ago

I have solved this problem, some extention will cause this error, so you can use the no trace mode of chrome to develop, and ctrl + shift + N can come in this mode, then you can see the error is gone.

BilalRratimi commented 5 years ago

I have solved this problem, a video down-loader extension will cause this error,

The message port closed before a response was received

https://chrome.google.com/webstore/detail/meddlemonkey/moihledlmchhofenpacbhphnbnpakgmo

charisTheo commented 5 years ago

was the Stylish extension for me causing this problem. I disabled and re-enabled it and now I don't get those logs

notAnyMore778899 commented 5 years ago

I had same Error with this following chrome Extension https://chrome.google.com/webstore/detail/foxit-pdf-creator/cifnddnffldieaamihfkhkdgnbhfmaci

ping2anilsharma commented 5 years ago

Unchecked runtime.lastError: The message port closed before a response was received.

Seems that some chrome extension that you have installed recently is creating problem. If you remove the recent installed extension then it will solve your problem. See your chrome extension:
chrome://extensions

JiiXaa commented 5 years ago

Hey i found two solutions to this bug/error:

Incognito browsing is quickest option or:

try disable extensions, and find which one cause that issue, for me was : Google Docs Offline 1.7

wakudiallah commented 5 years ago

I have solved this problem, a video down-loader extension will cause this error,

The message port closed before a response was received

https://chrome.google.com/webstore/detail/meddlemonkey/moihledlmchhofenpacbhphnbnpakgmo

solved,,,, thank you

ghost commented 5 years ago

I"m under the impression we're mixing two distinct cases in this discussion:

Case #_1. You're a user that have extensions installed, and one or more of them is causing the problem.

Case #_2 - You're a developer and your extension is throwing the error.

My case is the #2 above and I'm still struggling to implement a complete solution. I'll publish the solution here, in case I find one.

atulcodex commented 5 years ago

I also solve this error. This error comes by what font extension see after disabling it. optional follow me @atulcodex

davifsroberto commented 5 years ago

Hi vk011 - This might be an issue with an extension you have from chrome. Try disabling them (chrome://extensions) and enabling them one by one to find the culprit. This worked for me.

Tanks!! extension that was wrong here: https://chrome.google.com/webstore/detail/cuponomia-cupom-e-dinheir/gidejehfgombmkfflghejpncblgfkagj?hl=pt-BR

dahodd commented 5 years ago

Google Publisher Toolbar gave me this problem

bermudez commented 5 years ago

Norton Safe Web 3.9.0.11 (Chrome Extension) was causing the error for me.

emzola commented 5 years ago

When I disabled 360 Total Security anti virus chrome extension, the problem was resolved.

Kongoda commented 5 years ago

Go to chrome://extensions/ and determine which extension is causing the error.

skyrim23 commented 5 years ago

I too had this problem, it's resolved now! Just try disabling the chrome extension video down loader. The same will work with brave browser.

jefflundberg commented 5 years ago

The AMP Browser Extension as of version 1.3 (last updated January 7, 2019) also has this issue.

matthewstuart commented 5 years ago

I haven't read the whole thread so don't know if it's already been mentioned, but my error was caused by Color Contrast Analyzer. Just thought I'd share!

ariel-frischer commented 5 years ago

I'm getting this error from the Shortkeys extension: Version-2.2.7

andorey commented 4 years ago

Hi vk011 - This might be an issue with an extension you have from chrome. Try disabling them (chrome://extensions) and enabling them one by one to find the culprit. This worked for me.

thanks, man I found my bug

vlasscontreras commented 4 years ago

Hi vk011 - This might be an issue with an extension you have from chrome. Try disabling them (chrome://extensions) and enabling them one by one to find the culprit. This worked for me.

In my case, the Pinterest Tag Helper extension was causing this error.

Thank you!

lichiy-web commented 4 years ago

The same error in chrome was caused by the MeddleMonkey extension.

payose commented 3 years ago

faced same issue on chrome, i disabled meddle monkey extension, and now everything is just fine.

chiranjib0 commented 3 years ago

for me the culprit is color contrast analyzer extension :)

VasileDurlesteanu commented 3 years ago

Solved the issue of the LiveServer Conflict, by deleting Typio Form Recovery

RiccardoBiffi commented 2 years ago

I want my front-end to interact with Metamask and a bunch of other extensions. This error forces me to reload the page the first time I run my app before I can interact with Metamask.

NB this error doesn't happen when I run a live web server with this Python command (all extensions enabled): py -m http.server

I believe this is a bug that needs to be fixed. It's still present on v5.7.5

miserone commented 3 months ago

malwarebytes browser guard extension started showing these recently:
image

disabling the extension stopped them from appearing.

hiding them is also an option image