Closed Bug 1014918 Opened 10 years ago Closed 10 years ago

[FTU][Sim Manager][Flame] "No operator" is shown when a SIM has PIN

Categories

(Firefox OS Graveyard :: Gaia::First Time Experience, defect)

ARM
Gonk (Firefox OS)
defect
Not set
minor

Tracking

(blocking-b2g:1.4+, b2g-v1.3 wontfix, b2g-v1.3T wontfix, b2g-v1.4 fixed, b2g-v2.0 verified, b2g-v2.1 verified)

RESOLVED FIXED
2.0 S4 (20june)
blocking-b2g 1.4+
Tracking Status
b2g-v1.3 --- wontfix
b2g-v1.3T --- wontfix
b2g-v1.4 --- fixed
b2g-v2.0 --- verified
b2g-v2.1 --- verified

People

(Reporter: jlorenzo, Assigned: gmarty)

Details

(Whiteboard: [systemsfe])

Attachments

(4 files)

Build Information

Device: Flame
Gaia      ef66efa34ed8a559c8998bde688fae88eb943a7a
Gecko     https://hg.mozilla.org/mozilla-central/rev/b40296602083
BuildID   20140522040230
Version   32.0a1
ro.build.version.incremental=94
ro.build.date=Tue May 20 09:29:20 CST 2014


Steps to Reproduce
Insert a SIM locked by a PIN
Flash the device to get the FTU.
Select language
Enter the PIN of the SIM


Expected Results
The phone number at least should be visible.

Actual Results
"No operator" is shown. See screenshots for details.

Reproduction Frequency: 100%

Additional notes
Going back in the FTU fix the issue.
QA wanted to see if this bug is reproducible on 1.4.
blocking-b2g: --- → 2.0?
Keywords: qawanted
Whiteboard: [FT:System-Platform]
Verified that this bug also occurs in Flame 1.4. Had 2 sim cards, both had sim pin enabled. I then flashed the device and in the FTU, one sim had No Provider shown.

Environmental Variables:
Device: Flame 1.4
BuildID: 20140603000203
Gaia: d108159874cb594e7068a5c8384f05f0a8910bfd
Gecko: 42d80aea48e3
Version: 30.0
Firmware Version: v10G-2
Keywords: qawanted
QA Contact: croesch
this is not a system platform bug
Whiteboard: [FT:System-Platform]
What about 1.3?
Keywords: qawanted
Based on my knowledge when working on DSDS features in Settings app, this may occur sometimes when we try to ask for the information from Gecko too fast before the data is ready. 

After grepping from FTU, I noticed there is no any code to addEventListener on "cardstatechange" to update the UI and that might be the root cause.

Not sure what other FTU developers think about this bug ? any idea ?
Moving the nom to 1.4 as that is highest affected branch. Also NI Ivan to see if this would be a cert issue for 1.4 as dolphin is based on DSDS.
blocking-b2g: 2.0? → 1.4?
Flags: needinfo?(itsay)
Verified that this bug DOES repro on v1.3 Flame. I see the second sim as No Operator.

Environmental Variables:
Device: Flame 1.3
Build ID: 20140520094859
Gaia: a73235d23685e9898f40647cebd83b3fcbfd0117
Gecko: b637b0677e15318dcce703f0358b397e09b018af
Version: 28.0 (1.3) 
Firmware Version: v10G-2
Keywords: qawanted
(In reply to bhavana bajaj [:bajaj] from comment #7)
> Moving the nom to 1.4 as that is highest affected branch. Also NI Ivan to
> see if this would be a cert issue for 1.4 as dolphin is based on DSDS.

Yes, I think we should fix this in v1.4 for Dolphin based on the symptom. No operator can lead the users to think that the SIM card is broken or something wrong on the operator.
Flags: needinfo?(itsay)
This one's a blocker.
blocking-b2g: 1.4? → 1.4+
Hey Tim and Howie, 

Are we sure this isn't related to DSDS? And not system-platform? (trying to figure out who owns this)
Flags: needinfo?(timdream)
Flags: needinfo?(hochang)
Please disregard...received confirmation from mhenretty that this is our bug. Assigning and updating. Thanks!
Flags: needinfo?(timdream)
Flags: needinfo?(hochang)
Hey Guillaume,

Can you please take a look at this?
Assignee: nobody → gmarty
Flags: needinfo?(gmarty)
Whiteboard: [systemsfe]
Guillaume, for information:

Before we set the "No operator" message, we check the sim lock state here [1]. In there you will see the icc.isLocked() function. This function checks the icc.unlocked property, which we should set here [2] immediately after unlocking. We use that property to get around the fact that the actual cardState of the SIM may be slow to update after we unlock it. My first question would be, why is this property (unlocked) false?

1.) https://github.com/mozilla-b2g/gaia/blob/9615503627084371abb7979769fa28ffa20aa536/apps/ftu/js/sim_manager.js#L264

2.) https://github.com/mozilla-b2g/gaia/blob/9615503627084371abb7979769fa28ffa20aa536/apps/ftu/js/sim_manager.js#L651
So the `unlocked` property is properly set to true. The issue is in `MobileOperator.userFacingInfo` [1] where `navigator.mozMobileConnections[0].voice.network` returns null instead of an object containing the network name, regardless of the lock state of the SIM card. I tried on 2 different SIMs.

This info is not made available to JavaScript. Does a function need to be called to populate this object or is it a regression on the platform?

That said, I'm not sure who's the right person to ping.

1. https://github.com/mozilla-b2g/gaia/blob/9615503627084371abb7979769fa28ffa20aa536/shared/js/mobile_operator.js#L59
Flags: needinfo?(gmarty)
Attached file Github PR
This PR displays 'No operator' by default, but listens to the voicechange event to update the operator name when it changes.
This update might take a while depending on the network condition. Sometime the voicechange event is triggered several times with no operators before eventually catching one. Otherwise, the event listener keeps being executed as long as there is no operator name.

Should we implement this mechanism elsewhere such as Settings > Sim manager? If so, maybe we need to move this logic to /shared/js/mobile_operator.js.
Attachment #8439145 - Flags: review?(borja.bugzilla)
Comment on attachment 8439145 [details] [review]
Github PR

Hi!! Every PR should add tests in order to ensure that the new functionality/bug solved is working as expected. Could you add some of them? Ask me to review this again when ready. Thanks!
Attachment #8439145 - Flags: review?(borja.bugzilla)
Comment on attachment 8439145 [details] [review]
Github PR

Same PR with added tests. Can you review it, Borja?
Attachment #8439145 - Flags: review?(borja.bugzilla)
Comment on attachment 8439145 [details] [review]
Github PR

Some small comments/suggestions in the PR. Take a look and let's merge it! Thanks! :)
Attachment #8439145 - Flags: review?(borja.bugzilla) → review+
Target Milestone: --- → 2.0 S4 (20june)
Merged in. Thanks Borja!

https://github.com/mozilla-b2g/gaia/commit/c150746b9b0d541fbeab7800efd0455e2d42da4c
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
The v1.4 PR is here:
https://github.com/mozilla-b2g/gaia/pull/20887

Waiting on Travis & TBPL.
Flags: needinfo?(gmarty)
This issue has been verified successfully on Flame2.0&2.1.

Reproducing rate: 0/5
See attachment: Verify_Flame_PIN.mp4

Flame 2.0 build version:
Gaia-Rev        8d1e868864c8a8f1e037685f0656d1da70d08c06
Gecko-Rev       https://hg.mozilla.org/releases/mozilla-b2g32_v2_0/rev/c756bd8bf3c3
Build-ID        20141127000203
Version         32.0

Flame2.1 build version:
Gaia-Rev        5372b675e018b6aac97d95ff5db8d4bd16addb9b
Gecko-Rev       https://hg.mozilla.org/releases/mozilla-b2g34_v2_1/rev/f34377ae402b
Build-ID        20141127001201
Version         34.0
Attached video Verify_Flame_PIN.MP4
QA Contact: croesch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: