chrome.extension.connect() fail.

310 views
Skip to first unread message

Charlie Tan

unread,
Jul 28, 2012, 12:58:57 AM7/28/12
to chromium-...@chromium.org
Hi,all
I used chrome.extension.connect() in my extension. But i find that
it's not work on on some computer.
I wrote a simple case in the attachment, just only one line code:
var port=chrome.extension.connect();
in the popup page.

the error log:

Port error: Could not establish connection. Receiving end does not
exist. miscellaneous_bindings:232
chromeHidden.Port.dispatchOnDisconnect miscellaneous_bindings:232

why?

my chrome version is 20.0.1132.57.

CGS

unread,
Jul 28, 2012, 6:37:50 AM7/28/12
to Charlie Tan, chromium-...@chromium.org
It looks you have nothing to listen that port. If you have it, then either it starts after you try to connect, or something is blocking it (like error in JS before the listener).

Could you give more information about your problem? I mean how you set up the listener and sender, and maybe your manifest setup for that part.

CGS



--
You received this message because you are subscribed to the Google Groups "Chromium-extensions" group.
To post to this group, send email to chromium-...@chromium.org.
To unsubscribe from this group, send email to chromium-extens...@chromium.org.
For more options, visit this group at http://groups.google.com/a/chromium.org/group/chromium-extensions/?hl=en.


CGS

unread,
Jul 28, 2012, 6:42:01 AM7/28/12
to Charlie Tan, chromium-...@chromium.org
You can use also Port.onDiconect to catch the event and try to connect again until the receiver is setup.

CGS
Reply all
Reply to author
Forward
0 new messages