没有这样的本机应用程序firefox nativemessaging

时间:2018-06-14 06:18:28

标签: firefox chrome-native-messaging

我收到“没有这样的原生应用程序”错误。类似的代码在Chrome和Opera中运行良好。我使用的是Firefox 60。

- manifest.json

{
  "name": "SecureChannel",
  "version": "3.0.1.1",
  "manifest_version": 2,
  "description": "xxxx",
  "background" : {
    "page" : "background.html"
  },
  "content_scripts": [{
   "matches": ["<all_urls>"],
     "js": ["jquery.min.js","content.js"]
  }],

  "browser_action": {
    "default_icon": "images/SecureChannelIconBrick.png",
    "default_popup": "popup.html"
  },

  "applications": {
    "gecko": {
      "id": "extension@securechannel.com",
      "strict_min_version": "50.0"
    }
  },

  "permissions": [ 
         "tabs",
         "webNavigation",
         "cookies",
         "<all_urls>",
         "activeTab",   
         "nativeMessaging"
        ]
}

主机JSON - com.firefox.securechannel-win.json

{
  "name": "com.firefox.securechannel",
  "description": "SecureChannel Native Messaging",
  "path": "C:\\Users\\surendranormal\\AppData\\Roaming\\Cybernet Security Solutions\\SecureChannel\\Firefox\\SecureChannelChromeNative.exe",
  "type": "stdio",
  "allowed_extensions": [
       "extension@securechannel.com"
  ]
}

Windows注册表项

REG ADD "HKCU\Software\Mozilla\NativeMessagingHosts\com.firefox.securechannel" /ve /t REG_EXPAND_SZ /d "%APPDATA%\Cybernet Security Solutions\SecureChannel\Firefox\com.firefox.securechannel-win.json" /f

我使用regedit进行了检查,发现存在正确的注册表项。所有文件都存在于正确的位置。

感谢您的帮助。

0 个答案:

没有答案