Closed Bug 1078707 Opened 7 years ago Closed 7 years ago

Closing apps no longer works via DevTools

Categories

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

defect
Not set
normal

Tracking

(blocking-b2g:2.1+, b2g-v2.0 unaffected, b2g-v2.1 verified, b2g-v2.2 verified)

VERIFIED FIXED
2.1 S7 (24Oct)
blocking-b2g 2.1+
Tracking Status
b2g-v2.0 --- unaffected
b2g-v2.1 --- verified
b2g-v2.2 --- verified

People

(Reporter: jryans, Assigned: gduan)

References

Details

(Keywords: regression)

Attachments

(2 files)

After bug 1060191, it's no longer possible to close an app via the DevTools.

STR:

* Install 2.2 simulator built after 20140926
* Open WebIDE
* Connect to simulator
* Select the Clock app in WebIDE (it will open in the simulator)
* Click WebIDE's "Stop" button (to close the app)

The app does not close.  This issue is seen with both local apps under development in WebIDE as well as Gaia apps that come pre-installed like Clock.
George, is this something you would be able to investigate?

The main cause seems to be that bug 1060191 changed |AppWindowFactory.handleEvent| to return early if the event detail does not have |url|, but prior to your change, |manifestURL| was checked instead.

When an app is closed via the DevTools (through the DOMAppplicationRegistry), |AppWindowFactory.handleEvent| gets an event of type
Flags: needinfo?(gduan)
Sorry, hit enter too early...

When an app is closed via the DevTools (through the DOMAppplicationRegistry), |AppWindowFactory.handleEvent| gets an event of type |webapps-close| and the detail contains *only* the |manifestURL|.
Attached file PR to master
Thanks for point this out. 
This fix should works, could I have your feedback on it? Thanks.
Attachment #8500820 - Flags: feedback?(jryans)
Flags: needinfo?(gduan)
Comment on attachment 8500820 [details] [review]
PR to master

Yes, this fixes the issue, thanks! :)

Please also land this in 2.1 as well.
Attachment #8500820 - Flags: feedback?(jryans) → feedback+
Comment on attachment 8500820 [details] [review]
PR to master

Hi Alive,
could you help to review this patch? Thanks.
Attachment #8500820 - Flags: review?(alive)
Comment on attachment 8500820 [details] [review]
PR to master

How is this not break bug 1060191? Don't you remove the check intentionally?
Attachment #8500820 - Flags: review?(alive)
Hi Alive,
I removed the check since some app is opened without manifestUrl like browser, so I assume all these kinda operations would require at least a url. I didn't expect we may close app by manifestUrl. 

So, my fix would check manifestUrl and url, at least one of them should be valid.
Did this land in 2.1? If not, what needs to be done to get it landed in 2.1?
[Blocking Requested - why for this release]:
DevTools regression, let's make sure to land in 2.1 also so we have a consistent experience for all FxOS versions.
blocking-b2g: --- → 2.1?
We need to make sure devtools function properly on 2.1 and it's a regression so 2.1+.
blocking-b2g: 2.1? → 2.1+
Assignee: nobody → gduan
Attached file PR to 2.1
[Approval Request Comment]
[Bug caused by] (feature/regressing bug #):bug 1060191
[User impact] if declined: devTool cannot close app by itself.
[Testing completed]: Yes
[Risk to taking this patch] (and alternatives if risky): No
[String changes made]:
Attachment #8506777 - Flags: approval-gaia-v2.1?
Attachment #8506777 - Flags: approval-gaia-v2.1? → approval-gaia-v2.1+
Thanks,
v2.1: https://github.com/mozilla-b2g/gaia/commit/ea3964862ab96d04ba1c4264f3a51c3d17a58a74
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → 2.1 S7 (24Oct)
Not sure how to verify the issue manually,
wait until a new version of the simulator will be updated 
Because it still reproduces on 2.2 on fxos-simulator-2.2.20141012-win32.xpi
(In reply to sarsenyev from comment #14)
> Not sure how to verify the issue manually,
> wait until a new version of the simulator will be updated 
> Because it still reproduces on 2.2 on fxos-simulator-2.2.20141012-win32.xpi

The simulator "officially" releases rarely since it's a large download.  However, there are nightly builds you can test too[1].  Adjust the link to get the right XPI for your OS.

These nightly XPIs don't know how to update, so you'd need to reinstall the official version to get future updates.

[1]: https://ftp.mozilla.org/pub/mozilla.org/b2g/nightly/latest-mozilla-central/fxos-simulator-2.2-mac64.xpi
J.Ryan, thank you so much for the provided link

Verified the issue is fixed on 2.2 and 2.1 the latest (2014/11/21) Simulator build

The app can be closed from WebIDE
Status: RESOLVED → VERIFIED
Flags: needinfo?(ktucker)
QA Whiteboard: [QAnalyst-Triage+]
Flags: needinfo?(ktucker)
You need to log in before you can comment on or make changes to this bug.