If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

navigator.mozApps.getSelf() does not return the app when the app is installed

RESOLVED WORKSFORME

Status

()

Core
DOM: Apps
RESOLVED WORKSFORME
5 years ago
5 years ago

People

(Reporter: onecyrenus, Unassigned)

Tracking

({regression})

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

5 years ago
From all experiments I believe navigator.mozApps.getSelf() does not return the app when the app is installed. 

The repro is the following
inside gaia/external-apps
mkdir webapitests
cd webapitests
wget http://people.mozilla.com/~dclarke/kofway/manfest.webapp
echo "http://people.mozilla.com/~dclarke/kofway/" >> origin
cd ../../
make 
make install-gaia

The icon will be there click to load, the message "The app is not installed" will show because there is nothing being returned in the getSelf success handler. 

If you check 

http://people.mozilla.com/~dclarke/kofway/js/start.js you will be able to see the code. 

Let me know if this is a bug or am doing something incorrectly.
(Reporter)

Updated

5 years ago
blocking-basecamp: --- → ?

Updated

5 years ago
Component: Web Apps → DOM: Apps
Product: Firefox → Core
QA Contact: jsmith
Dug into this. In this source code below:

			function getSelf() {
				var request = window.navigator.mozApps.getSelf(); 
				request.onsuccess = function() { 
					alert("success");
					var result = request.result;
					alert(result);
					result.launch();
				};  
				request.onerror = function() {  
					// Display error name from the DOMError object
					alert("Error: " + request.error.name);  
				}; 
			}

In this example, I'm noticing request.result returning null even with an app installed.
Keywords: regression
Keywords: qawanted
QA Contact: jsmith
Summary: navigator.mozApps.getSelf on b2g → navigator.mozApps.getSelf() does not return the app when the app is installed
Re-tested per Fabrice's feedback. I'm getting an app object on return of getSelf on desktop. Going to check Firefox OS now...
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → WORKSFORME
Opps. Closed to early.
Status: RESOLVED → REOPENED
Resolution: WORKSFORME → ---
Works for me on the latest build 8/17/2012.
Status: REOPENED → RESOLVED
Last Resolved: 5 years ago5 years ago
Resolution: --- → WORKSFORME

Updated

5 years ago
blocking-basecamp: ? → ---
Keywords: qawanted
You need to log in before you can comment on or make changes to this bug.