The Inspector is useless after killing the application

RESOLVED FIXED in Firefox 40

Status

()

Firefox
Developer Tools: WebIDE
P3
normal
RESOLVED FIXED
3 years ago
2 years ago

People

(Reporter: julienw, Assigned: jryans)

Tracking

unspecified
Firefox 40
x86_64
Linux
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox40 fixed)

Details

(Whiteboard: [polish-backlog][difficulty=easy])

Attachments

(2 attachments)

(Reporter)

Description

3 years ago
STR:

1. Open WebIDE
2. Plug in your Flame and open it from the top right menu
3. Open the Messages app from the top left menu (you need the "debug certified apps" pref)
4. Kill the Messages app from command line:

  adb shell kill `adb shell b2g-ps Messages | awk '!/APPLICATION/ { print $4 }'`

=> Notice that the "play" icon is now displayed in WebIDE, instead of the "reload" icon. That means the WebIDE is correctly notified that the application has stopped.
=> You can still use the Tools. This is OK.

5. Start the application again (either from WebIDE or from the device)

=> Notice the Tools are displayed but interacting with them does nothing on the device.

You need to close/reopen them.
(Assignee)

Comment 1

3 years ago
I *think* this is another toolbox shutdown bug which is fixed by
Depends on: 1128027
(Assignee)

Comment 2

3 years ago
... bug 1128027.
(Assignee)

Comment 3

3 years ago
Okay, bug 1128027 changed some error messages here, but the issue itself still exists.

Julien, after step 4 (killing the app), you say "You can still use the Tools. This is OK.", but for me the toolbox seems pretty dead.  After all, we just killed the app, so how can the toolbox work anymore?

To me, the logical fix is for WebIDE's toolbox to close when the app is killed.  Does this seem right to you?
Blocks: 893669
Flags: needinfo?(felash)
(Reporter)

Comment 4

3 years ago
> "You can still use the Tools. This is OK."

Mmm I think I meant that this was not necessarily bad. For example, we might want to still see the console messages or the profiler information.

I don't have a strong opinion, but if we can keep the state as it is, and "just" reconnect the existing toolbox to any application we want to debug, while retaining all existing data, it would be the best behavior IMO.

If this is too difficult then do as you think :)
Flags: needinfo?(felash)
(Reporter)

Comment 5

3 years ago
Actually, now that I use it once again, I exactly know how I'd like it to behave.

The fact is that I push the application using the Gaia build system, not using WebIDE (mainly because it's a shell command I can bind it in vim). So it kills the running application, and then I start it again, either from WebIDE or from the phone. And then I'd like WebIDE to automatically connect to the newly running application, but only when I start it (and I know WebIDE is aware of this because the top icons are changing).

Hope this makes sense.
(Assignee)

Comment 6

3 years ago
(In reply to Julien Wajsberg [:julienw] (PTO April 6th) from comment #5)
> Actually, now that I use it once again, I exactly know how I'd like it to
> behave.
> 
> The fact is that I push the application using the Gaia build system, not
> using WebIDE (mainly because it's a shell command I can bind it in vim). So
> it kills the running application, and then I start it again, either from
> WebIDE or from the phone. And then I'd like WebIDE to automatically connect
> to the newly running application, but only when I start it (and I know
> WebIDE is aware of this because the top icons are changing).
> 
> Hope this makes sense.

Right, that makes sense!  If an app starts, and it's the currently selected app in WebIDE, we should auto-open the toolbox.
(Assignee)

Updated

3 years ago
Whiteboard: [devedition-40]
(Assignee)

Comment 7

3 years ago
While working on this issue, I noticed troubles with reopen the toolbox for the same app.  The patches in bug 1145049 resolve this, hopefully they will land soon.
Depends on: 1145049
(Assignee)

Updated

3 years ago
Assignee: nobody → jryans
Status: NEW → ASSIGNED
(Assignee)

Comment 8

3 years ago
Created attachment 8588858 [details] [diff] [review]
0001-Bug-1134166-Restart-toolbox-if-selected-app-re-opens.patch
Attachment #8588858 - Flags: review?(poirot.alex)
(Assignee)

Comment 9

3 years ago
Created attachment 8588859 [details] [diff] [review]
0002-Bug-1134166-Close-toolbox-if-selected-app-dies.-r-oc.patch
Attachment #8588859 - Flags: review?(poirot.alex)
Try: https://treeherder.mozilla.org/#/jobs?repo=try&revision=c5aa2aa5c4fc
For this to work as smoothly as possible, you should also have the patches from bug 1145049 applied.
Comment on attachment 8588858 [details] [diff] [review]
0001-Bug-1134166-Restart-toolbox-if-selected-app-re-opens.patch

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

Looks good,
Attachment #8588858 - Flags: review?(poirot.alex) → review+
Comment on attachment 8588859 [details] [diff] [review]
0002-Bug-1134166-Close-toolbox-if-selected-app-dies.-r-oc.patch

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

thanks!
Attachment #8588859 - Flags: review?(poirot.alex) → review+
Note that I'm seeing the following exception, not sure it is related to your patch or one of mine:

Full message: TypeError: AppManager.selectedProject is null
Full stack: UI.updateToolboxFullscreenState@chrome://webide/content/webide.js:1058:1
UI._closeToolboxUI@chrome://webide/content/webide.js:1082:5
UI.destroyToolbox/<@chrome://webide/content/webide.js:1012:21

STR is to open simulator, connect to clock, open toolbox and shutdown the simulator.
(In reply to Alexandre Poirot [:ochameau] from comment #14)
> Note that I'm seeing the following exception, not sure it is related to your
> patch or one of mine:
> 
> Full message: TypeError: AppManager.selectedProject is null
> Full stack:
> UI.updateToolboxFullscreenState@chrome://webide/content/webide.js:1058:1
> UI._closeToolboxUI@chrome://webide/content/webide.js:1082:5
> UI.destroyToolbox/<@chrome://webide/content/webide.js:1012:21
> 
> STR is to open simulator, connect to clock, open toolbox and shutdown the
> simulator.

It happens on fx-team, but I'll throw in an extra check here to fix it.
remote:   https://hg.mozilla.org/integration/fx-team/rev/c8066e57077e
remote:   https://hg.mozilla.org/integration/fx-team/rev/665b9fb029e1
remote:   https://hg.mozilla.org/integration/fx-team/rev/698da9956e20
(Assignee)

Updated

3 years ago
Whiteboard: [devedition-40] → [devedition-40][difficulty=easy]
https://hg.mozilla.org/mozilla-central/rev/c8066e57077e
https://hg.mozilla.org/mozilla-central/rev/665b9fb029e1
https://hg.mozilla.org/mozilla-central/rev/698da9956e20
Status: ASSIGNED → RESOLVED
Last Resolved: 3 years ago
status-firefox40: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 40
Priority: -- → P3
Whiteboard: [devedition-40][difficulty=easy] → [polish-backlog][difficulty=easy]
You need to log in before you can comment on or make changes to this bug.