25

I am getting the following error in Chrome on Mac (Version 71.0.3578.98) while accessing my angular app:

targets/showTargetsByStream:1 Unchecked runtime.lastError: The message port closed before a response was received.

My app is accessing REST api hosted by a node express server.

Above error is coming for every page, like navigating to new URL within the app.

Also noticed that Safari is not throwing above error.

Appreciate any help in resolving this error.

user2960993
  • 711
  • 2
  • 8
  • 11
  • Just updated Chrome to 71.0.3578.98 and MacOS to 10.13.6 and got the same error on my Angular project. – iamdimitar Dec 26 '18 at 01:24
  • Updated to Chrome to 71.0.3578.98 on macOS 10.13.6 as well and am now seeing this in our React project. From what I can tell this is the socket to Firebase. We are running Firebase 5.7.2. Can't tell if this is a firebase issue or a Chrome issue. – Victoria French Jan 05 '19 at 04:40
  • I am not using Firebase, and this error is still coming. – user2960993 Jan 06 '19 at 06:22
  • Voting to close, as the accepted solution is a configuration issue, and does not relate to fixing/understanding the cause of the programming issue. – Greg Domjan Mar 07 '19 at 03:28
  • Does this answer your question? [How to fix 'Unchecked runtime.lastError: The message port closed before a response was received' chrome issue?](https://stackoverflow.com/questions/54126343/how-to-fix-unchecked-runtime-lasterror-the-message-port-closed-before-a-respon) – miken32 Nov 09 '21 at 18:39
  • the most frustrating problems are caused by things not directly related to the things we've coded last but to a browser/extension/operating system e.t.c. auto upgrade, or a power outage hundreds of km away, so it's a great relief to find examples of the cause and isolate the problem, even to realize we were not that responsible for everything. – alex Jun 02 '22 at 13:04

8 Answers8

61

I've experienced the same problem and noticed that it depends on running extensions.

Try disabling them (or you can use incognito mode if your settings do not allow extensions) to check if this is the cause. If so, you can enable them one by one and identify the guilty one.

In my case it was the Pinterest extension that causes the issue.

Dolfiz
  • 1,052
  • 3
  • 15
  • 19
18

Click on the gear icon in the console window and put a tick in the "Selected context only" box.

Selected context only ignores all of the nested browser extension contexts.

Mick McG
  • 181
  • 1
  • 2
  • Thank you @Mick McG. Indeed, the checkbox got unchecked after Chrome's last update. – Nico Nov 12 '20 at 12:56
2

for me, It was the "Stayfocusd" extension that causes the problem. By removing it, solves my problem.

Nasir Siraj
  • 379
  • 3
  • 7
0

I've had the same issues as to where i'm running my react app and it would run this error several times in the Console log.

What I've done to try and fix this issue is that I disabled a few of my extensions (Piggy - Automatic Coupons & Cash Back "Extension" to be more specific) then I refreshed the page and now I don't get this stressful error:

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

Other extensions may cause this issue for you but the Piggy - Automatic Coupons & Cash Back extension is the main extension that was causing this issue.

Good luck!

0

for me, "BuiltWith Technology Profiler" extension cause this error and when uninstall it, error not occur again

Hamid Taebi
  • 357
  • 2
  • 12
0

It was the HonorLock extension causing this for me.

Dan Crosby
  • 79
  • 1
  • 4
0

In my case was Norton Extension...

0

It was "Natural Reader Text to Speech" for me.

Yunnosch
  • 26,130
  • 9
  • 42
  • 54
Sultan
  • 1
  • 1
  • I edited this into the kind of post which (to my surprise) seems to be accepted as an answer according to [answer] here... – Yunnosch Oct 19 '22 at 06:30
  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Oct 21 '22 at 12:45