Closed Bug 872238 Opened 11 years ago Closed 11 years ago

[B2G][Leo][Bluetooth File Transfer] Leo device is unable to receive files over bluetooth.

Categories

(Core :: DOM: Device Interfaces, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla24
blocking-b2g leo+
Tracking Status
b2g18 --- fixed
b2g18-v1.0.0 --- wontfix
b2g18-v1.0.1 --- wontfix

People

(Reporter: jzimbrick, Assigned: echou)

References

()

Details

(Keywords: regression, smoketest, Whiteboard: [fixed-in-birch], inarirun2)

Attachments

(1 file)

Description:
 The Leo device is unable to receive files over bluetooth.

Prerequisite: Have an SD card with at least one photo on it available to send over bluetooth.

Repro Steps:
1. Update Leo device to build 20130514070207.
2. Pair the Leo with another Leo device.
3. Open gallery app on one and select a picture.
4. Select the option to share via bluetooth.
5. Accept the confirmation to share and observe that the receiving device will display the messages "File could not be received" and "Bluetooth file transfer failed." And the sending device will display "File could not be sent" as well as "Bluetooth file transfer failed." The file is not received.

Actual:
 Leo device does not receive a file via bluetooth transfer.

Expected:
 Leo device does receive a file via bluetooth transfer.

Environmental  Variables:
Gecko: http://hg.mozilla.org/releases/mozilla-b2g18/rev/58e5ff2fcfce
Gaia: 9841cfc141e3f849aba780592e02a482b17eb570

Notes:
Repro frequency: 100% on four Leo devices.
Q Analysts Test Team Priority: Pri 1

The Leo device is able to send files to other devices, we successfully sent a picture from a Leo to an Unagai without issue, but sending anything back to the Leo would not work.
I can reproduce this. It is caused by bug 858416, which modified BluetoothOppManager.cpp. Function CreateFile() in BluetoothOppManager.cpp returns false because mOutputStream is null even after NS_NewLocalFileOutputStream(getter_AddRefs(mOutputStream), f).

I'm working on this.
Assignee: nobody → echou
blocking-b2g: --- → leo?
After bug 858416 landed, users couldn't receive files via bluetooth. It's because 

  NS_NewLocalFileOutputStream(getter_AddRefs(mOutputStream), f);

would fail. It returns NS_ERROR_FILE_NOT_DIRECTORY, and mOutputStream would be nullptr.

The root cause is that, at the end of DeviceStorageFile::CreateUnique(), we have to update dsf->mPath since 

  dsf->mFile->CreateUnique(aFileType, aFileAttributes)

may change the leaf name. However,

  dsf->AppendRelativePath(leafName)

does not update dsf->mPath. Instead, it appends leaf name to dsf->mFile->mPath, which is already the right file path.
Attachment #749697 - Flags: review?(dhylands)
Since it is
Depends on: 858416
Nominate this as leo+ since this is caused by bug 858416 and bug 858416 is leo+.
Component: Gaia::Bluetooth File Transfer → DOM: Device Interfaces
Product: Boot2Gecko → Core
Target Milestone: --- → mozilla23
Comment on attachment 749697 [details] [diff] [review]
patch 1: v1: After CreateUnique(), append file leaf name to dsf.mPath, not dsf.mFile.mPath

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

Thanks for finding this.
Attachment #749697 - Flags: review?(dhylands) → review+
This blocks 858416, since 858416 isn't really fixed until this bug is also fixed. I would use depends on for features (feature A can't be implemented until feature B is implemented).
Blocks: 858416
No longer depends on: 858416
birch:  https://hg.mozilla.org/projects/birch/rev/9f64c074db0a
Whiteboard: [fixed-in-birch]
https://hg.mozilla.org/mozilla-central/rev/9f64c074db0a
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: mozilla23 → mozilla24
Hi Joe,

We need the patch in b2g18, or users would not be able to receive files from other devices via Bluetooth. Please assist with marking this as leo+.

Thank you,

Eric
this issue also occurs on inari devices updated to v1-train build
- able to send files via BT, unable to receive

Build info:
Gecko  http://hg.mozilla.org/releases/mozilla-b2g18/rev/4b5fe47ad76c
Gaia   08074c417f9e095168f38a449dabe0e2325b7353
Build  2013-05-16-07-02-06
Version 18.0
QA Contact: wachen
Hi, 

I would like this to promote to v1train so that:
 1. I can verify bug 817972 and bug 832878
    (receive continuous files and receive certain types of file)
 2. Bluetooth would have at least basic functionality
    (Basic bt functionality: send and receive file)
 3. More tests could be done before v1train release
    (The faster this can be in v1train, the more we can test before release)
 4. Gaia-ui-tests automation on bluetooth can be continue.
    (There is a plan on using gaia-ui-tests to receive/send file automatically

I can't receive files on unagi in pvt v1train build.
blocking-b2g: leo? → ---
status-b2g18: --- → ?
Keywords: checkin-needed
blocking-b2g: --- → leo?
Attachment #749697 - Flags: approval-mozilla-b2g18?
K, setting checkin flags on bugs that don't have approval isn't going to get your patch uplifted any faster. When it gets approval, it'll be uplifted.
Keywords: checkin-needed
Whiteboard: [fixed-in-birch] → [fixed-in-birch], inarirun2
Receiving files via Bluetooth is totally broken on b2g18 without this patch. Although I know that we are still waiting for leo-triage, I really want to emphasize again that we should make this land on b2g18 asap.
I went ahead and marked this as leo+ since bug 858416 (which introduced the bug) was leo+
blocking-b2g: leo? → leo+
(In reply to Dave Hylands [:dhylands] from comment #14)
> I went ahead and marked this as leo+ since bug 858416 (which introduced the
> bug) was leo+

Thanks, Dave.
Attachment #749697 - Flags: approval-mozilla-b2g18?
issue still repro on inari v1.1.0 moz ril - device does not receive a file via Bluetooth transfer

Environmental  Variables:
Inari Build ID: 20130523070206
Kernel Date: Feb 21
Gecko: http://hg.mozilla.org/releases/mozilla-b2g18/rev/2f8bf6531f39
Gaia: 805ae3df8a50609bf89a659687e473c96b683cd2
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Please file a new bug for the issue you hit.
Status: REOPENED → RESOLVED
Closed: 11 years ago11 years ago
Resolution: --- → FIXED
Unable to verify the status of this issue due to bug https://bugzilla.mozilla.org/show_bug.cgi?id=874615 blocking access to the SD card.

We are unable to send a file to see if the issue is still occurring.

Attempted to check on a Leo device running the latest build from the commercial 1.1 branch:

Build ID: 20130630070207
Gaia: 4de4354e3a99f151a834743c7b03a041ac8db12f
Gecko: 4785b1353fd7
Flags: in-moztrap?
Flags: in-moztrap? → in-moztrap+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: