Port error: Could not establish connection. Receiving end does not exist. In Chromiume

前端 未结 17 2352
甜味超标
甜味超标 2020-12-05 09:26

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:         


        
17条回答
  •  [愿得一人]
    2020-12-05 09:58

    Check the latest manuals: http://developer.chrome.com/extensions/messaging.html

    Note: If multiple pages are listening for onMessage events, only the first to call sendResponse() for a particular event will succeed in sending the response. All other responses to that event will be ignored.

    Close your tabs, leave only one page, and check. In my case this was the issue.

提交回复
热议问题