Closed
Bug 795164
Opened 12 years ago
Closed 12 years ago
navigator.mozApps.mgmt.onuninstall gets triggered a boatload of times
Categories
(Core Graveyard :: DOM: Apps, defect, P2)
Core Graveyard
DOM: Apps
Tracking
(blocking-basecamp:+, firefox18 fixed, firefox19 fixed)
People
(Reporter: etienne, Assigned: etienne)
References
Details
(Whiteboard: [qa-])
Attachments
(2 files, 6 obsolete files)
12.17 KB,
patch
|
Details | Diff | Splinter Review | |
12.10 KB,
patch
|
Details | Diff | Splinter Review |
To the untrained eye, it looks like WebappsApplicationMgmt gets added as a listener for Webapps:Uninstall:Return:OK every time a WebappsApplication is created.
Not sure if it's linked to this: https://mxr.mozilla.org/mozilla-central/source/dom/apps/src/Webapps.js#342
Preventing DOMApplicationRegistry from adding the same listener for the same message multiple times fixes the issue (cf patch proposal).
But this is obviously just curing a symptom.
Assignee | ||
Updated•12 years ago
|
Attachment #665698 -
Flags: feedback?(fabrice)
Comment 1•12 years ago
|
||
Comment on attachment 665698 [details] [diff] [review]
Patch proposal
Review of attachment 665698 [details] [diff] [review]:
-----------------------------------------------------------------
That looks good to me.
Attachment #665698 -
Flags: feedback?(fabrice) → feedback+
Assignee | ||
Comment 2•12 years ago
|
||
Looks like the real cause of this issue was fixed, closing here.
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → WORKSFORME
Assignee | ||
Comment 3•12 years ago
|
||
My bad... still happening.
Status: RESOLVED → REOPENED
Resolution: WORKSFORME → ---
Assignee | ||
Comment 4•12 years ago
|
||
Clearer commit message.
Attachment #665698 -
Attachment is obsolete: true
Attachment #665890 -
Flags: review?(fabrice)
Updated•12 years ago
|
Attachment #665890 -
Flags: review?(fabrice) → review+
Assignee | ||
Updated•12 years ago
|
Keywords: checkin-needed
Comment 5•12 years ago
|
||
Keywords: checkin-needed
Updated•12 years ago
|
Whiteboard: [qa-]
Comment 7•12 years ago
|
||
Backed out in https://hg.mozilla.org/integration/mozilla-inbound/rev/25041824911b - one of the things in that push was causing
9351 ERROR TEST-UNEXPECTED-FAIL | chrome://mochitests/content/chrome/dom/tests/mochitest/webapps/test_cross_origin.xul | Test timed out.
9354 ERROR TEST-UNEXPECTED-FAIL | chrome://mochitests/content/chrome/dom/tests/mochitest/webapps/test_getNotInstalled.xul | Test timed out.
9358 ERROR TEST-UNEXPECTED-FAIL | chrome://mochitests/content/chrome/dom/tests/mochitest/webapps/test_install_app.xul | Test timed out.
9364 ERROR TEST-UNEXPECTED-FAIL | chrome://mochitests/content/chrome/dom/tests/mochitest/webapps/test_install_errors.xul | Test timed out.
9365 ERROR TEST-UNEXPECTED-FAIL | (SimpleTest/TestRunner.js) | 4 test timeouts, giving up.
9366 ERROR TEST-UNEXPECTED-FAIL | (SimpleTest/TestRunner.js) | Skipping 404 remaining tests.
9367 ERROR TEST-UNEXPECTED-FAIL | (SimpleTest/TestRunner.js) | chrome://mochitests/content/chrome/dom/tests/mochitest/webapps/test_install_errors.xul finished in a non-clean fashion, probably because it didn't call SimpleTest.finish()
Comment 8•12 years ago
|
||
Test failures are because of this patch...
Assignee | ||
Comment 9•12 years ago
|
||
Fixed the test failure and, since the tests saved my bacon, added a test case for this bug.
Attachment #665890 -
Attachment is obsolete: true
Attachment #666493 -
Flags: review?(fabrice)
Assignee | ||
Comment 10•12 years ago
|
||
(In reply to Phil Ringnalda (:philor) from comment #7)
> Backed out in
> https://hg.mozilla.org/integration/mozilla-inbound/rev/25041824911b - one of
> the things in that push was causing
>
> 9351 ERROR TEST-UNEXPECTED-FAIL |
> chrome://mochitests/content/chrome/dom/tests/mochitest/webapps/
> test_cross_origin.xul | Test timed out.
> 9354 ERROR TEST-UNEXPECTED-FAIL |
> chrome://mochitests/content/chrome/dom/tests/mochitest/webapps/
> test_getNotInstalled.xul | Test timed out.
> 9358 ERROR TEST-UNEXPECTED-FAIL |
> chrome://mochitests/content/chrome/dom/tests/mochitest/webapps/
> test_install_app.xul | Test timed out.
> 9364 ERROR TEST-UNEXPECTED-FAIL |
> chrome://mochitests/content/chrome/dom/tests/mochitest/webapps/
> test_install_errors.xul | Test timed out.
> 9365 ERROR TEST-UNEXPECTED-FAIL | (SimpleTest/TestRunner.js) | 4 test
> timeouts, giving up.
> 9366 ERROR TEST-UNEXPECTED-FAIL | (SimpleTest/TestRunner.js) | Skipping 404
> remaining tests.
> 9367 ERROR TEST-UNEXPECTED-FAIL | (SimpleTest/TestRunner.js) |
> chrome://mochitests/content/chrome/dom/tests/mochitest/webapps/
> test_install_errors.xul finished in a non-clean fashion, probably because it
> didn't call SimpleTest.finish()
Sorry again for this, newbie mistake.
Assignee | ||
Updated•12 years ago
|
Flags: in-testsuite? → in-testsuite+
Assignee | ||
Comment 11•12 years ago
|
||
Real ref count for the number of times a cpmm is added.
Attachment #666493 -
Attachment is obsolete: true
Attachment #666493 -
Flags: review?(fabrice)
Attachment #667452 -
Flags: review?(fabrice)
Assignee | ||
Comment 12•12 years ago
|
||
Attachment #667452 -
Attachment is obsolete: true
Attachment #667452 -
Flags: review?(fabrice)
Attachment #667578 -
Flags: review?(fabrice)
Comment 13•12 years ago
|
||
Comment on attachment 667578 [details] [diff] [review]
Patch v5
Review of attachment 667578 [details] [diff] [review]:
-----------------------------------------------------------------
r=me with nit addressed and I'd like to see a try run.
::: dom/apps/src/Webapps.jsm
@@ +435,5 @@
> }, this);
> },
>
>
> + // Passing -1 as aMsgNames will remove all references to aMm
Please use a special message name instead of -1. We don't get random messages here, so something like "Webapps:Internal:ClearMM" is ok to me. Feel free to bikeshed the message name.
Assignee | ||
Comment 14•12 years ago
|
||
nit addressed
Attachment #667578 -
Attachment is obsolete: true
Attachment #667578 -
Flags: review?(fabrice)
Assignee | ||
Comment 15•12 years ago
|
||
Waiting for my commit access to do the try run, but happy to learn how to do it.
Assignee | ||
Updated•12 years ago
|
blocking-basecamp: --- → ?
Assignee | ||
Comment 16•12 years ago
|
||
Should maybe inherit the blocking-basecamp from 796823
Comment 17•12 years ago
|
||
I pushed the latest patch to try: https://tbpl.mozilla.org/?tree=Try&rev=1aceb2c29811
Updated•12 years ago
|
blocking-basecamp: ? → +
Assignee | ||
Comment 18•12 years ago
|
||
Mmhhh... I guess it's part of the fun but everything is green for me in |extensions/cookie| (chrome) and |toolkit/mozapps| (browser).
Fabrice, any pointers?
Comment 19•12 years ago
|
||
https://tbpl.mozilla.org/?tree=Try&rev=9d5a23dc1e9a is also orange but I can't repro the failures locally either.
Investing further, but wtf.
Comment 20•12 years ago
|
||
Hrm, so I did two other try runs:
- one with the new test disabled:
https://tbpl.mozilla.org/?tree=Try&rev=612acfa56e8e
- one with the test enabled:
https://tbpl.mozilla.org/?tree=Try&rev=b3d89b15d03e
So it looks like the failure is a side effect of the new test...
Assignee | ||
Comment 21•12 years ago
|
||
Is it worth testing again with this small cleanup function added at the end of the test?
Attachment #667924 -
Attachment is obsolete: true
Updated•12 years ago
|
Priority: -- → P2
Assignee | ||
Comment 22•12 years ago
|
||
So, I suppose the last try run was the same ? :/
Comment 23•12 years ago
|
||
Yes :(
The only thing that makes sense to me is that we don't clear the permissions properly when uninstalling, so the next test starts with a profile in an unexpected state. That would actually be a platform bug.
Comment 24•12 years ago
|
||
hm... we install/uninstall http://mxr.mozilla.org/mozilla-central/source/dom/tests/mochitest/webapps/apps/basic.webapp in this test, and this app has no permissions.
Updated•12 years ago
|
Blocks: app-install
Comment 25•12 years ago
|
||
We need this patch for bug 802027, and without that the app installation experience is just awful. So I will land it without the test, and open a new bug to investigate why the test is failing.
Comment 26•12 years ago
|
||
Assignee | ||
Comment 27•12 years ago
|
||
New patch with test working!
I was able to reproduce the failure by copying the failing test in the webapps mochitests dir.
Turns out we're uninstalling 2 apps, but not the one we initially installed!
This fixes it.
Attachment #673332 -
Flags: review?(fabrice)
Comment 28•12 years ago
|
||
Status: REOPENED → RESOLVED
Closed: 12 years ago → 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla19
Comment 29•12 years ago
|
||
status-firefox18:
--- → fixed
status-firefox19:
--- → fixed
Comment 30•12 years ago
|
||
The patch landed on m-c is different from the one that landed on Aurora. I suspect a merge failure? Pushed a correction:
https://hg.mozilla.org/releases/mozilla-aurora/rev/733109bd4ed1
Updated•12 years ago
|
Attachment #673332 -
Flags: review?(fabrice)
Updated•7 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•