Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

StackOverflow Point

StackOverflow Point Navigation

  • Web Stories
  • Badges
  • Tags
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Web Stories
  • Badges
  • Tags
Home/ Questions/Q 1462
Alex Hales
  • 0
Alex HalesTeacher
Asked: May 30, 20222022-05-30T17:02:55+00:00 2022-05-30T17:02:55+00:00

google chrome extension – Unchecked runtime.lastError: Could not establish connection. Receiving end does not exist only on production mode in ReactJS application

  • 0

[ad_1]

I’m building a chrome extension. My target is to sync data from my React web application to the Chrome extension. I used externally_connectable to send the data from my web app to the extension.

Web app:

window.chrome.runtime.sendMessage(
  CHROME_EXTENSIONS_ID,
  { credential: credential },
  () => {}
)

Background script on extension

chrome.runtime.onMessageExternal.addListener(function (
  request,
  sender,
  sendResponse
) {
  // receive the token and refresh token from commenty
  if (request.credential) {
    // do some stuff with request.credential
  }
});

My local app working on domain: local.v2.context.app, my development server working on dev.context.app and production server context.app

manifest.json*

  "externally_connectable": {
    "ids": ["*"],
    "matches": ["https://*.context.app/*"],
    "accepts_tls_channel_id": false
  },

Everything works fine on my localhost with a local server with a custom domain. But when
I tried to run the extension with the development and the production server isn’t working, get the error:

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

My web app was built with create-react-app. I think the error is somewhere in the way I set the manifest.json but I still can’t figure out what the correct config is. Please can you give me some solution?

Thanks

[ad_2]

  • 0 0 Answers
  • 1 View
  • 0 Followers
  • 0
Share
  • Facebook
  • Report
Leave an answer

Leave an answer
Cancel reply

Browse

Sidebar

Ask A Question

Related Questions

  • xcode - Can you build dynamic libraries for iOS and ...

    • 0 Answers
  • bash - How to check if a process id (PID) ...

    • 4995 Answers
  • database - Oracle: Changing VARCHAR2 column to CLOB

    • 1084 Answers
  • What's the difference between HEAD, working tree and index, in ...

    • 1028 Answers
  • Amazon EC2 Free tier - how many instances can I ...

    • 0 Answers

Stats

  • Questions : 43k

Subscribe

Login

Forgot Password?

Footer

Follow

© 2022 Stackoverflow Point. All Rights Reserved.

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.