Closed Bug 986056 Opened 10 years ago Closed 10 years ago

[B2G][E.Me]E.Me search will freeze if locally installed apps are deleted shortly before search is performed.

Categories

(Core :: DOM: Device Interfaces, defect)

30 Branch
All
Gonk (Firefox OS)
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla31
blocking-b2g 1.4+
Tracking Status
firefox29 --- wontfix
firefox30 --- fixed
firefox31 --- fixed
b2g-v1.3 --- unaffected
b2g-v1.4 --- fixed
b2g-v2.0 --- fixed

People

(Reporter: rkuhlman, Assigned: baku)

Details

(Keywords: regression, Whiteboard: [perf-reviewed])

Attachments

(2 files, 1 obsolete file)

Attached file E.Me-freeze.txt
If the user deletes an app that would populate the results of an E.Me Smart Collection search, E.Me will freeze when that Smart Search is performed. 

Repro Steps:
1) Updated Buri to BuildID: 20140312040203
2) Launch the marketplace and download an app that would appear in the 'Social' E.Me Smart Search. (I used the MessageMe app)
3) Delete the app that was just downloaded.
4) Tap on the 'Social' smartsearch feature.

Actual:
Search never populates any results. A spinning throbber can be seen indefinitely. If the user returns to the homescreen, E.Me will be non-functional until the device is restarted.

Expected:
E.Me search populates with results and continues to function.

Environmental Variables:
Device: Buri v1.4 Moz RIL
BuildID: 20140320000349
Gaia: 53edbf08b0a750c31e8c6b2c20f2b1315b1412d1
Gecko: 9b482d6994fd
Version: 30.0a2
Firmware Version: v1.2-device.cfg

Notes:

Repro frequency: 4/5 attempts (80%)
See attached: logcat
Does this reproduce on 1.3?
Keywords: qawanted
QA Contact: astole
Could not get the issue to reproduce on the latest 1.3. In the latest 1.3, the e.me search populates correctly.

1.3 Environmental Variables:
Device: Buri 1.3 MOZ
BuildID: 20140319004003
Gaia: f2f2be55dcca1d6775592ef478948045935a91ed
Gecko: 87d90ecfe616
Version: 28.0
Firmware Version: v1.2-device.cfg
blocking-b2g: --- → 1.4?
Awaiting regression window and would like to back out the patch regressing it.
blocking-b2g: 1.4? → 1.4+
The regression range was outside of what we have available in Tinderbox and Inbound.  B2G-RIL builds were used and the gecko-gaia swap test revealed it was a Gaia issue.

Last Working B2G-RIL build:
1.4 Environmental Variables:
Device: Buri 1.4 MOZ
BuildID: 20140114040616
Gaia: 002cca258af8586859c6efb2dada2fcec36754a1
Gecko: 34dddf6f7ec1
Version: 29.0a1
Firmware Version: v1.2-device.cfg

First Broken B2G-RIL build:
1.4 Environmental Variables:
Device: Buri 1.4 MOZ
BuildID: 20140115041401
Gaia: 255a56ac67e5b28f1fc78307969cc83391c9652f
Gecko: 81bced59e8b3
Version: 29.0a1
Firmware Version: v1.2-device.cfg


Last Working Gaia / First Broken Gecko: Issue Does NOT reproduce
Gaia: 002cca258af8586859c6efb2dada2fcec36754a1
Gecko: 81bced59e8b3

Last Working Gecko / First Broken Gaia: Issue DOES reproduce
Gaia: 255a56ac67e5b28f1fc78307969cc83391c9652f
Gecko: 34dddf6f7ec1

Pushlog:
https://github.com/mozilla-b2g/gaia/compare/002cca258af8586859c6efb2dada2fcec36754a1...255a56ac67e5b28f1fc78307969cc83391c9652f
A potential suspect for causing this regression is bug 957978.
Amir, can you take a look here?
Flags: needinfo?(amirn)
Flags: needinfo?(amirn)
I only cc'd Ran, no idea why it cleared the needinfo?

I will investigate.
Whiteboard: [perf-reviewed]
E.me started using the Datastore API in bug #957978.

As Jason suspected, this (commit d1d3e0cbcc61773627c1175bd5ef2fc71046c0f6) introduced the regression, but the cause seems to be with the Datastore API.

For some reason, after installing and uninstalling an app from the marketplace the E.me datastore does not exist when trying to access it:
https://github.com/mozilla-b2g/gaia/blob/d1d3e0cbcc61773627c1175bd5ef2fc71046c0f6/apps/homescreen/everything.me/js/everything.me.js#L605

To clarify, this works:
1. reset device
2. navigator.getDataStores('eme_store').then(function (stores) {...}) // stores.length == 1

This does not:
1. reset device
2. install an app from the marketplace (any app)
3. uninstall the app installed in step 2
4. navigator.getDataStores('eme_store').then(function (stores) {...}) // stores.length == 0

I'm not sure how to proceed with this, it might be a system bug ?
Flags: needinfo?(anygregor)
(In reply to Amir Nissim (Everything.me) from comment #8)
> E.me started using the Datastore API in bug #957978.
> 
> As Jason suspected, this (commit d1d3e0cbcc61773627c1175bd5ef2fc71046c0f6)
> introduced the regression, but the cause seems to be with the Datastore API.
> 
> For some reason, after installing and uninstalling an app from the
> marketplace the E.me datastore does not exist when trying to access it:
> https://github.com/mozilla-b2g/gaia/blob/
> d1d3e0cbcc61773627c1175bd5ef2fc71046c0f6/apps/homescreen/everything.me/js/
> everything.me.js#L605
> 
> To clarify, this works:
> 1. reset device
> 2. navigator.getDataStores('eme_store').then(function (stores) {...}) //
> stores.length == 1
> 
> This does not:
> 1. reset device
> 2. install an app from the marketplace (any app)
> 3. uninstall the app installed in step 2
> 4. navigator.getDataStores('eme_store').then(function (stores) {...}) //
> stores.length == 0
> 
> I'm not sure how to proceed with this, it might be a system bug ?

Amir, can you provide a simple testcase that shows this behavior?
Andrea, can you help out here?
Flags: needinfo?(anygregor) → needinfo?(amarchesini)
> Amir, can you provide a simple testcase that shows this behavior?
> Andrea, can you help out here?

Yep. Debugging it...
Flags: needinfo?(amarchesini)
Assignee: nobody → amarchesini
OS: Gonk (Firefox OS) → All
Hardware: ARM → All
Attached patch delete.patch (obsolete) — Splinter Review
Attachment #8398571 - Flags: review?(ehsan)
Component: Gaia::Everything.me → DOM: Device Interfaces
Product: Firefox OS → Core
Version: unspecified → 30 Branch
Comment on attachment 8398571 [details] [diff] [review]
delete.patch

Review of attachment 8398571 [details] [diff] [review]:
-----------------------------------------------------------------

::: dom/datastore/tests/test_bug986056.html
@@ +108,5 @@
> +    // Installing the app1
> +    function() { installApp(gHostedManifestURL); },
> +
> +    // Run tests in app
> +    function() { testApp(2); },

This shuffling of the indices in this test is a bit confusing.  Can you please use a better term such as "App A" and "App B" in these comments to make it clearer which apps we're installing/uninstalling/testing in each pass?
Attachment #8398571 - Flags: review?(ehsan) → review+
Attached patch patchSplinter Review
Attachment #8398571 - Attachment is obsolete: true
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/f6cd19c52c7d
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla31
OS: All → Gonk (Firefox OS)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: