Intermittent test_install_app.xul | #Super Crazy Basic App# is expected to be true per template #== "Wild and Crazy Basic App"#

RESOLVED FIXED

Status

RESOLVED FIXED
7 years ago
a year ago

People

(Reporter: emorley, Assigned: myk)

Tracking

({intermittent-failure})

Trunk
x86
Windows 7
intermittent-failure
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

7 years ago
Rev3 WINNT 6.1 mozilla-inbound pgo test mochitest-other on 2012-05-11 00:53:58 PDT for push b9c3d700625a

slave: talos-r3-w7-017

https://tbpl.mozilla.org/php/getParsedLog.php?id=11670180&tree=Mozilla-Inbound

Log isn't overly useful sadly...

{
10133 INFO TEST-START | chrome://mochitests/content/chrome/dom/tests/mochitest/webapps/test_install_app.xul
10134 INFO TEST-PASS | chrome://mochitests/content/chrome/dom/tests/mochitest/webapps/test_install_app.xul | The return object from mozApps api was null as expected
10135 INFO TEST-PASS | chrome://mochitests/content/chrome/dom/tests/mochitest/webapps/test_install_app.xul | The return object from mozApps api was null as expected
10136 INFO TEST-PASS | chrome://mochitests/content/chrome/dom/tests/mochitest/webapps/test_install_app.xul | at least one notification displayed
10137 INFO TEST-PASS | chrome://mochitests/content/chrome/dom/tests/mochitest/webapps/test_install_app.xul | #success# is expected to be true per template #== "success"#
10138 INFO TEST-PASS | chrome://mochitests/content/chrome/dom/tests/mochitest/webapps/test_install_app.xul | #chrome://mochitests# is expected to be true per template #== "chrome://mochitests"#
10139 INFO TEST-PASS | chrome://mochitests/content/chrome/dom/tests/mochitest/webapps/test_install_app.xul | #http://www.example.com# is expected to be true per template #== "http://www.example.com"#
10140 INFO TEST-PASS | chrome://mochitests/content/chrome/dom/tests/mochitest/webapps/test_install_app.xul | #http://www.example.com:80/chrome/dom/tests/mochitest/webapps/apps/super_crazy.webapp# is expected to be true per template #== "http://www.example.com:80/chrome/dom/tests/mochitest/webapps/apps/super_crazy.webapp"#
10141 INFO TEST-PASS | chrome://mochitests/content/chrome/dom/tests/mochitest/webapps/test_install_app.xul | #Super Crazy Basic App# is expected to be true per template #== "Super Crazy Basic App"#
10142 INFO TEST-PASS | chrome://mochitests/content/chrome/dom/tests/mochitest/webapps/test_install_app.xul | #*# is expected to be true per template #== "*"#
10143 INFO TEST-PASS | chrome://mochitests/content/chrome/dom/tests/mochitest/webapps/test_install_app.xul | #success# is expected to be true per template #== "success"#
10144 INFO TEST-PASS | chrome://mochitests/content/chrome/dom/tests/mochitest/webapps/test_install_app.xul | #chrome://mochitests# is expected to be true per template #== "chrome://mochitests"#
10145 INFO TEST-PASS | chrome://mochitests/content/chrome/dom/tests/mochitest/webapps/test_install_app.xul | #http://www.example.com# is expected to be true per template #== "http://www.example.com"#
10146 INFO TEST-PASS | chrome://mochitests/content/chrome/dom/tests/mochitest/webapps/test_install_app.xul | #http://www.example.com:80/chrome/dom/tests/mochitest/webapps/apps/super_crazy.webapp# is expected to be true per template #== "http://www.example.com:80/chrome/dom/tests/mochitest/webapps/apps/super_crazy.webapp"#
10147 INFO TEST-PASS | chrome://mochitests/content/chrome/dom/tests/mochitest/webapps/test_install_app.xul | #1336723081101# is expected to be true per template # > Date.now() - 3000#
10148 INFO TEST-PASS | chrome://mochitests/content/chrome/dom/tests/mochitest/webapps/test_install_app.xul | #Super Crazy Basic App# is expected to be true per template #== "Super Crazy Basic App"#
10149 INFO TEST-PASS | chrome://mochitests/content/chrome/dom/tests/mochitest/webapps/test_install_app.xul | #*# is expected to be true per template #== "*"#
10150 INFO TEST-PASS | chrome://mochitests/content/chrome/dom/tests/mochitest/webapps/test_install_app.xul | The return object from mozApps api was null as expected
10151 INFO TEST-PASS | chrome://mochitests/content/chrome/dom/tests/mochitest/webapps/test_install_app.xul | at least one notification displayed
10152 INFO TEST-PASS | chrome://mochitests/content/chrome/dom/tests/mochitest/webapps/test_install_app.xul | #success# is expected to be true per template #== "success"#
10153 INFO TEST-PASS | chrome://mochitests/content/chrome/dom/tests/mochitest/webapps/test_install_app.xul | #chrome://mochitests# is expected to be true per template #== "chrome://mochitests"#
10154 INFO TEST-PASS | chrome://mochitests/content/chrome/dom/tests/mochitest/webapps/test_install_app.xul | #http://www.example.com# is expected to be true per template #== "http://www.example.com"#
10155 INFO TEST-PASS | chrome://mochitests/content/chrome/dom/tests/mochitest/webapps/test_install_app.xul | #http://www.example.com:80/chrome/dom/tests/mochitest/webapps/apps/wild_crazy.webapp# is expected to be true per template #== "http://www.example.com:80/chrome/dom/tests/mochitest/webapps/apps/wild_crazy.webapp"#
10156 INFO TEST-PASS | chrome://mochitests/content/chrome/dom/tests/mochitest/webapps/test_install_app.xul | #Wild and Crazy Basic App# is expected to be true per template #== "Wild and Crazy Basic App"#
10157 INFO TEST-PASS | chrome://mochitests/content/chrome/dom/tests/mochitest/webapps/test_install_app.xul | #*# is expected to be true per template #== "*"#
10158 INFO TEST-PASS | chrome://mochitests/content/chrome/dom/tests/mochitest/webapps/test_install_app.xul | #success# is expected to be true per template #== "success"#
10159 INFO TEST-PASS | chrome://mochitests/content/chrome/dom/tests/mochitest/webapps/test_install_app.xul | #chrome://mochitests# is expected to be true per template #== "chrome://mochitests"#
10160 INFO TEST-PASS | chrome://mochitests/content/chrome/dom/tests/mochitest/webapps/test_install_app.xul | #http://www.example.com# is expected to be true per template #== "http://www.example.com"#
10161 INFO TEST-PASS | chrome://mochitests/content/chrome/dom/tests/mochitest/webapps/test_install_app.xul | #http://www.example.com:80/chrome/dom/tests/mochitest/webapps/apps/wild_crazy.webapp# is expected to be true per template #== "http://www.example.com:80/chrome/dom/tests/mochitest/webapps/apps/wild_crazy.webapp"#
10162 INFO TEST-PASS | chrome://mochitests/content/chrome/dom/tests/mochitest/webapps/test_install_app.xul | #1336723081314# is expected to be true per template # > Date.now() - 3000#
10163 ERROR TEST-UNEXPECTED-FAIL | chrome://mochitests/content/chrome/dom/tests/mochitest/webapps/test_install_app.xul | #Super Crazy Basic App# is expected to be true per template #== "Wild and Crazy Basic App"#
10164 INFO TEST-PASS | chrome://mochitests/content/chrome/dom/tests/mochitest/webapps/test_install_app.xul | #*# is expected to be true per template #== "*"#
10165 INFO TEST-PASS | chrome://mochitests/content/chrome/dom/tests/mochitest/webapps/test_install_app.xul | The return object from mozApps api was null as expected
10166 INFO TEST-END | chrome://mochitests/content/chrome/dom/tests/mochitest/webapps/test_install_app.xul | finished in 634ms
}
10163 ERROR TEST-UNEXPECTED-FAIL | chrome://mochitests/content/chrome/dom/tests/mochitest/webapps/test_install_app.xul | #Super Crazy Basic App# is expected to be true per template #== "Wild and Crazy Basic App"#

The explanation of this is the following. 
First we install an app "Super Crazy Basic App" and then we install the same app but update the name "Wild and Crazy Basic App". 

The problem is what we retrieved was the earlier stored copy, and not the copy we just installed. 

This must be a timing issue.. with inserting , and the callback... as in it isn't guaranteed that things are written to the data store, before we attempt to retrieve the app. 

Looking into a bit more
Looks to me Like the implmentation in Webapps.jsm writes asynchronously, and the callback isn't being used to determine when the write has been completed.. as such it is entirely possible to get the first app to be returned. 

Would recommend rewriting:

187     let dir = FileUtils.getDir(DIRECTORY_NAME, ["webapps", id], true, true);
188     let manFile = dir.clone();
189     manFile.append("manifest.json");
190     this._writeFile(manFile, JSON.stringify(app.manifest));
191     this.webapps[id] = appObject;
192 

when we write to the file I think the rest of the function should be executed after the callback calls success. 

  _writeFile: function ss_writeFile(aFile, aData, aCallbak) {
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)

Updated

6 years ago
Component: DOM: Mozilla Extensions → DOM: Apps
Comment hidden (Treeherder Robot)
(Assignee)

Comment 6

6 years ago
I significantly rewrote the test code in Firefox 18, currently in central, so failures with this particular signature will no longer occur there (although they may still occur in aurora and beta, as one did yesterday).

There are still orangefactors in the code, like bug 790152 and bug 792791, and it's possible that the same underlying failure will manifest with a different signature, but then folks'll probably file a new bug rather than tracing the issue back to this one.

So I'm resolving this bug fixed.  But I'm also assigning it to myself so it's on my radar if we need to reopen it.
Assignee: nobody → myk
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
Keywords: intermittent-failure
Whiteboard: [orange]
Comment hidden (Treeherder Robot)

Updated

a year ago
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.