Gonzalo
Gonzalo

Reputation: 41

'socket' is not allowed for specified package type (theme, app, etc.)

Chrome API for sockets is not working now for me.

I've got following manifest:

{
 "name": "My name",
 "version": "0.1",
 "manifest_version": 2,
 "background": {
  "page": "background.html"
  },
 "browser_action": {
  "default_icon": "ico16.png",
  "default_title": "My extension",
  "default_popup": "popup.html"
  },
  "description": "bla bla bla",
  "minimum_chrome_version": "23",
 "icons": {
    "ico128": "ico128.png",
    "ico16": "ico16.png",
    "icon_logo": "icon_logo.png"
  },
 "options_page": "options.html",
 "permissions": ["experimental",
                 {"socket": [
                     "udp-send-to"
                   ]},
                  "notifications",
                  "background"]

}

but following warning it's been displayed when loading the extension:

'socket' is not allowed for specified package type (theme, app, etc.).

I've tested with Version 23.0.1246.0 canary and 23.0.1246.0 dev-m

Upvotes: 4

Views: 1789

Answers (2)

Lucas
Lucas

Reputation: 187

If you will communicate this extension with a NodeJs application, you can use Socket.iO for this. Check how: https://www.thirdrocktechkno.com/blog/node-js-socket-io-chrome-extension-integration/

Upvotes: 0

Mihai Parparita
Mihai Parparita

Reputation: 4236

This is expected behavior, the socket API is only available to packaged apps, and based on the manifest you're working on an extension.

Upvotes: 4

Related Questions