Closed Bug 844690 Opened 11 years ago Closed 11 years ago

NS_ERROR_XPC_CANT_MODIFY_PROP_ON_WN: Cannot modify properties of a WrappedNative on Private Browsing activate()

Categories

(Add-on SDK Graveyard :: General, defect)

x86
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: wenzel, Unassigned)

Details

On Firefox Nightly, when I run 

pb.activate();

It is (according to the docs) not supposed to do anything, as the global private browsing service is gone.

Instead, I receive the following traceback:

Using binary at '/Applications/FirefoxNightly.app/Contents/MacOS/firefox-bin'.Using profile at '/var/folders/8t/h66tn3rn3nl253h3cmct4s2r0000gq/T/tmpjL1iOP.mozrunner'.
error: open-private: DEPRECATED: require("private-browsing").activate and require("private-browsing").deactivate is deprecated.
Traceback (most recent call last):
  File "resource://jid1-0fhdjaaq7nb73q-at-jetpack/addon-sdk/lib/sdk/private-browsing.js", line 27, in activate
    exports.activate = function activate() setMode(true);
  File "resource://jid1-0fhdjaaq7nb73q-at-jetpack/open-private/lib/main.js", line 46, in prepare_open_menu/open_private_item<.onMessage
    pb.activate();
  File "resource://jid1-0fhdjaaq7nb73q-at-jetpack/addon-sdk/lib/sdk/event/core.js", line 101, in lazy
    yield listeners.shift().apply(target, args);
  File "resource://jid1-0fhdjaaq7nb73q-at-jetpack/addon-sdk/lib/sdk/event/core.js", line 83, in emit
    for each (let item in emit.lazy.apply(emit.lazy, arguments)) {
  File "resource://jid1-0fhdjaaq7nb73q-at-jetpack/addon-sdk/lib/sdk/context-menu.js", line 372, in worker<.onMessage
    emit(item, "message", msg);
  File "resource://jid1-0fhdjaaq7nb73q-at-jetpack/addon-sdk/lib/sdk/deprecated/events.js", line 153, in _emitOnObject
    listener.apply(targetObj, params);
  File "resource://jid1-0fhdjaaq7nb73q-at-jetpack/addon-sdk/lib/sdk/deprecated/events.js", line 123, in _emit
    return this._emitOnObject.apply(this, args);
  File "resource://jid1-0fhdjaaq7nb73q-at-jetpack/addon-sdk/lib/sdk/content/worker.js", line 221, in postMessage
    self._addonWorker._emit('message', data);
  File "resource://jid1-0fhdjaaq7nb73q-at-jetpack/addon-sdk/lib/sdk/deprecated/events.js", line 153, in _emitOnObject
    listener.apply(targetObj, params);
  File "resource://jid1-0fhdjaaq7nb73q-at-jetpack/addon-sdk/lib/sdk/deprecated/events.js", line 123, in _emit
    return this._emitOnObject.apply(this, args);
  File "resource://jid1-0fhdjaaq7nb73q-at-jetpack/addon-sdk/lib/sdk/content/worker.js", line 109, in onContentEvent/<
    self._emit.apply(self, JSON.parse(args));
  File "resource://jid1-0fhdjaaq7nb73q-at-jetpack/addon-sdk/lib/sdk/timers.js", line 31, in notify
    callback.apply(null, args);
error: open-private: An exception occurred.
NS_ERROR_XPC_CANT_MODIFY_PROP_ON_WN: Cannot modify properties of a WrappedNative
undefined 56
Traceback (most recent call last):
  File "resource://jid1-0fhdjaaq7nb73q-at-jetpack/addon-sdk/lib/sdk/private-browsing/utils.js", line 56, in setMode
    return pbService && (pbService.privateBrowsingEnabled = value);
  File "resource://jid1-0fhdjaaq7nb73q-at-jetpack/addon-sdk/lib/sdk/lang/functional.js", line 54, in invoke
    function invoke(callee, params, self) callee.apply(self, params);
  File "resource://jid1-0fhdjaaq7nb73q-at-jetpack/addon-sdk/lib/sdk/timers.js", line 31, in notify
    callback.apply(null, args);
^CTraceback (most recent call last):
  File "/Users/fred/dev/addon-sdk/bin/cfx", line 33, in <module>
    cuddlefish.run()
  File "/Users/fred/dev/addon-sdk/python-lib/cuddlefish/__init__.py", line 858, in run
    mobile_app_name=options.mobile_app_name)
  File "/Users/fred/dev/addon-sdk/python-lib/cuddlefish/runner.py", line 656, in run_app
    time.sleep(0.05)
KeyboardInterrupt
What SDK version is this using?
Flags: needinfo?(fwenzel)
1.13.2, as tagged in git.
Flags: needinfo?(fwenzel)
Can you test this against git's stabilization and/or master branches and see if it's working with either of them?
Flags: needinfo?(fwenzel)
On master, a long traceback appears due to the deprecation warning, and then nothing happens, silently. I presume the latter is expected?
Flags: needinfo?(fwenzel)
This is because of the dummy global private browsing service, and the fact that we don't have a proper check for the dummy service in 1.13.2.  It's not doing anything other than causing an error though, and it's been fixed on master by https://github.com/mozilla/addon-sdk/commit/6a1aacd6b34ec8cfce1fe2875de45279c8254b54
Status: NEW → RESOLVED
Closed: 11 years ago
Flags: needinfo?(evold)
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.