Works on B2G dog fooding device, does not work on Desktop and Android WebRT.
Calling mozApps.getSelf is expected to to fire onsuccess with the .result attached to the request object. success is called, without the .result.
Testable here: After installing the app, it should not ask to install again (see section "Apps getSelf"): http://about-device.testno.de/index.html

any updates on this?
I just tried this using FirefoxOS Simulator and used the following code:
<code>
var request = window.navigator.mozApps.getSelf();
request.onsuccess = function(){
console.log("NAME:" + request.result.manifest.name);
}
</code>
Tried using FirefoxOS Simulator pre3 from the march19 build.
also with Firefox 19.0.2 on windows 7
Both of these error out the same way.:
TypeError: request.result is null

Apologies Mark. I didn't read the bug as applying specifically to Firefox Android. I thought 819037 that you included in comment 2 on Feb 11th was for Firefox Android. Will run a new search and open a new bug if none turn up.
Thanks!

(In reply to Mark Finkle (:mfinkle) from comment #4)
> (In reply to dragonrider from comment #3)
> > any updates on this?
>
> This bug is about the runtime on Firefox for Android, not Firefox OS (or the
> emulator)
Mark, I guess you refer to bug 819037, that was RESOLVED FIXED on January. This one has pretty much the same title, but filed under "Firefox". dragonrider filed bug 852958 but is basically a copy of this one, so I'm marking it as a dupe.
In regard to this issue, is there any fix? This makes it somewhat difficult to develop apps without an actual device, as you can't detect if the app is installed. I found a workaround asking for mozApps.getInstalled(), that does return the app if it's installed as the first (and only) element of the request.result array.

The .getSelf() function is only intended to return a non-null value from *inside* the app itself.
If you are calling from a website and want to check if an app is installed, use checkInstalled() instead.

(In reply to Jonas Sicking (:sicking) from comment #8)
> The .getSelf() function is only intended to return a non-null value from
> *inside* the app itself.
>
> If you are calling from a website and want to check if an app is installed,
> use checkInstalled() instead.
Jonas, thanks again for the clarification here. I see that in MDN .getSelf() is the method to call when detecting if the app is installed (https://developer.mozilla.org/en-US/docs/Apps/Getting_Started#Checking_whether_the_app_is_installed) If the call should be to .getInstalled() I can try chasing the outdated wiki pages and update them.

checkInstalled and getSelf are not equivalent though. From what I can tell checkInstalled does not populate an app object. This means on desktop you can't get access to any app information such as receipts, manifest etc, you just get null. This makes development on the desktop impossible for paid apps.

@jaxo: The reason has why JSON.stringify doesn't work in the first case but does in the second has to do with prototype traversal, or rather the lack of it from JSON.stringify. Example:
function Base () {
this.klass = "Base";
this.member = 5;
}
function Derived () {
this.klass = "Derived";
}
Derived.prototype = new Base();
let d = new Derived();
JSON.stringify(d); // => '{"klass":"Derived"}'
d.member; // => 5
In your first example, there are no enumerable properties on the req.result obj. In the second, you're creating a new object whose member are copies of the req.result obj's members found by traversing the prototype chain at runtime. Whether or not we should or shouldn't be doing that is another story, but that's the difference between your two example cases.