Closed Bug 1210824 Opened 4 years ago Closed 4 years ago

ADB pull from B2G Installer broken

Categories

(DevTools Graveyard :: WebIDE, defect)

defect
Not set

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: gerard-majax, Assigned: jryans)

References

Details

Attachments

(3 files, 1 obsolete file)

After updating ADB Helper and Gecko to latest nightly of today, B2G Installer addon is unable to pull anything from device:

> Devices._devices["0d38fb1e0c599f53"].pull("/fstab.hammerhead", "/tmp/b2g-installer/hammerhead/blobs/fstab.hammerhead").then(v => { console.debug(v); }, e => { console.debug(e); });
> Object { , 1 de plus… }
> BAD_RESPONSE

> Devices._devices["0d38fb1e0c599f53"].pull("/system/bin/bridgemgrd", "/tmp/b2g-installer/hammerhead/blobs/system/bin/bridgemgrd").then(v => { console.debug(v); }, e => { console.debug(e); });
> Object { , 1 de plus… }
> BAD_RESPONSE

Both can be pulled by hand from CLI.
Attached file debug log
Any help?
Flags: needinfo?(poirot.alex)
Flags: needinfo?(jryans)
https://github.com/mozilla/adbhelper/commit/95cf54f3ca8ef5667655bcb9fcc0451431bfa063#diff-369a5f292b913be569e8eafd45b090baL279
https://github.com/mozilla/adbhelper/commit/95cf54f3ca8ef5667655bcb9fcc0451431bfa063#diff-369a5f292b913be569e8eafd45b090baL279
> _checkResponse: function adb_checkResponse(aPacket, expected) {
...
> return view[0] == expected;

This was called by: (!client.checkResponse(aData, STAT))

Now we have from adb-client.js:
> function checkResponse(aPacket) {
...
> return view[0] == OKAY;

So the second parameter is not even used.
Attached file ADB Helper PR (obsolete) —
That fixes the improper response checking.
Attachment #8668993 - Flags: review?(jryans)
(In reply to Alexandre LISSY :gerard-majax from comment #5)
> Created attachment 8668996 [details]
> New errors after fixing checkResponse()

Added debug:
> ADB Addon Helper: fileData.set(pkgData, 0);
I've got a complete fix, will post my own PR.
Assignee: nobody → jryans
Blocks: 1206746
No longer blocks: 1201392
Status: NEW → ASSIGNED
Flags: needinfo?(poirot.alex)
Flags: needinfo?(jryans)
Attachment #8668993 - Attachment is obsolete: true
Attachment #8669112 - Flags: review?(poirot.alex)
Great! I'll test this locally :).
Comment on attachment 8669112 [details] [review]
Repair pull / push for Gecko 43+

Looks like it fixes the issue on my side too! Thanks!
Attachment #8669112 - Flags: feedback+
Comment on attachment 8669112 [details] [review]
Repair pull / push for Gecko 43+

Good catch, Thanks!
Attachment #8669112 - Flags: review?(poirot.alex) → review+
Merged: https://github.com/mozilla/adbhelper/commit/f662242e08f00995434d752f788d21a1b344d65a

Will start preparing 0.8.2 release.
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
0.8.2 released.  May take up to 24 hours to appear available.
Blocks: b2g-addon
Blocks: 1214761
Product: Firefox → DevTools
Product: DevTools → DevTools Graveyard
You need to log in before you can comment on or make changes to this bug.