Hi All,
I developing Devtools extension by following this example from
github. I am able to run the extension fine in the developer mode but when i moved the same to web store. I am facing the following issue
This extension may have been corrupted. and found following console error :
(Uncaught TypeError: Cannot read property 'connect' of undefined
at createChannel (messaging.js:13)
messaging.js:13 has this code
(function createChannel() {
var port = chrome.extension.connect({
name: "Sample"
});
var count=0;
var activeTabClass;
// Listen to messages from the background page
port.onMessage.addListener(function (message) {
setTimeout(function(){showResult(message);},1)
});
and Manifest.json has this.
{
"name": "Sample Engine",
"version": "1.04",
"manifest_version": 2,
"devtools_page": "devtools.html",
"description": "Chrome Developer Tools",
"icons": { "64": "images/pact.png" },
"background": {
"scripts": [
"scripts/jquery1.12.4-min.js",
"scripts/jquery-ui.min.js",
"scripts/background.js",
"scripts/panel.js",
"scripts/tab-order.js",
"scripts/high-lighter.js"
],
"persistent": false
},
"content_scripts": [
{
"js": [ "scripts/jquery1.12.4-min.js", "scripts/jquery-ui.min.js"],
"css": ["css/Injected-styles.css"]
}
],
"permissions": [
"activeTab",
"tabs",
"http://*/*",
"https://*/*",
"storage"
]
}
Thanks in Advance
Manoj