bugzilla.mozilla.org has resumed normal operation. Attachments prior to 2014 will be unavailable for a few days. This is tracked in Bug 1475801.
Please report any other irregularities here.

Closing apps no longer works via DevTools

VERIFIED FIXED in Firefox OS v2.1

Status

Firefox OS
Gaia::System::Window Mgmt
VERIFIED FIXED
4 years ago
4 years ago

People

(Reporter: jryans, Assigned: gduan)

Tracking

({regression})

unspecified
2.1 S7 (24Oct)
regression
Dependency tree / graph

Firefox Tracking Flags

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

Details

Attachments

(2 attachments)

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.
(Reporter)

Updated

4 years ago
Blocks: 1060191
(Reporter)

Updated

4 years ago
status-b2g-v2.0: --- → unaffected
status-b2g-v2.1: --- → affected
status-b2g-v2.2: --- → affected
(Reporter)

Updated

4 years ago
Blocks: 1078192
(Reporter)

Comment 1

4 years ago
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)
(Reporter)

Comment 2

4 years ago
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|.
Created attachment 8500820 [details] [review]
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)
(Reporter)

Comment 4

4 years ago
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.

Comment 9

4 years ago
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+

Updated

4 years ago
Assignee: nobody → gduan
Created attachment 8506777 [details] [review]
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?

Updated

4 years ago
status-b2g-v2.2: affected → fixed

Updated

4 years ago
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
Last Resolved: 4 years ago
Resolution: --- → FIXED
status-b2g-v2.1: affected → fixed
Target Milestone: --- → 2.1 S7 (24Oct)

Comment 14

4 years ago
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

Comment 16

4 years ago
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
status-b2g-v2.1: fixed → verified
status-b2g-v2.2: fixed → 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.