Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

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.

like image 825
user2960993 Avatar asked Dec 25 '18 05:12

user2960993


People also ask

How do you solve error unchecked runtime lastError The message port closed before a response was received?

To Solve Unchecked runtime. lastError: The message port closed before a response was received Error This error Usually Occurs By various Chrome extensions so You Just need to disable all chrome extensions And then re-run your project and Your error will be solved.

How do you fix unchecked runtime lastError The message port closed before a response was received chrome issue?

To solve this issue, first toggle off all the installed extensions in your chrome browser. Then reload the page and check if the issue is resolved. You should not get any error this time. Now turn on the extensions one by one and keep checking the page by reloading after enabling an extension.


2 Answers

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.

like image 199
Dolfiz Avatar answered Sep 23 '22 18:09

Dolfiz


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.

like image 26
Mick McG Avatar answered Sep 22 '22 18:09

Mick McG