Closed Bug 723355 Opened 12 years ago Closed 12 years ago

On a fresh build of Windows 7, cannot install a native application with Firefox 10 with the extension installed

Categories

(Web Apps :: Extension, defect)

x86_64
Windows 7
defect
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: jsmith, Assigned: TimAbraldes)

Details

(Whiteboard: [mwcdemo])

Attachments

(1 file)

Steps:

1. Install a fresh build of Windows 7 onto a machine
2. Install Firefox 10
3. Install the extension onto Firefox 10
4. Go to apps-preview.mozilla.org, login with BrowserID, and install an app with native install

Expected:

The app should be installed on the web and installed natively on the Windows 7 machine.

Actual:

The app is installed on the web, but is installed natively on the machine.

Additional Notes:

Checking C:\Users\<username>\AppData\Roaming, I do see the app directories getting created. In 5 out of 6 cases, I saw the directories contained have nothing in them. For 1 case with the Blossom app, I see the "blossom Lean Product Management" directory created with a content and defaults folder, application.ini file, chrome.manifest, and installrecord.json. However, no desktop shortcut is created, no runnable app is installed, and no uninstall option is allowed.

I've seen this issue occur on two different machines so far, with clean Windows 7 builds only.

I think there could be a dependency that the extension is assuming to exist, but on a fresh build of Windows 7, it does not exist.
Type-o above:

Actual should be:

The app is install on the web, but is not installed natively on the machine.
Summary: On a fresh build of Windows 7, cannot install an native application with Firefox 10 with the extension installed → On a fresh build of Windows 7, cannot install a native application with Firefox 10 with the extension installed
Assignee: nobody → tabraldes
Hey Jason, thanks for filing a bug!

Are you still able to replicate this issue?  If so, it would be very helpful if you could reproduce and check the error console for any messages related to native app install (you can filter by "Messages").

(In reply to Jason Smith from comment #0)
> 3. Install the extension onto Firefox 10

From where did you install the extension?

> Checking C:\Users\<username>\AppData\Roaming, I do see the app directories
> getting created. In 5 out of 6 cases, I saw the directories contained have
> nothing in them. For 1 case with the Blossom app, I see the "blossom Lean
> Product Management" directory created with a content and defaults folder,
> application.ini file, chrome.manifest, and installrecord.json. However, no
> desktop shortcut is created, no runnable app is installed, and no uninstall
> option is allowed.

The extension should be creating directories that are named according to the origin of the app (e.g. "www.example.com,http,-1"), not the app's name.  When you install these apps, they're creating directories according to the app names?
 
> I've seen this issue occur on two different machines so far, with clean
> Windows 7 builds only.

Are these two machines still behaving this way, or do they eventually start working properly?
Status: NEW → ASSIGNED
> Are you still able to replicate this issue?  If so, it would be very helpful
> if you could reproduce and check the error console for any messages related
> to native app install (you can filter by "Messages").

Yup. There's only one message outputted to the screen:

apps-preview.mozilla.org: server does not support RFC 5746, see CVE-2009-3555

> From where did you install the extension?

https://addons.mozilla.org/en-US/firefox/addon/app-runtime/

> The extension should be creating directories that are named according to the
> origin of the app (e.g. "www.example.com,http,-1"), not the app's name. 
> When you install these apps, they're creating directories according to the
> app names?

Badly worded on my part. The directories being created are from the origin (example: EXFM app on apps-preview.mozilla.org creates directory ex.fm;http;-1).

> Are these two machines still behaving this way, or do they eventually start
> working properly?

Yes, they are still behaving this way.
Whiteboard: [mwcdemo]
Upon doing additional installations (e.g. Chrome) on one of the machines, native installation started working. The other machine I have still reproduces the problem deterministically.
(In reply to Jason Smith from comment #4)
> Upon doing additional installations (e.g. Chrome) on one of the machines,
> native installation started working. The other machine I have still
> reproduces the problem deterministically.

Ah that narrows down the problem scope.  My guess is that the extension fails to write the registry key for uninstall, then aborts (Chrome writes the parent key when it installs).  I'll test this out tomorrow.  Thanks for the additional info!
Verified.

When the key "HKCU\Software\Microsoft\Windows\CurrentVersion\Install" does not exist, the extension fails with this message:

===
info: APPS | nativeshell.win | writeRegKeys - Failure writing reg keys (Failure opening uninstall key ([Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIWindowsRegKey.open]"  nsresult: "0x80004005 (NS_ERROR_FAILURE)"
===

Should be easy to check for this condition and create the key if it doesn't exist.
Attached patch Patch v1Splinter Review
See patch and pull request here: https://github.com/mozilla/openwebapps/pull/160#
(In reply to Tim Abraldes from comment #6)
> When the key "HKCU\Software\Microsoft\Windows\CurrentVersion\Install" does
> not exist, the extension fails with this message:
> 

I meant "HKCU\Software\Microsoft\Windows\CurrentVersion\Uninstall"
Anant, are you able to review this patch?
Looks good to me!
Merged: https://github.com/mozilla/openwebapps/commit/2beeb553fe322122ba67b6dc008ee5ce9d0966b0
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Seen on Win XP as well (haven't tested the above fix yet, will shortly).
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.