Closed Bug 1233017 Opened 9 years ago Closed 8 years ago

Under connect, sometimes you get the ADB serial, instead of the device model name

Categories

(Firefox OS Graveyard :: B2gInstaller, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: jlorenzo, Assigned: gerard-majax)

References

Details

Attachments

(3 files)

Attached image Screenshot
STR: Still unclear
I managed to get into that state with many STR, but if I repeated them I couldn't repro.

Here's what I tried:
Scenario 1 (with a Flame)
1. adb reboot-bootloader
2. adb reboot

Scenario 2
a. Refreshing the addon (Ctrl+R)

When I take a look at the logs, I only get this regular log line (happens also when everything works fine):
> [ADB] Device is in ADB mode. 2 about.js:696:3

I'll look into it, to see if I can find something consistent.
I found a more consistent way:
1. Start downloading the build.
2. On the device, turn off USB debugging.
3. Let the wizard (silently) fail
4. Turn USB debugging back on.
5. Close the about:b2g-installer
6. Open a new tab and go to about:b2g-installer

Repro rate: 3/3.
I think I have reproduced that while writing mochitests so it's blocking me right now to complete some basic mochitests :)
Assignee: nobody → lissyx+mozillians
https://hg.mozilla.org/try/rev/39efdc5a63a6#l13.70 this is failing with 0 builds instead of 2, and the serial number instead of device name. This happens when |test_select_build.html| https://hg.mozilla.org/try/rev/39efdc5a63a6#l6.13 is being added to the mochitests.
Dale, this might be related to the code you rewrote, that handles devices connections :). I have noticed that when the bug is triggered I see two consecutives calls to |getModel()| method and then nothing moves forward.
Flags: needinfo?(dale)
I have been able to track that down to |supportedDevices| being empty because the XHR never triggers the event listeners when the page is loaded the second time.
Flags: needinfo?(dale)
Fixed by removing the loadFlags:
> xhr.channel.loadFlags |=
>   Ci.nsIRequest.LOAD_ANONYMOUS |                  
>   Ci.nsIRequest.LOAD_BYPASS_CACHE |                                      
>   Ci.nsIRequest.INHIBIT_PERSISTENT_CACHING;

But I guess I will just change to use "new XMLHttpRequest()", I don't see the point of using createInstance().
Johan, if you come back from PTO before we meet, can you try to adapt https://hg.mozilla.org/try/rev/7d62cd780ebd ? Just patch -p3 < ... should be enough to apply
Flags: needinfo?(jlorenzo)
Attachment #8702402 - Flags: review?(dale)
Comment on attachment 8702402 [details] [diff] [review]
Fix redownloading of builds.json

I didnt know you could use plain xhr in an addon, much nicer cheers
Attachment #8702402 - Flags: review?(dale) → review+
I'll land this as a PR on the current repo and include it in my patches for bug 1235459
Flags: needinfo?(jlorenzo)
Attached file B2G Installer PR
This is the same patch, except that it is applied on the github repo
Attachment #8702880 - Flags: review+
https://github.com/mozilla-b2g/b2g-installer/commit/e09c8fca1b84c0627159ab07e69853329cdeeedf
Status: NEW → RESOLVED
Closed: 8 years ago
Flags: needinfo?(jlorenzo)
Resolution: --- → FIXED
The addon is more stable, than it used to be.

For the record, I sometimes managed to get the serial back again. However the issue is not as consistent as it was described in comment 2. Moreover, the times I got in the buggy state were more by chance. Each time I tried to guess the steps I made, I couldn't reproduce.

The logs didn't help in narrowing down the root cause. I will try to dig down the issue and file a new bug.
Status: RESOLVED → VERIFIED
Flags: needinfo?(jlorenzo)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: