Chrome Extension 'Could not load background script 'background.js'. Could not load manifest' using React
10:08 14 Jun 2020

I'm trying to make my chrome extension open a new tab upon installation using the chrome.tabs API but I get the error 'Could not load background script 'background.js'. Could not load manifest.'

This is my manifest.json:

{
  "short_name": "App",
  "name": "App",
  "version": "1.0.0",
  "manifest_version": 2,
  "icons": {
      "16": "favicon.ico",
      "48": "logo192.png",
      "128": "logo512.png"
  },
  "permissions": ["tabs"],
  "background": {
      "scripts": ["background.js"],
      "persistent": false
  },
  "browser_action": {
      "default_title": "App",
      "default_popup": "index.html"
  }
}

and my background.js:

chrome.runtime.onInstalled.addListener(function() {
    alert('Thanks for installing!');
    chrome.tabs.create({
        url: 'https://google.com',
        active: true
    });
    return false;
});

If anyone could help, that'd be great:)

javascript reactjs google-chrome google-chrome-extension create-react-app