Closed
Bug 877932
Opened 12 years ago
Closed 12 years ago
checkInstalled should check if the app is locally installed
Categories
(Core Graveyard :: DOM: Apps, defect)
Core Graveyard
DOM: Apps
Tracking
(Not tracked)
RESOLVED
FIXED
mozilla26
People
(Reporter: shuhao, Assigned: marco)
Details
Attachments
(1 file, 1 obsolete file)
979 bytes,
patch
|
marco
:
review+
|
Details | Diff | Splinter Review |
Steps to reproduce:
1. Install a webapp
2. Uninstall it by finding its executable and call it with -remove
3. Reinstall the webapp < here it will fail and give you different error messages depending on the platform.
This has been tested on linux and mac.
Workaround:
If you only have one web app, you could uninstall via the browser console with the script
var r = navigator.mozApps.mgmt.getAll();
r.onsuccess = function() { navigator.mozApps.mgmt.uninstall(r.result[0]); }
Might have to play with that though.
Assignee | ||
Comment 1•12 years ago
|
||
(In reply to Shuhao Wu [:Pwnna] from comment #0)
> Steps to reproduce:
I can't reproduce. Is there a particular application that shows this behaviour?
Assignee | ||
Updated•12 years ago
|
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → INCOMPLETE
Assignee | ||
Updated•12 years ago
|
Flags: needinfo?(shwu)
Assignee | ||
Comment 2•12 years ago
|
||
(In reply to Shuhao Wu [:Pwnna] from comment #0)
> This has been tested on linux and mac.
(Note that on Mac there isn't a "remove" cmdline option)
Does not work still.
Installed app from http://osumo.paas.allizom.org/install. Uninstalled at:
[~/.offlinemozillasupport-9222bf00162f8a5a4be38ead9851192d]$ ./webapprt-stub -remove
Notification says it is removed. The icon goes away from system menu. Go back to the site to find the install button disappear (that button disappear if it detects user already installed the app). You can also find the app in navigator.mozApps.
Flags: needinfo?(shwu)
Assignee | ||
Comment 4•12 years ago
|
||
The app is actually uninstalled cleanly, the problem here is in checkInstalled that doesn't check if the app is locally installed.
OS: Linux → All
Hardware: x86_64 → All
Summary: Uninstalling webapp via -remove does not remove cleanly, which causes reinstall to fail → checkInstall should check if the app is locally installed
Assignee | ||
Comment 5•12 years ago
|
||
Assignee: nobody → mcastelluccio
Status: REOPENED → ASSIGNED
Attachment #785493 -
Flags: review?(fabrice)
Updated•12 years ago
|
Component: Web Apps → DOM: Apps
Product: Firefox → Core
Version: unspecified → Trunk
Assignee | ||
Updated•12 years ago
|
Summary: checkInstall should check if the app is locally installed → checkInstalled should check if the app is locally installed
Comment 6•12 years ago
|
||
Comment on attachment 785493 [details] [diff] [review]
checkInstalled_isLaunchable
Review of attachment 785493 [details] [diff] [review]:
-----------------------------------------------------------------
Does that mean that the main registry is not updated? Doesn't that prevent reinstalling the same app?
Attachment #785493 -
Flags: review?(fabrice)
Assignee | ||
Comment 7•12 years ago
|
||
(In reply to Fabrice Desré [:fabrice] from comment #6)
> Comment on attachment 785493 [details] [diff] [review]
> checkInstalled_isLaunchable
>
> Review of attachment 785493 [details] [diff] [review]:
> -----------------------------------------------------------------
>
> Does that mean that the main registry is not updated? Doesn't that prevent
> reinstalling the same app?
Yes, the main registry isn't updated. It's always the problem that the registry isn't in sync with applications installed, so we need to check if apps are actually installed with isLaunchable.
Comment 8•12 years ago
|
||
You did not answer my second question... Also, I would really prefer us to fix the registry update properly.
Assignee | ||
Comment 9•12 years ago
|
||
(In reply to Fabrice Desré [:fabrice] from comment #8)
> You did not answer my second question...
Sorry, I should've been more clear. We always check if the app is locally installed, so an app can be installed if it is in the registry but isn't locally installed.
> Also, I would really prefer us to fix the registry update properly.
I agree, I'd like to have the apps in sync too, but it's a long term task and probably not feasible on all the platforms (on Mac we'll probably need to call something similar to _isLaunchable anyway).
I think, as all the other mozApps API calls are working correctly, for consistency we should make also checkInstalled work correctly.
Assignee | ||
Updated•12 years ago
|
Attachment #785493 -
Flags: review?(fabrice)
Updated•12 years ago
|
Attachment #785493 -
Flags: review?(fabrice) → review+
Assignee | ||
Comment 10•12 years ago
|
||
Updated commit message.
Attachment #785493 -
Attachment is obsolete: true
Attachment #803984 -
Flags: review+
Assignee | ||
Updated•12 years ago
|
Keywords: checkin-needed
Comment 11•12 years ago
|
||
https://hg.mozilla.org/integration/b2g-inbound/rev/7b018235edc0
Could/should this have a test?
Flags: in-testsuite?
Keywords: checkin-needed
Comment 12•12 years ago
|
||
Backed out for test_app_uninstall.html timeouts. Still wondering if this needs a test too.
https://hg.mozilla.org/integration/b2g-inbound/rev/1ec1d8b042e4
https://tbpl.mozilla.org/php/getParsedLog.php?id=27825182&tree=B2g-Inbound
Comment 13•12 years ago
|
||
Nevermind, I was being dumb. This wasn't the bug at fault. Re-landed.
https://hg.mozilla.org/integration/b2g-inbound/rev/2981946d58f4
Assignee | ||
Comment 14•12 years ago
|
||
(In reply to Ryan VanderMeulen [:RyanVM UTC-4] from comment #11)
> https://hg.mozilla.org/integration/b2g-inbound/rev/7b018235edc0
>
> Could/should this have a test?
We could add a small test to test_install_app.xul. I've written the patch, I'm waiting for try results.
Should I open a new bug for that? Or is it better to land the test here too?
Assignee | ||
Comment 15•12 years ago
|
||
Opened bug 916355.
Status: ASSIGNED → RESOLVED
Closed: 12 years ago → 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla26
Updated•8 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•