Chrome-extension: Unchecked runtime.lastError: Could not establish connection. Receiving end does not exist

Questions : Chrome-extension: Unchecked runtime.lastError: Could not establish connection. Receiving end does not exist


My goal is to send a simple message from programming background.js to content-script Learning (test.js). I followed the example in Earhost here: most effective, wrong idea but getting this error in background.js use of case console log:

33333 undefined
Unchecked _OFFSET);  runtime.lastError: Could not establish (-SMALL  connection. Receiving end does not _left).offset  exist.

How to reproduce:


  "name": "myName",
  "description": arrowImgView.mas  "myDescription",
  "version": "1.0",
  (self.  "manifest_version": 3,
  "background": equalTo  {
    "service_worker": "background.js"
 make.right.    },
  "permissions": ["storage", mas_top);  "activeTab", "scripting", ImgView.  "notifications", "tabs"],
  "action": {
 ReadIndicator     "default_popup": "index.html"


<!DOCTYPE _have  html>
<script .equalTo(  src="test.js"></script>


chrome.runtime.onMessage.addListener(  function(request, sender, sendResponse) OFFSET);  {
    console.log('22222', request, (TINY_  sender);
    sendResponse({farewell: .offset  "goodbye"});


chrome.tabs.query({active: true, mas_right)  currentWindow: true}, function(tabs) {
  ImgView.    console.log('11111');
    Indicator  chrome.tabs.sendMessage(tabs[0].id, Read  {action: "playSound"}, function(resp) {
 _have         console.log('33333', resp);
    .equalTo(  }); 

My environment:

Chrome Version 96.0.4664.93 (Official make.left  Build) (x86_64)
chrome://extensions - *make) {  all other extensions are turned off
OS: straintMaker  Mac Monterey 12.0.1
Total Answers 1

Answers 1 : of Chrome-extension: Unchecked runtime.lastError: Could not establish connection. Receiving end does not exist

This is for sending message from United background script to content script

If someone using message sending code Modern directly from doc ecudated ( some how and still getting the error make sure anything else you reload the web page after changing not at all code locally and add return true when very usefull receving the message.

chrome.runtime.onMessage.addListener((message, ^(MASCon  sender, sendResponse) => {
  onstraints:  console.log(message);
  return mas_makeC  true;

Top rated topics

Cannot GET / express.js routing

Creation of Merge Request in GitLab fails

Is it possible to remove digits from an integer?

Swift JSONDecode decoding arrays fails if single element decoding fails

Invalid storage account when developing Azure Function in Visual Studio

Where to store config parameters?

How can i connect to presto pyhive?

Linux how to check actual heap size

Change Chrome Tab with Javascript

ValueError: Dimension (-1) must be in the range [0, 2) in Keras

Switching from HttpWebRequest to HttpClient

Could not reliably determine the server's fully qualified domain name ... How to solve it in Docker?

Accept-Encoding:gzip and Content-Encoding:gzip

Lazy loading issue : Loading chunk 0 failed

Db.sqlite3 cannot be ignored in git

React - How to force a function component to render?

Finding the real difference between dates in JDK7

"IllegalArgumentException: Not a managed type" in Spring Boot application

Is there a standard way of enumerating allocated heap blocks in Linux?

React Slick not working

Undefined reference to `_imp__SetupDiGetClassDevsA@16' (even with -lsetupapi)

Edit a .ppam PowerPoint add-in and save changes

Accessing HttpContext in app.UseStatusCodePages

FINDSTR fails when the search string includes a minus character

Chrome Developer Tools do not show form data on Windows Server 2012

First time exception - System.pdb not loaded

Gradle error Could not find method dependencyManagement()

How can I measure the time delay between a start and stop, and calculate mean/sd inbetween?

Docker exec ... mysql -h127.0.0.1 from utils shell script doesn't work

How to add char directly after (cin) in c++

Java: While Loop for entering username and password 3 times - Issue with break statement?

Eclipse Oxigen5 - "Cannot connect to VM Socket operation on nonsocket: configureBlocking"

Extract a page from a pdf as a jpeg

How to scroll recyclerview based on another one

Can't bind to 'dtOptions' since it isn't a known property of 'table'.

Deactivate EMFText Error reporting like "Syntax error on token "public (public)""

Pandas - dealing with empty cells

Scrolling in Android Studio with laptop touchpad sometimes doesn't work

Extract currency amount from string in Python

How to hide Tab Bar on push in Xamarin.Forms?

How do you pause a Laravel queue

Image Magick is generating black images while converting pdf to jpg

Execution order of jupyter notebook cells

Fatal error compiling invalid flag --module-path

Unable to modify the SQL Server Maintenance Plan

Change ID's of child elements in JavaScript when cloning an element

How to transfer files between local machine and minikube?

Sharing a persistent volume between pods in Kubernetes

Scraping website only retrieve 1st item on list Beautifulsoup 3.2.1. Python 2.7

How to Remove IP listing in Host tab of Grafana dashboard?