I\'m developing an extension in Chrome, and there\'s a problem. In my inject.js, I make a request like:
chrome.extension.sendRequest({command:
I met up with this problem because I added a listener in background.js, and when invoked it would send a message to the popup page for view state update. While sometimes the listener is invoked, the popup page does not indeed exist. I check to make sure the popup page exists before sending a message and avoid this problem.