ccampbell/chromelogger

Cannot read property 'onMessage' of undefined

wareczek opened this issue · 1 comments

chrome.extension is not available: 'extension' is not allowed for specified context type content script,  extension page, web page, etc.). [VM] binding (217):424
Binding.generate [VM] binding (217):424
(anonymous function) extension:114
_listenForLogMessages chrome-extension://noaneddfkdjfnfdakjjmocngnfkfehhd/log.js:208
_init chrome-extension://noaneddfkdjfnfdakjjmocngnfkfehhd/log.js:231
(anonymous function) chrome-extension://noaneddfkdjfnfdakjjmocngnfkfehhd/log.js:255
(anonymous function) chrome-extension://noaneddfkdjfnfdakjjmocngnfkfehhd/log.js:256

Uncaught TypeError: Cannot read property 'onMessage' of undefined chrome-extension://noaneddfkdjfnfdakjjmocngnfkfehhd/log.js:208

Ubuntu 13.04, Chromium 30.0.1581.2

Issue same as there: http://stackoverflow.com/questions/12936953/chrome-extension-onmessage-addlistener-cannot-read-property-onmessage-of-undef

Same problem on Chromium 29.0.1547.65 after upgrading to ubuntu 13.10.

I replaced all "chrome.extension.sendMessage" and "chrome.extension.onMessage" references respectively by "chrome.runtime.sendMessage" and "chrome.runtime.onMessage" in log.js and chromelogger.js to test and now it works.

The Chrome API has probably changed I guess: http://developer.chrome.com/extensions/extension.html