Closed Bug 1020520 Opened 10 years ago Closed 10 years ago

Simulator getting disconnect

Categories

(Firefox OS Graveyard :: Simulator, defect)

x86_64
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 1012869

People

(Reporter: raniere, Unassigned)

Details

Steps to Reproduce:

1. Open App Manager (at the URL bar, type "about:app-manager")
2. Click on "Starting Simulator"
3. Click on "Add"
4. Click on "Install Simulator"
5. Click on "Install Firefox OS 2.0 Simulator (unstable)"
6. Follow the instructions to finish the installation
7. Go back to App Manager
8. Click on "Firefox OS 2.0"
	 
Actual Results:

15:48:38: Found simulator: Firefox OS 2.0
15:48:38: Starting simulator...
15:48:38: Simulator ready. Connecting.
15:48:38: connecting to localhost:44739
15:48:58: connection timeout. Possible causes: didn't click on 'accept' (prompt).
15:48:58: disconnecting
15:48:58: disconnected

Note: Although the simulator was disconnected it keep running.
	 
Expected Results:

The simulator keep connected and user can debug the apps.

Environment Informations:

- Mozilla/5.0 (X11; Linux x86_64; rv:32.0) Gecko/20100101 Firefox/32.0
- ADB Helper installed
This looks as a regression. Using nightly buildings I track 2014-05-15 as a good version and 2014-05-17 as a bad one.
This sounds like a dupe of bug 1012869.  I'll be attaching a fix there soon.  Once it's in Nightly, it would be great if you could test this again, as it's hard for me to reproduce this problem locally.
Stinnett,

Thanks for the help and sorry for the bug be a little hard to reproduce. I apply your patch, build Firefox but it didn't solve the problem. Let me know if a dump of my system will help and how can I provide it.

Build information:

$ hg log -l 2                                         
186971[tip]   55cb60250013   2014-06-06 12:37 -0300   jryans
  Bug 1012869 - Increase debugger connect timeout to 30 secs. r=paul

186970   c8288d0c7a15   2014-06-06 11:06 +0200   cbook
  Backed out changeset e0da2d69cfdb (bug 1020257) for causing Gi Test Regressions
$ python2 mach build
...
Your build was successful!

Firefox Console Output:

$ ../build/dist/bin/firefox
console.error: fxos_2_0_simulator: 
  (process:29800): GLib-CRITICAL **: g_slice_set_config: assertion 'sys_page_size == 0' failed
console.error: fxos_2_0_simulator: 
  System JS : WARNING resource://gre/modules/Preferences.jsm:36 - mutating the [[Prototype]] of an object will cause your code to run very slowly; instead create the object with the correct initial [[Prototype]] value using Object.create
console.error: fxos_2_0_simulator: 
  ATTENTION: default value of option force_s3tc_enable overridden by environment.
console.error: fxos_2_0_simulator: 
  Can't find symbol 'glXCreateContextAttribsARB'.
console.error: fxos_2_0_simulator: 
  JavaScript error: app://system.gaiamobile.org/js/nfc_handover_manager.js, line 98: this.bluetooth is undefinedconsole.error: fxos_2_0_simulator: 
  JavaScript warning: app://system.gaiamobile.org/js/browser_context_menu.js, line 31: mutating the [[Prototype]] of an object will cause your code to run very slowly; instead create the object with the correct initial [[Prototype]] value using Object.create
console.error: fxos_2_0_simulator: 
  JavaScript error: app://system.gaiamobile.org/js/call_forwarding.js, line 207: CallForwarding is not defined

Simulator Output:

12:55:12: Starting simulator...
12:55:12: Simulator ready. Connecting.
12:55:12: connecting to localhost:55355
12:55:32: connection timeout. Possible causes: didn't click on 'accept' (prompt).
12:55:32: disconnecting
12:55:32: disconnected
Flags: needinfo?(jryans)
Thanks for testing this locally, that's quite helpful!  Since you and Paul (in bug 1012869) both say the patch doesn't help, that strengthens my belief that it's the same root problem (even though Paul says it does not happen for him on Linux).

Can you test with other simulator versions as well, to see if they have the same issue?  For example, try the 1.3 simulator.  This will help confirm that it's a purely client-side problem.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Flags: needinfo?(jryans) → needinfo?(ra092767)
Also, if you try connecting to the simulator again, does it eventually work?  Or does it fail every time for you?
Same problem with Simulator 1.3:

14:13:31: connecting to localhost:6000
14:13:32: disconnecting
14:13:32: disconnected
14:13:35: Found simulator: Firefox OS 1.3
14:13:35: Starting simulator...
14:13:35: Simulator ready. Connecting.
14:13:35: connecting to localhost:55994
14:13:55: connection timeout. Possible causes: didn't click on 'accept' (prompt).
14:13:55: disconnecting
14:13:55: disconnected

I'm using Arch so it can be happen due some bleeding edge library "only" available at Arch.

I couldn't try reconnect to the simulator because there was such option for Firefox 55cb60250013 (your patch) and c8288d0c7a15 (nightly) using Simulator 1.3 and 2.0.
Flags: needinfo?(ra092767)
When I said "reconnect", I was assuming that the bottom bar of the App Manager says "Connecting... [Cancel]" while it tries to connect.  If you cancel and start the simulator again, that's what I mean by "reconnect".

It's possible it a library issue, but since you found a regression range where many changes were made to the transport that sends DevTools packets, I don't think that would be it.  But for completeness, you can enable verbose logging[1] for the simulator, as that could give us more data to go on.  You'll need to set the pref it describes, and then open the Browser Console to see logging messages.

[1]: https://developer.mozilla.org/en-US/docs/Tools/Firefox_OS_Simulator#How_to_enable_verbose_logging
Flags: needinfo?(ra092767)
Same problem with "cancel and start the simulator again".

I didn't have time to use bisect and build Firefox for each commit of bisect (since this will take many hours).

I couldn't enable verbose logging because [1] is out of date. Search for extensions.fxos_1_3_simulator at Firefox 29.0.1 or high give no option.

[1]: https://developer.mozilla.org/en-US/docs/Tools/Firefox_OS_Simulator#How_to_enable_verbose_logging
Flags: needinfo?(ra092767)
(In reply to Raniere Silva from comment #8)
> Same problem with "cancel and start the simulator again".

Okay, good to know.

> I didn't have time to use bisect and build Firefox for each commit of bisect
> (since this will take many hours).

That's fine, I am almost positive it's from bug 797639, which is inside your range.

> I couldn't enable verbose logging because [1] is out of date. Search for
> extensions.fxos_1_3_simulator at Firefox 29.0.1 or high give no option.

The prefs do not exist by default for any version of Firefox.  Instead you need to add a new pref with the given name (you can create it by right-clicking in the about:config UI).  The ones listed are just examples.  For example, to affect the 2.0 simulator, the pref name would be "extensions.fxos_2_0_simulator@mozilla.org.sdk.console.logLevel".
I've added a new patch to bug 1012869 that replaces the previous one.  If you could try that on your system, it would be quite helpful!
Flags: needinfo?(ra092767)
Stinnett, thanks very much for the patch. Looks like that it solves the problem.
Flags: needinfo?(ra092767)
Depends on: 1012869
Thanks for your help in testing the fix!  I'll mark this as a dupe.
Status: NEW → RESOLVED
Closed: 10 years ago
No longer depends on: 1012869
Resolution: --- → DUPLICATE
See Also: 1012869
You need to log in before you can comment on or make changes to this bug.