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 a 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

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8986011
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T21:27:02+00:00 2026-06-15T21:27:02+00:00

I am trying to write a chrome plugin,which I defined with the following manifest:

  • 0

I am trying to write a chrome plugin,which I defined with the following manifest:

{
  "name": "test",
  "version": "1.0",
  "background": { "scripts": ["background.js"] },
  "permissions": [
    "tabs", "http://*/*"
  ],
  "browser_action": {
    "name": "test",
    "icons": ["icon.png"]
  },
  "manifest_version": 2
}

my background.js file looks like this:

chrome.app.runtime.onLaunched.addListener(function() { 
    console.log('details', chrome.app.getDetails());
});

When it loads, I see this error on the console:

Uncaught TypeError: Cannot read property 'onLaunched' of undefined 

I can’t figure out why I am not seeing a properly initialized chrome.app.runtime.

How do I debug this?

Gene

UPDATE:

When I run the following code:

console.log("before connection");
chrome.extension.onConnect.addListener(function(port) {
    console.log("connected");
});

I see the first log output (before connection) but not the second; does this mean that it fails to connect to the browser?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T21:27:03+00:00Added an answer on June 15, 2026 at 9:27 pm

    chrome.app is undefined because you aren’t defining your extension as an app.

    Chrome extension can be only one of these in the manifest file:
    browser_action, page_action, theme, or app.

    In your manifest you’re defining an browser action.

    So take a deep breath and read the documentation for the manifest file.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to write a user script for Chrome which simply adds an
I'm trying to write a plugin to use Meebo in Google Chrome, but the
Hi I am trying to write a chrome extension which needs to read in
I'm trying to write myself a chrome extension, and I have the following lines
I'm trying to write a chrome extension that is used in the GMail compose
I'm trying to write a Google chrome extension so that I can highlight text
I am new to writing extensions for Chrome. I am trying to write a
Trying to write out syslog entries containing strings but they don't register. // person.name
I am trying to write a very simple Chrome extension. All it is at
I have been trying to write my first user script for Google Chrome. It

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

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.