Closed Bug 1025921 Opened 10 years ago Closed 10 years ago

card view gets confused with multiple windows with same origin

Categories

(Firefox OS Graveyard :: Gaia::System, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(b2g-v1.4 unaffected, b2g-v2.0 affected, b2g-v2.1 affected)

RESOLVED DUPLICATE of bug 1021658
Tracking Status
b2g-v1.4 --- unaffected
b2g-v2.0 --- affected
b2g-v2.1 --- affected

People

(Reporter: bkelly, Unassigned)

References

()

Details

(Keywords: regression, Whiteboard: [dogfood2.0])

Attachments

(1 file)

It seems that the v2.0 card view can get confused if there are multiple windows open with the same origin.  The steps I used to find this were:

1) Install FxStumbler with the app-manager [1]
2) Open FxStumbler
3) Click "Open Service Map" multiple times
4) Accept geolocation permission if asked
5) Wait a short while to allow geo to resolve
6) Enter card view mode.

At this point you can see that there are windows with no screenshot for you to view.  Its just black without anything to select and no "x" to close the window.  You can still swipe to get to other apps sometimes, but in general the usability of card view is pretty much broken at this point.

All FxStumbler is doing is `window.open(url)` for each time you click the button.

Nom'ing for 2.0 blocking since this seems like a fairly easy way to break basic functionality on the phone.

[1] https://github.com/clochix/FxStumbler
Here is the link to the code FxStumbler is running:

  https://github.com/clochix/FxStumbler/blob/master/js/stumbler.js#L561
QA Wanted to check 1.4.
Keywords: qawanted
Installed FxStumbler on my Flame with App Manager.
    I'm unable to locate Service Map as described in Step 3. Also when I tap on any of the buttons in the program nothing seems to happen. Below is my environmental variables to reference and a screenshot. Any help would be appreciated here.

Environmental Variables:
Device: Flame 2.0
Build ID: 20140616000203
Gaia: a6988c15b361938bea5976c846c147ecdc1121c0
Gecko: 52a276202888
Version: 32.0a2 (2.0) 
Firmware Version: v121-2
QA Whiteboard: [QAnalyst-Triage?]
Flags: needinfo?(bkelly)
QA Contact: croesch
That screenshot means there was a js error while loading the app.  I don't see that.  Can you get a logcat with gaia console enabled in settings?  Did you git clone or use the zip file?
Flags: needinfo?(bkelly) → needinfo?(croesch)
Just to check myself, I just installed the app from both the current git and zip locations successfully.
Actually, this doesn't have much to do with FxStumbler specifically; just its use of window.open().  I'll make a minimal test case.
Ok, please go to this URL to install a minimal test app:

  http://people.mozilla.org/~bkelly/bug1025921/index.html

The test app then provides a button that will open 5 windows with the same origin.  If you then open the card view you can see that its in a bad state.
Summary: card view gets confused with multiple apps with same origin → card view gets confused with multiple windows with same origin
In short, you can confuse card view by running this from an app:

  url = // some url
  window.open(url);
  window.open(url);

This works correctly if the code is run as a browser tab because all the tabs are collected into a single "browser" card entry.  If its as an app, however, each window is treated as a separate card and things get messed up.
Able to verify this issue in Flame 2.1 Master, Flame 2.0, Buri 2.1, Buri 2.0, OpenC 2.1 and OpenC 2.0.

Actual Results: Having multiple windows open using the script in comment 8 causes problems with Card View.

Environmental Variables:
Device: Flame 2.1 - Master
Build ID: 20140617040203
Gaia: eac13407742a55b11e1877b4df2abdfd22cd582e
Gecko: bb35d1b73634
Version: 33.0a1 (2.1 - Master) 
Firmware Version: v121-2
----------------------------------------------
Environmental Variables:
Device: Flame 2.0
Build ID: 20140616000203
Gaia: a6988c15b361938bea5976c846c147ecdc1121c0
Gecko: 52a276202888
Version: 32.0a2 (2.0) 
Firmware Version: v121-2
----------------------------------------------
Environmental Variables:
Device: Buri 2.1 - Master
Build ID: 20140617052536
Gaia: 83392cae2c964fa6f8a97ac3fc515c3f94ef3c1c
Gecko: 71b345aedbf9
Version: 33.0a1 (2.1 - Master) 
Firmware Version: v1.2device.cfg
-----------------------------------------------
Environmental Variables:
Device: Buri 2.0
Build ID: 20140617073136
Gaia: 70c788c833993c4fa486ff3a6670726e75526c5e
Gecko: 0361c0f320ca
Version: 32.0a2 (2.0) 
Firmware Version: v1.2device.cfg
-----------------------------------------------
Environmental Variables:
Device: Open_C 2.1 - Master
Build ID: 20140617040203
Gaia: eac13407742a55b11e1877b4df2abdfd22cd582e
Gecko: bb35d1b73634
Version: 33.0a1 (2.1 - Master) 
Firmware Version: P821A10V1.0.0B06_LOG_DL
------------------------------------------------
Environmental Variables:
Device: Open_C 2.0
Build ID: 20140617000201
Gaia: 0f254c92bc44d614ae56a855f18a895a7e4703ad
Gecko: 7f309a3a4d3d
Version: 32.0a2 (2.0) 
Firmware Version: P821A10V1.0.0B06_LOG_DL
------------------------------------------------
------------------------------------------------

The bug does NOT occur in Flame 1.4, Buri 1.4 or OpenC 1.4

Actual Result: When I run the app from comment 8, only 1 test window appears. When I go into card view, the test window disappears and all I see is the app running in a single card.

Environmental Variables:
Device: Flame 1.4
Build ID: 20140617000202
Gaia: 4b3428e85b428e577a0f96cba6121c4ca1c91f8a
Gecko: ba55b5a7b20d
Version: 30.0 (1.4) 
Firmware Version: v121-2
-------------------------------------------------
Environmental Variables:
Device: Buri 1.4
Build ID: 20140617095036
Gaia: c6cf82cb56681dbb9ef48cb41fdcd6380da01b26
Gecko: 099f550b87bc
Version: 30.0 (1.4) 
Firmware Version: v1.2device.cfg
--------------------------------------------------
Environmental Variables:
Device: Open_C 1.4
Build ID: 20140617000202
Gaia: 4b3428e85b428e577a0f96cba6121c4ca1c91f8a
Gecko: ba55b5a7b20d
Version: 30.0 (1.4) 
Firmware Version: P821A10V1.0.0B06_LOG_DL
Flags: needinfo?(croesch) → needinfo?(jmitchell)
Keywords: qawanted
Flags: needinfo?(jmitchell)
If I had to guess, I would say this was caused by haida changes.  Before Haida a window.open() would create a browser tab in the browser app.
Ben - Is this a dupe of bug 1021658?
Flags: needinfo?(bkelly)
(In reply to Jason Smith [:jsmith] from comment #12)
> Ben - Is this a dupe of bug 1021658?

I don't think so as I have no problem returning to the Homescreen from the card view.  I guess Alive would know for sure.
Flags: needinfo?(bkelly) → needinfo?(alive)
QA Contact: croesch → pcheng
As comment 10 mentioned, the 'working' build's behavior is:

Tapping on the button in Ben's test app does NOT actually open 5 windows, instead it only opens 1 window, therefore the bug doesn't repro. Is this the expected behavior, and am I safe to assume this as 'working'?

Before I go deep to find a window I just wanted to make sure we're on the same page on what the expected behavior of a working build is.
Flags: needinfo?(bkelly)
I don't know if its supposed to open 1 window or 5 windows.  Personally I would be fine with either.

If it does open multiple windows, though, the card view needs to handle that correctly.

I guess I would ask Vivien or someone else what is the desired before for Haida when there are multiple window.open() calls with the same origin.

Vivien, what do you think?
Flags: needinfo?(bkelly) → needinfo?(21)
I believe bug 1021658 fixes this issues by preventing opening too many windows.
Flags: needinfo?(alive)
Flags: needinfo?(21)
Mark as dupe, reopen if disagree.
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → DUPLICATE
blocking-b2g: 2.0? → ---
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: