Closed
Bug 1029303
Opened 11 years ago
Closed 11 years ago
[NFC][Bluetooth] NFC file sharing failed sometimes
Categories
(Firefox OS Graveyard :: NFC, defect)
Tracking
(blocking-b2g:2.0+, b2g-v2.0 fixed, b2g-v2.1 fixed)
People
(Reporter: ashiue, Assigned: arthurcc)
References
Details
Attachments
(2 files)
Gaia 7bb5daea0f37d4371e9daa08045d45fef3b30344
Gecko https://hg.mozilla.org/releases/mozilla-aurora/rev/304ea70beed9
BuildID 20140623160203
Version 32.0a2
STR:
1. Turn on "NFC" for 2 phones
2. Make sure 2 phones do not BT paired
3. Turn off "bluetooth" on receiver phone
4. Sender phone send an image via NFC
Expected result:
Receiver phone would get file successfully
Actual result:
2 phones do not pair and file transfer failed
Reporter | ||
Updated•11 years ago
|
blocking-b2g: --- → 2.0?
Reporter | ||
Updated•11 years ago
|
Blocks: b2g-NFC-2.0
Comment 1•11 years ago
|
||
Vance - Do we know if TCL would cert block on this for NFC?
Sandip - Can you make a product call on a blocking decision here?
Flags: needinfo?(vchen)
Flags: needinfo?(skamat)
Comment 2•11 years ago
|
||
are both devices fxos? what does the UX show upon failure?
Flags: needinfo?(skamat) → needinfo?(ashiue)
Reporter | ||
Comment 3•11 years ago
|
||
I tested on both fxos devices, and I tried again on today's build.
Gaia 552ef3e7d00384e4f7ac43d8fab6b91c69cc26c1
Gecko https://hg.mozilla.org/releases/mozilla-aurora/rev/e2b83f618868
BuildID 20140624160200
Version 32.0a2
The problem now is file transfer would fail sometimes no matter BT on or off, I do not find the exact STR currently, but this issue can be reproduced easily.
Flags: needinfo?(ashiue)
Reporter | ||
Updated•11 years ago
|
Summary: [NFC][Bluetooth] NFC file sharing failed when receiver side turn off BT initial and does not paired device with sender side previously → [NFC][Bluetooth] NFC file sharing failed sometimes
Updated•11 years ago
|
Flags: needinfo?(vchen)
Updated•11 years ago
|
blocking-b2g: 2.0? → 2.0+
Comment 4•11 years ago
|
||
I tested with today's aurora (2.0), and I found that if the receiver's bt is off, file can't be sent. I checked the log and found two errors might be related:
E/GeckoConsole( 293): [JavaScript Error: "Unable to create NFCPeer object, Reason: Bad SessionToken {8ffae068-494b-437f-884b-0f84e875be1c}" {file: "jar:file:///system/b2g/omni.ja!/components/nsNfc.js" line: 202}]
E/GeckoConsole( 293): [JavaScript Error: "NS_ERROR_UNEXPECTED: " {file: "app://system.gaiamobile.org/js/nfc_handover_manager.js" line: 218}]
This is the same as the result that I tested on my Flame with the latest gecko/gaia master this Wednesday. Yoshi should be aware of it because I told him about this on that day.
ni? EPM Wesley who is responsible for NFC and hope he could find someone to take a look.
Flags: needinfo?(whuang)
Comment 5•11 years ago
|
||
As it seems not clear what the root cause is, perhaps Yoshi can take a look and clarify from the log where/why the error comes out.
Flags: needinfo?(whuang) → needinfo?(allstars.chh)
(In reply to Eric Chou [:ericchou] [:echou] from comment #4)
> E/GeckoConsole( 293): [JavaScript Error: "Unable to create NFCPeer object,
> Reason: Bad SessionToken {8ffae068-494b-437f-884b-0f84e875be1c}" {file:
> "jar:file:///system/b2g/omni.ja!/components/nsNfc.js" line: 202}]
> E/GeckoConsole( 293): [JavaScript Error: "NS_ERROR_UNEXPECTED: " {file:
> "app://system.gaiamobile.org/js/nfc_handover_manager.js" line: 218}]
This should be normal behavior, I reproduced this once with *rapidly and repeatly* tapping the other Flame, this error means the other phone has been away so the handover
cannot take place.
Also discussed with Alison she didn't re-produce this like way, so I think this should be some problems in BT-side.
Flags: needinfo?(allstars.chh)
Comment 7•11 years ago
|
||
(In reply to Yoshi Huang[:allstars.chh] from comment #6)
> (In reply to Eric Chou [:ericchou] [:echou] from comment #4)
> > E/GeckoConsole( 293): [JavaScript Error: "Unable to create NFCPeer object,
> > Reason: Bad SessionToken {8ffae068-494b-437f-884b-0f84e875be1c}" {file:
> > "jar:file:///system/b2g/omni.ja!/components/nsNfc.js" line: 202}]
> > E/GeckoConsole( 293): [JavaScript Error: "NS_ERROR_UNEXPECTED: " {file:
> > "app://system.gaiamobile.org/js/nfc_handover_manager.js" line: 218}]
>
> This should be normal behavior, I reproduced this once with *rapidly and
> repeatly* tapping the other Flame, this error means the other phone has been
> away so the handover
> cannot take place.
>
> Also discussed with Alison she didn't re-produce this like way, so I think
> this should be some problems in BT-side.
Per offline test and discussion with Yoshi and QA Alison, we found there may be two potential bugs here:
1) as I mentioned in comment 4, sometimes BT is on after NFC handover, however the file transfer doesn't begin, the error log shows. The complete log has been sent to Yoshi.
2) if Settings app has been launched, even if it's not at the foreground, once bluetooth is enabled after NFC handover, adapter.startDiscovery() would be called from the event handler which is written in Settings app. As I mentioned several times in other bugs (), discovery(inquiry) is a heavy procedure and we should only do it if it's truly necessary. At least we shouldn't start discovering while Settings app is not at the front. Talked with Arthur, the peer of Settings app, and he will follow up on this.
Comment 8•11 years ago
|
||
(In reply to Eric Chou [:ericchou] [:echou] from comment #7)
> (In reply to Yoshi Huang[:allstars.chh] from comment #6)
> > (In reply to Eric Chou [:ericchou] [:echou] from comment #4)
> > > E/GeckoConsole( 293): [JavaScript Error: "Unable to create NFCPeer object,
> > > Reason: Bad SessionToken {8ffae068-494b-437f-884b-0f84e875be1c}" {file:
> > > "jar:file:///system/b2g/omni.ja!/components/nsNfc.js" line: 202}]
> > > E/GeckoConsole( 293): [JavaScript Error: "NS_ERROR_UNEXPECTED: " {file:
> > > "app://system.gaiamobile.org/js/nfc_handover_manager.js" line: 218}]
> >
> > This should be normal behavior, I reproduced this once with *rapidly and
> > repeatly* tapping the other Flame, this error means the other phone has been
> > away so the handover
> > cannot take place.
> >
> > Also discussed with Alison she didn't re-produce this like way, so I think
> > this should be some problems in BT-side.
>
> Per offline test and discussion with Yoshi and QA Alison, we found there may
> be two potential bugs here:
>
> 1) as I mentioned in comment 4, sometimes BT is on after NFC handover,
> however the file transfer doesn't begin, the error log shows. The complete
> log has been sent to Yoshi.
>
> 2) if Settings app has been launched, even if it's not at the foreground,
> once bluetooth is enabled after NFC handover, adapter.startDiscovery() would
> be called from the event handler which is written in Settings app. As I
> mentioned several times in other bugs (), discovery(inquiry) is a heavy
Forgot to fill out the bug number: bug 873352, bug 942744
> procedure and we should only do it if it's truly necessary. At least we
> shouldn't start discovering while Settings app is not at the front. Talked
> with Arthur, the peer of Settings app, and he will follow up on this.
(In reply to Eric Chou [:ericchou] [:echou] from comment #4)
> E/GeckoConsole( 293): [JavaScript Error: "Unable to create NFCPeer object,
> Reason: Bad SessionToken {8ffae068-494b-437f-884b-0f84e875be1c}" {file:
> "jar:file:///system/b2g/omni.ja!/components/nsNfc.js" line: 202}]
> E/GeckoConsole( 293): [JavaScript Error: "NS_ERROR_UNEXPECTED: " {file:
> "app://system.gaiamobile.org/js/nfc_handover_manager.js" line: 218}]
>
File Bug 1031993 for this.
Assignee | ||
Comment 10•11 years ago
|
||
Per comment 7, let's not discover bluetooth devices when settings is in background. EJ, could you help review the patch? Thanks.
Attachment #8447823 -
Flags: review?(ejchen)
Assignee | ||
Updated•11 years ago
|
Assignee: nobody → arthur.chen
Comment on attachment 8447823 [details]
link to https://github.com/mozilla-b2g/gaia/pull/21154
r+, thanks Arthur !
Attachment #8447823 -
Flags: review?(ejchen) → review+
Assignee | ||
Comment 12•11 years ago
|
||
Thanks!
master: 50ff5fca6838aebabc7deb733f25cc45c72284bc
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Assignee | ||
Updated•11 years ago
|
status-b2g-v2.0:
--- → affected
status-b2g-v2.1:
--- → fixed
Comment 13•11 years ago
|
||
Target Milestone: --- → 2.0 S5 (4july)
Reporter | ||
Comment 14•11 years ago
|
||
Verify on
Gaia 90605754e9bdbe20f3999522f9e1aec600c422a4
Gecko https://hg.mozilla.org/releases/mozilla-aurora/rev/0bffc7e5d8a2
BuildID 20140702160207
Version 32.0a2
Following scenarios should not discover bluetooth devices:
1. Turn on BT via notification
2. BT on/off and kill settings app, and then share file via NFC
3. BT on/off and let settings BT page running on the background, and then share file via NFC
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•