Issue metadata
Sign in to add a comment
|
Chrome Extension startkup: Cannot read property 'addListener' of undefined
Reported by
rich.bur...@gmail.com,
Apr 7 2016
|
||||||||||||||||||||||
Issue descriptionUserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.110 Safari/537.36 Steps to reproduce the problem: 1. Simple event script with 1 line: 2. chrome.runtime.onInstalled.addListener(...); 3. Install app What is the expected behavior? Event handler is set. What went wrong? 1 time out of 5 the error is thrown: Cannot read property 'addListener' of undefined Seems like a race condition between my event code running and the API being available. 4 out of 5 works fine. Did this work before? N/A Chrome version: 49.0.2623.110 Channel: stable OS Version: OS X 10.11.3 Flash Version: Shockwave Flash 21.0 r0
,
Apr 11 2016
This only SEEMS to happen when the background page is open when the extension is reloaded.
,
May 6 2016
I've been dealing with this on OSX Chrome 50.0.2661.86 (64-bit) for a few days. Doing a log of chrome.runtime at the point of adding the onInstall event listener shows that when the background page is open on extension reload, chrome.runtime isn't completely populated. (See attached screenshot). It wasn't clear to me that this was happening when leaving the event page inspector open until I found this issue.
,
May 15 2016
Sounds like issue 544182 , which is fixed in Chrome 51.
,
Dec 6 2016
I still get this (Uncaught TypeError: Cannot read property 'addListener' of undefined) even when I Disable -> Enable while debugging unpacked extension. I console.log(chrome.runtime) at the top of the background page and get below:
,
Dec 6 2016
Regarding my comment (Comment 5) the complete source is at: https://github.com/timtocci/Chrome-Share-It/blob/master/app.js Behavior is the same with Chrome and Chrome Canary. Thank you for your time.
,
Dec 6 2016
Ignore Comment 5 and 6 - my bad. Apologies |
|||||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||||
Comment 1 by lushnikov@chromium.org
, Apr 11 2016