weiz686 / chrome-screen-capture

Automatically exported from code.google.com/p/chrome-screen-capture
0 stars 0 forks source link

The extension have 2 (or more?) onRequest listeners per page. #264

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.open a web page
2.open the developer tool
3.press Screen Capture button
4.get message in developer tool:
Could not send response: Cannot send a response more than once per 
chrome.extension.onRequest listener per document (message was sent by extension 
cpngackimfmofbokmjmljamhdncknpmg).

What is the expected output? What do you see instead?
The extension does not work sometimes.

What version of the product are you using? On what operating system?
extension version 5.0.5, chrome Version 23.0.1271.64 m, win 7 pro

Please provide any additional information below.
isLoad.js and page.js are injected into a web page. These both have 
chrome.extension.onRequest listener. These seem to conflict and cause the 
extension not to work depend on which one of these fires the response first. It 
seems to be random.

Original issue reported on code.google.com by dima.por...@sergata.net on 26 Nov 2012 at 9:20

GoogleCodeExporter commented 9 years ago
popup.js and background.js both have chrome.extension.onRequest listeners too.

Original comment by dima.por...@sergata.net on 26 Nov 2012 at 1:03

GoogleCodeExporter commented 9 years ago
I've discovered that sendRequest/onRequest is deprecated
https://codereview.chromium.org/9965005/
If someone could rewrite this plugin with sendMessage/onMessage it would be 
nice.

Original comment by dima.por...@sergata.net on 28 Nov 2012 at 10:19