Menuitem doesn't appear in Nightly (2012-12-31) #246

Closed
leibovic opened this Issue Dec 31, 2012 · 15 comments

Comments

Projects
None yet
9 participants

I don't see "Firefox OS Simulator" in my "Web Developer" menu on the latest Nightly.

I suspect new menuitems might have landed and broken whatever logic is in place to add this menuitem.

mykmelez was assigned Dec 31, 2012

Owner

mykmelez commented Dec 31, 2012

This is probably caused by Add-on SDK bug 825471.

I'm having same problem with Nightly.
Typing resource://r2d2b2g-at-mozilla-dot-org/r2d2b2g/data/content/index.html at address bar can make me access to Firefox OS Simulator page, but seems simulator is still not working.

Member

rpl commented Jan 1, 2013

@mykmelez confirmed, this issue is related to private browsing api changes and prevents the r2d2b2g to be loaded on the last nightly builds.

@jincreator this is a temporary workaround (to be applied in the addon-sdk):

diff --git a/lib/sdk/private-browsing/utils.js b/lib/sdk/private-browsing/utils.js
index 1f57ca0..9996daa 100644
--- a/lib/sdk/private-browsing/utils.js
+++ b/lib/sdk/private-browsing/utils.js
@@ -21,14 +21,18 @@ let pbService;

 // Currently, only Firefox implements the private browsing service.
 if (require("../system/xul-app").is("Firefox")) {
-  pbService = Cc["@mozilla.org/privatebrowsing;1"].
-              getService(Ci.nsIPrivateBrowsingService);
+  try {
+    pbService = Cc["@mozilla.org/privatebrowsing;1"].
+                getService(Ci.nsIPrivateBrowsingService);

-  // set up an observer for private browsing switches.
-  observers.add('private-browsing-transition-complete', function onChange() {
-    // Emit event with in next turn of event loop.
-    deferredEmit(exports, pbService.privateBrowsingEnabled ? 'start' : 'stop');
-  });
+    // set up an observer for private browsing switches.
+    observers.add('private-browsing-transition-complete', function onChange() {
+      // Emit event with in next turn of event loop.
+      deferredEmit(exports, pbService.privateBrowsingEnabled ? 'start' : 'stop');
+    });
+  } catch(e) {
+    console.debug("EXCEPTION: ",e,e.fileName,e.lineNumber);
+  }
 }

disabling and enabling the addon makes the menubar item show up again

Owner

mykmelez commented Feb 11, 2013

This should be fixed, as the Firefox developers landed a workaround in the Firefox codebase. Please reopen if you can still reproduce with the latest Firefox nightlies!

mykmelez closed this Feb 11, 2013

This still seemed to be happening yesterday to a lot of people at a local Firefox OS app hacking event, mostly on Firefox Nightlies. I'm not sure it's because they were using an older version of the simulator, but the distribution of installations was roughly equal between http://people.mozilla.com/~myk/r2d2b2g/ and https://addons.mozilla.org/en-US/firefox/addon/firefox-os-simulator/

Switching to Aurora generally (though not always) fixed the problem.

Owner

mykmelez commented Mar 29, 2013

I'm not sure it's the same problem, but let's reopen this issue and use it to track the problem anyway. It might well be the same problem! And this issue is just sitting here, forlorn, waiting to be useful again. ;-)

So, for folks who are experiencing this problem, the first thing to try is installing the latest preview build:

As I'm writing this, that gives you version 3.0pre4, but by the time you read this, it may give you a newer version. Either way, the preview build should not exhibit this problem, so try installing it first, and then, if you still experience the problem, let us know! And also let us know if the preview build fixes the problem, as that's useful info.

mykmelez reopened this Mar 29, 2013

Owner

mykmelez commented Apr 18, 2013

We're a couple more preview builds farther by now, and I haven't heard anyone else reporting this problem. So I'm going to optimistically mark it closed. But please feel free to reopen if you experience the problem again (or report a new issue if you have a similar problem but aren't sure if it's the same one)!

mykmelez closed this Apr 18, 2013

jlcfly commented May 10, 2013

This is still an issue. I am using the lastest preview build for the simulator plus the nightly build for Firefox. It appeared just fine after a fresh install of both. Then, last night I tweaked my privacy settings and set Firefox to be in private browsing mode. This morning, the menu item is gone. So, I suspect this has something to do with privacy settings.

Additionally, the simulator is still there. One can get to it directly (for now, at least) by entering this in the address bar:
resource://r2d2b2g-at-mozilla-dot-org/r2d2b2g/data/content/index.html

EDIT: confirmed on the private browsing.... I turned off private browsing, and the menu item appeared again.

EDIT: I read the above comments, but it seemed as if the issue was fixed, thus closed. It's not fixed. I'm confirming it's the same issue with private browsing.

Member

ochameau commented May 13, 2013

I'm not sure we want to make work the simulator in private windows/mode, as the guideline of the addon SDK is to avoid addon to run in private windows unless it is explicitely required or the user asked for it. (There is a plan to tune the addon manager to offer the user to allow/diallow any addon to do stuff in private windows)

Otherwise, we are facing this sdk bug: https://bugzilla.mozilla.org/show_bug.cgi?id=855484

Well, I have this problem, and I'm not sure what it could be.

I use Nightly both at work and home. At work I have FFOS Simulator and Remote Debugger working.
Now, at home, and it happened yesterday I think after a crash, I can't access FFOS Simulator in Nightly anymore, but "Connect..." appears, then I close it and change to Aurora, and I have FFOS Simulator, but no Connect.

I don't use Private browsing, and if there is a way to take it out I'm all ears if it helps to fix this problem.

So, basically, the same browser version, one works, but not the other...

Owner

mykmelez commented May 17, 2013

Otherwise, we are facing this sdk bug: https://bugzilla.mozilla.org/show_bug.cgi?id=855484

@ochameau What do you recommend we do about this? Should we apply a hotfix to our version of the SDK, or should we wait for 1.15 to be released? Or perhaps the SDK developers would release a 1.14.1 hotfix update?

Now, at home, and it happened yesterday I think after a crash, I can't access FFOS Simulator in Nightly anymore, but "Connect..." appears, then I close it and change to Aurora, and I have FFOS Simulator, but no Connect.

@ssj4maiko That might be #475, which we fixed in the latest preview build (Windows, Mac, Linux).

Owner

mykmelez commented May 17, 2013

Reopening to track the remaining issue with the Simulator when using private windows.

mykmelez reopened this May 17, 2013

Just updated from it and now it works again.

Member

ochameau commented May 21, 2013

PR #541 fixed half of the private browsing issue. PR #542 is an attempt to fix the second half.

mykmelez closed this in e1bb08b May 21, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment