chrome.extension.sendRequest fails with an error in Canary, but works well in Dev build

214 views
Skip to first unread message

Nikita Vasilyev

unread,
Feb 22, 2012, 7:44:33 PM2/22/12
to google-chrome-...@googlegroups.com

https://github.com/NV/chrome-devtools-autosave stopped working in Chrome Canary. chrome.extension.sendRequest seems to cause the error, but the error message doesn’t give me a clue:

  1. Error in event handler for 'undefined': Error: "onEvent" can only be used in extension processes. See the content scripts documentation for more details. at Object.onEvent (extensions/schema_generated_bindings.js:420:17) at extensions/experimental.socket_custom_bindings.js:31:33 at extensions/schema_generated_bindings.js:566:7 at Array.forEach (native) at extensions/schema_generated_bindings.js:555:20 at [object Object].dispatch (extensions/event.js:202:28)
    1. chrome.Event.dispatchextensions/event.js:204
  1. extensions/schema_generated_bindings.js:60Uncaught Error: Invalid value for argument 1. Expected 'string' but got 'object'.
    1. (anonymous function)devtools.html:19
    2. EventSinkImpl._fire
    3. dispatchResourceContentEvent
    4. EventSinkImpl._dispatch
    5. descriptor
    6. ExtensionServerClient._onMessage
    7. descriptor

Andrey Kosyakov

unread,
Feb 25, 2012, 9:58:49 AM2/25/12
to Nikita Vasilyev, google-chrome-...@googlegroups.com
Hi Nikita,

On Thu, Feb 23, 2012 at 4:44 AM, Nikita Vasilyev <alter...@gmail.com> wrote:

> https://github.com/NV/chrome-devtools-autosave stopped working in Chrome
> Canary. chrome.extension.sendRequest seems to cause the error, but the error
> message doesn’t give me a clue:
>
> Error in event handler for 'undefined': Error: "onEvent" can only be used in

The first error message is apparently harmless (i.e. is not caused by
actual failure) and is fixed as of r123230 (see
http://crbug.com/114583)

> extensions/schema_generated_bindings.js:60Uncaught Error: Invalid value for
> argument 1. Expected 'string' but got 'object'.

As of the second one, it looks bad, but I can't reproduce this with
either ToT or 19.0.1050.0 (knowing the particular version of your
canary might help).
I'm adding a test for this, just in case:
https://chromiumcodereview.appspot.com/9464043/
If this is still an issue for you, please file a bug on
http://crbug.com (having a reduction might help).

Best regards,
Andrey.

Nikita Vasilyev

unread,
Feb 27, 2012, 12:01:05 AM2/27/12
to google-chrome-...@googlegroups.com, Nikita Vasilyev
Hi Andrey,

It seems to be fixed. Thanks for the response!

Reply all
Reply to author
Forward
0 new messages