Closed Bug 851995 Opened 11 years ago Closed 11 years ago

[Buri][BT]Can not open received file transfer from other MS/PC

Categories

(Firefox OS Graveyard :: Gaia::Bluetooth, defect, P1)

ARM
Gonk (Firefox OS)
defect

Tracking

(blocking-b2g:leo+, b2g18 fixed)

RESOLVED FIXED
blocking-b2g leo+
Tracking Status
b2g18 --- fixed

People

(Reporter: sync-1, Assigned: iliu)

References

Details

(Whiteboard: [triaged][status: waiting on product input from sandip])

Attachments

(6 files)

+++ This bug was initially created as a clone of Bug #413307 +++
 
 Created an attachment (id=355527)
 picture
 
 DEFECT DESCRIPTION:
 Can not open received file transfer from other MS/PC
 
 REPRODUCING PROCEDURES:
 1.Use other MS/PC send picture/music/video(all media format) to Beetle lite FF
 2.After file transfer finished,try to open failed,pop up message"can not open received file---->KO
 
 EXPECTED BEHAVIOUR:
 For KO,should can open receive file tranfer from other MS/PC
 
 ASSOCIATE SPECIFICATION:
 
 TEST PLAN REFERENCE:
 
 TOOLS AND PLATFORMS USED:
 
 USER IMPACT:
 
 REPRODUCING RATE:
 
 For FT PR, Please list reference mobile's behavior:
 
 Firefox os  v1.0.1
 Mozilla build ID: 20130310070203.
 ++++++++++ end of initial bug #413307 description ++++++++++
 
 
 
 CONTACT INFO (Name,Phone number):
 
 DEFECT DESCRIPTION:
 
 REPRODUCING PROCEDURES:
 
 EXPECTED BEHAVIOUR:
 
 ASSOCIATE SPECIFICATION:
 
 TEST PLAN REFERENCE:
 
 TOOLS AND PLATFORMS USED:
 
 USER IMPACT:
 
 REPRODUCING RATE:
 
 For FT PR, Please list reference mobile's behavior:
blocking-b2g: --- → tef?
Can you please include here the file you are transferring as an attachment?
Flags: needinfo?(sync-1)
Attached image picture file
such as this picture. it will not be opened after transferred, but later,if you go to gallery,you can see it.
in fact,I also tried two other pictures, non of them can be opened. but,seems mp3 file is ok,which can be played in music player when you click the notification.
Flags: needinfo?(sync-1)
I have successfully transferred the image through BT with the latest Gaia/Gecko. Any chance you can re-test with a newer one?

The tips I am using are:

Gecko: d8e8bee
Gaia: 633e14d

When clicking on the notification that tells me the download has been completed, the image is opened, clicking on the back button returns me to the gallery.
I also have successfully transferred the image through BT from my Mac with the build version 20130312230202.

Hi buri,
Does the issue only happen on MS/PC?
Priority: -- → P1
On V1.0.1 is KO, Mozilla is modified for it(at master branch PR 838027). 
 Please merge to v1.0.1 branch.
bug 838027 is about Video transfer via Bluetooth, the attachment you are including is a picture. What is the real bug here?
Flags: needinfo?(sync-1)
triage: partner will retest on newer build. please renom if reproduced
blocking-b2g: tef? → ---
Whiteboard: [triaged]
*.mp4, *.ogg, *.bmp open failed
Flags: needinfo?(sync-1)
Created an attachment (id=373861)
 jpeg
 
 some file also can not open,such as jpeg,png,I have upload on attachmet
Attached image jpeg
Created an attachment (id=373861)
 jpeg
 
 some file also can not open,such as jpeg,png,I have upload on attachmet
Created an attachment (id=373860)
 png
Attached image png
Created an attachment (id=373860)
 png
some file also can not open,such as jpeg,png,I have upload on attachmet
 sometimes can open,sometimes can not open,if can not open,reset phone,then can open.
can not open ogg file on version 120
(In reply to sync-1 from comment #14)
> some file also can not open,such as jpeg,png,I have upload on attachmet
>  sometimes can open,sometimes can not open,if can not open,reset phone,then
> can open.

For v1.0.1, Gallery app support to open these file type as following link.
https://github.com/mozilla-b2g/gaia/blob/v1.0.1/apps/gallery/manifest.webapp#L36
"type": ["image/jpeg", "image/png", "image/gif", "image/bmp"]
(In reply to sync-1 from comment #15)
> can not open ogg file on version 120

For v1.0.1, Music app support to open these file type as following link.
https://github.com/mozilla-b2g/gaia/blob/v1.0.1/apps/music/manifest.webapp#L20
"type": ["audio/mpeg", "audio/ogg", "audio/mp4"]
Hi sync-1,
Could you please help to check the file type before you open it via web-activity?
You may try to dump some log for the variable "fileType".
https://github.com/mozilla-b2g/gaia/blob/v1.0.1/apps/system/js/bluetooth_transfer.js#L462
(In reply to comment #11)
 > Comment from Mozilla:Hi sync-1,
 > Could you please help to check the file type before you open it via
 > web-activity?
 > You may try to dump some log for the variable \"fileType\".
 > https://github.com/mozilla-b2g/gaia/blob/v1.0.1/apps/system/js/bluetooth_transfer.js#L462
 > 
 
 Hi:
   Sometimes It can open success,and the file type is right audio/ogg,but sometimes it open failed,and the file type is application/ogg ,and this dues to the transferInfos
Assignee: nobody → iliu
(In reply to Ian Liu [:ianliu] from comment #18)
> Hi sync-1,
> Could you please help to check the file type before you open it via
> web-activity?
> You may try to dump some log for the variable "fileType".
> https://github.com/mozilla-b2g/gaia/blob/v1.0.1/apps/system/js/
> bluetooth_transfer.js#L462

Hi:
 Now the .ogg only be used for Ogg Vorbis audio files,may be we need to switch "application/ogg" to "audio/ogg" in gecko or change the logic in gaia.what do you think about this issue?
On our latest version,
AU_LINUX_GECKO_ICS_STRAWBERRY_V1.01.00.01.019.092
Firefox os  v1.0.1
Mozilla build ID:20130430070201

OGG File still has problem. 100% reproduable ,due to this reason ,I mark tef? again.
All other types are OK.

QA wanted
blocking-b2g: --- → tef?
Because of supported Bluetooth file transfer for Gallery/Music in v1.0.1. Bluetooth app is only considerate of image and audio filetype in the version. I would like to fix the issue in V1-train. Nominate leo+..
leo? as per comment 22
blocking-b2g: tef? → leo?
needinfo - product

See comment #9 -- do we need to extend the BT transfer to more gracefully handle these filetypes?
Flags: needinfo?(ffos-product)
For the issue, we could handle these filetype via MimeMapper.(https://github.com/mozilla-b2g/gaia/blob/master/shared/js/mime_mapper.js)
In general case, Bluetooth app could receive any kinds of filetype which is sent by other device. The scenario is much like opening the attached file in Email app.
blocking-b2g: leo? → tef?
Attached file HCIDUMP
Hi:
  From the attached log, you can find the type is "application/ogg" during data link layer,maybe this is the point of this issue,I hope that the log can help you.
If we need to support *.ogg files with mimetype "video/ogg"("audio/ogg is already supported in music app"), we need bug 869859 fixed. Sounds like "application/ogg" should be also supported but that's not an often seen mimetype, it will be better to handle "application/ogg" with the logic of MimeMapper in shared/js.
Depends on: 869859
(In reply to qingluo.wang from comment #26)
> Created attachment 746768 [details]
> HCIDUMP
> 
> Hi:
>   From the attached log, you can find the type is "application/ogg" during
> data link layer,maybe this is the point of this issue,I hope that the log
> can help you.

It's really helpful. We cannot identify that the file is belong to audio or video via filetype "application/ogg". And we cannot really open the file by Music/Video app before choosing an app to open. In general case, Video app is able to handle both of them. I would like to add filetype "application/ogg" corresponding to video in MimeMapper utility.

Change the flag tef? remissly. Recovery it.
blocking-b2g: tef? → leo?
Sandip, this could use your input.
Flags: needinfo?(skamat)
Comment on attachment 747259 [details]
Pointer to Github pull request: https://github.com/mozilla-b2g/gaia/pull/9634

* Use MimeMapper to identify filetype in Bluetooth App.
* Remove original MimeMapper from Bluetooth App.

Dominic,
Could you please help to review my pr? Thanks.
Attachment #747259 - Flags: review?(dkuo)
(In reply to Ian Liu [:ianliu] from comment #28)
> (In reply to qingluo.wang from comment #26)
> > Created attachment 746768 [details]
> > HCIDUMP
> > 
> > Hi:
> >   From the attached log, you can find the type is "application/ogg" during
> > data link layer,maybe this is the point of this issue,I hope that the log
> > can help you.
> 
> It's really helpful. We cannot identify that the file is belong to audio or
> video via filetype "application/ogg". And we cannot really open the file by
> Music/Video app before choosing an app to open. In general case, Video app
> is able to handle both of them. I would like to add filetype
> "application/ogg" corresponding to video in MimeMapper utility.
> 
> Change the flag tef? remissly. Recovery it.

I have a question about Bluetooth discovery,current, gecko will dispatch several events when one device is found,but Gaia just handle the first one,later update will be ignored,this will cause some issues(see bug869858),Is this a special design or other?thanks.
Flags: needinfo?(ffos-product)
Whiteboard: [triaged] → [triaged][status: waiting on product input from sandip]
For Comment 9: *.mp4, *.ogg, *.bmp formats need to be supported. 

CC: Marco: Have their been any changes to container handling recently for these types?
Flags: needinfo?(skamat)
Triage - leo+ per comment 33
blocking-b2g: leo? → leo+
Comment on attachment 747259 [details]
Pointer to Github pull request: https://github.com/mozilla-b2g/gaia/pull/9634

Ian,

This patch looks good, the usage of MimeMapper is the same as I implemented in bug 852477 for email so should be no problem, I am gald the bluetooth transfer app use MimeMapper as well because that's why I put it in shared/js.

And please wait for the patch of bug 869859 to land first or this patch will not be albe to solve the issue on opening *.ogg files.

r+ on commit: b6349e0c931d19612e9b6b522925c213d9ec37c1
Attachment #747259 - Flags: review?(dkuo) → review+
Thanks for Dominic's reviewing effort. And the MimeMapper is useful for opening a receiving file in Bluetooth app. If all of Gaia app use the it, the problem of opening file issue is able to slowly converge.

Since the pr is merged, we can close the issue now.
https://github.com/mozilla-b2g/gaia/commit/77bef8b2a65e4cc2d9aa2973282209562a8b6c48

note: Please make sure bug 869859 is landed in v1-train. Then, the issue could be fixed and landed in v1-train.
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
I was not able to uplift this bug to v1-train.  If this bug has dependencies which are not marked in this bug, please comment on this bug.  If this bug depends on patches that aren't approved for v1-train, we need to re-evaluate the approval.  Otherwise, if this is just a merge conflict, you might be able to resolve it with:

  git checkout v1-train
  git cherry-pick -x -m1 77bef8b2a65e4cc2d9aa2973282209562a8b6c48
  <RESOLVE MERGE CONFLICTS>
  git commit
Hi KongMei:
   According to https://bugzilla.mozilla.org/show_bug.cgi?id=851995 comment#22 and comment#23,the patch will not be approved for v1.0.1,so please help to check it,thanks.
(In reply to John Ford [:jhford] -- If you expect a reply from me, use needsinfo? instead of CC from comment #37)
> I was not able to uplift this bug to v1-train.  If this bug has dependencies
> which are not marked in this bug, please comment on this bug.  If this bug
> depends on patches that aren't approved for v1-train, we need to re-evaluate
> the approval.  Otherwise, if this is just a merge conflict, you might be
> able to resolve it with:
> 
>   git checkout v1-train
>   git cherry-pick -x -m1 77bef8b2a65e4cc2d9aa2973282209562a8b6c48
>   <RESOLVE MERGE CONFLICTS>
>   git commit

John,
Thanks for your guidance. I have uplifed via a99ae3223fce2bdb31f2ae66da16f2f7f665a1cc.
$ git branch --contains a99ae3223fce2bdb31f2ae66da16f2f7f665a1cc
  v1-train
Flags: in-moztrap?
Dear Ian,
I saw your patch on v1.1, but I can't open the *.ogg file transfered by bluetooth. Could you have a look at this? Thank you very much.
Flags: needinfo?(iliu)
Dear Dale,
I found that the problem of can't open *.ogg file received by BT belongs to video app, so I needinfo you. here is some logs:

E/GeckoConsole(  639): Content JS LOG at app://video.gaiamobile.org/js/view.js:250 in showPlayer: video: player.src = blob:256239b6-7801-45d0-9787-220868eb52bb
E/GeckoConsole(  639): [JavaScript Warning: "Media resource blob:256239b6-7801-45d0-9787-220868eb52bb could not be decoded." {file: "app://video.gaiamobile.org/view.html" line: 0}]

And I will attach my ogg file for you to reproduce. Thanks a lot! I'll be right here waiting for your response :).
Flags: needinfo?(iliu) → needinfo?(dale)
Attached file ogg file for reproduce
buri.blff@gmail.com, I think attachment 775554 [details] is a corrupted ogg video, are you able to play it on other platfroms like Ubuntu or Windows?
Yeh seeing it corrupted here too, clearing needinfo
Flags: needinfo?(dale)
Dear Dominic,
I can play that ogg file in my Android phone. What do you think?
Flags: needinfo?(dkuo)
xiaokang, I tried to play it on Windows, Ubuntu and OSX with VLC, but none of them is able to play attachment 775554 [details]. But then I truned to use Chrome to test and it works, so looks like Android/Chrome are the only platfrom that can play it, maybe it's because they used some unique codec from google, but this is only my guessing, I am not sure about it.

And if attachment 775554 [details] is not a mainstream ogg, we can file another bug to discuss about it then fix it, I believe what this issue was trying to resolve is already fixed, because I am able open/play the received files except attachment 775554 [details].
Flags: needinfo?(dkuo)
Flags: needinfo?(jhammink)
Dear Ian,
I test on

AU_LINUX_GECKO_ICS_STRAWBERRY.01.01.00.019.179
Firefox os  v1.1
Mozilla build ID:20130730070228 

after receiving video file from other phone, click the
"received file" item on notification bar, the video plays normally, but when
you press home key in the duration of the video playing, you will find a message box shows "can not open received file". And the same message showed if the file is image or music.

I think we should raise another pr for this. What do you think??
Flags: needinfo?(iliu)
It's already fixed by bug 893171.
Flags: needinfo?(iliu)
Clearing the NI flag on this and adding a moztrap testcase instead.
Flags: needinfo?(jhammink)
Flags: in-moztrap?(jhammink)
Flags: in-moztrap?
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: