{"action":"created","issue":{"url":"https://api.github.com/repos/FelisCatus/SwitchyOmega/issues/1503","repository_url":"https://api.github.com/repos/FelisCatus/SwitchyOmega","labels_url":"https://api.github.com/repos/FelisCatus/SwitchyOmega/issues/1503/labels{/name}","comments_url":"https://api.github.com/repos/FelisCatus/SwitchyOmega/issues/1503/comments","events_url":"https://api.github.com/repos/FelisCatus/SwitchyOmega/issues/1503/events","html_url":"https://github.com/FelisCatus/SwitchyOmega/issues/1503","id":328829510,"node_id":"MDU6SXNzdWUzMjg4Mjk1MTA=","number":1503,"title":"Firefox 的浏览器控制台总是出现 “No matching message handler for the given recipient.” 的错误提示。","user":{"login":"ghcsd","id":32384764,"node_id":"MDQ6VXNlcjMyMzg0NzY0","avatar_url":"https://avatars3.githubusercontent.com/u/32384764?v=4","gravatar_id":"","url":"https://api.github.com/users/ghcsd","html_url":"https://github.com/ghcsd","followers_url":"https://api.github.com/users/ghcsd/followers","following_url":"https://api.github.com/users/ghcsd/following{/other_user}","gists_url":"https://api.github.com/users/ghcsd/gists{/gist_id}","starred_url":"https://api.github.com/users/ghcsd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ghcsd/subscriptions","organizations_url":"https://api.github.com/users/ghcsd/orgs","repos_url":"https://api.github.com/users/ghcsd/repos","events_url":"https://api.github.com/users/ghcsd/events{/privacy}","received_events_url":"https://api.github.com/users/ghcsd/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-06-03T13:38:09Z","updated_at":"2018-06-10T03:33:17Z","closed_at":null,"author_association":"NONE","body":"Firefox 的浏览器控制台`（Ctrl+Shift+j）`每隔几秒就出现如下错误提示：\r\n> No matching message handler for the given recipient.  MessageChannel.jsm:914\r\n\r\n经过排查怀疑\r\n`browser.runtime.connect` API 中 extensionId 可能没有正确设置为 Firefox 扩展清单中的 ID。\r\nhttps://developer.mozilla.org/en-US/Add-ons/WebExtensions/API/runtime/connect#Parameters\r\n我尝试将\r\nhttps://github.com/FelisCatus/SwitchyOmega/blob/533a91964ca7014613988a6d04ddbff17729de40/omega-target-chromium-extension/src/module/switchysharp.coffee#L7\r\n`dpplabbmogkhghncfbfdeeokoefdjegm`  改为 `switchyomega@feliscatus.addons.mozilla.org`\r\n就没再出现类似错误提示。\r\n\r\n由于没有太过深入了解扩展的工作原理。\r\n不清楚这么做有什么副作用，还请大佬看看。\r\n\r\n\r\n另外\r\nhttps://github.com/FelisCatus/SwitchyOmega/blob/533a91964ca7014613988a6d04ddbff17729de40/omega-target-chromium-extension/src/module/switchysharp.coffee#L11\r\n是否应为 `if not @port? and not @_monitorTimerId` ?\r\n\r\n\r\n\r\n\r\n环境：Firefox 57、Nightly 62.0a1 + Proxy SwitchyOmega 2.5.11"},"comment":{"url":"https://api.github.com/repos/FelisCatus/SwitchyOmega/issues/comments/396017368","html_url":"https://github.com/FelisCatus/SwitchyOmega/issues/1503#issuecomment-396017368","issue_url":"https://api.github.com/repos/FelisCatus/SwitchyOmega/issues/1503","id":396017368,"node_id":"MDEyOklzc3VlQ29tbWVudDM5NjAxNzM2OA==","user":{"login":"ghcsd","id":32384764,"node_id":"MDQ6VXNlcjMyMzg0NzY0","avatar_url":"https://avatars3.githubusercontent.com/u/32384764?v=4","gravatar_id":"","url":"https://api.github.com/users/ghcsd","html_url":"https://github.com/ghcsd","followers_url":"https://api.github.com/users/ghcsd/followers","following_url":"https://api.github.com/users/ghcsd/following{/other_user}","gists_url":"https://api.github.com/users/ghcsd/gists{/gist_id}","starred_url":"https://api.github.com/users/ghcsd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ghcsd/subscriptions","organizations_url":"https://api.github.com/users/ghcsd/orgs","repos_url":"https://api.github.com/users/ghcsd/repos","events_url":"https://api.github.com/users/ghcsd/events{/privacy}","received_events_url":"https://api.github.com/users/ghcsd/received_events","type":"User","site_admin":false},"created_at":"2018-06-10T03:33:17Z","updated_at":"2018-06-10T03:33:17Z","author_association":"NONE","body":"应该可以通过 manifest.json 清单固定两环境某些字段判断\r\nhttps://developer.mozilla.org/en-US/Add-ons/WebExtensions/API/runtime/getManifest\r\n通过 `chrome.runtime.getManifest().applications.gecko` (Chrome 大概是非必要项吧？) 判断是否为 Firefox 环境\r\n\r\n"}}
{"actor":{"display_login":"ghcsd"}}