Closed Bug 985090 Opened 10 years ago Closed 10 years ago

Unable to change the Voicemail number in Settings after a data migration from 1.3 to 1.4

Categories

(Firefox OS Graveyard :: Gaia::Settings, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(blocking-b2g:1.4+, b2g-v1.4 fixed, b2g-v2.0 fixed)

RESOLVED FIXED
1.4 S4 (28mar)
blocking-b2g 1.4+
Tracking Status
b2g-v1.4 --- fixed
b2g-v2.0 --- fixed

People

(Reporter: gerard-majax, Assigned: arthurcc)

References

Details

(Keywords: dataloss, regression)

Attachments

(1 file)

While debugging bug 983459 I noticed that I cannot change the voicemail number in Settings: its value is '+' and it cannot be changed.

STR:
 0. Open Settings, Call Settings, tap on Voicemail
 1. Type the new number (+33695600011 in my case)
 2. Validate

Expected:
 New number changed

Actual:
 Nothing happens, voicemail is still '+'

In logcat, I can see:
E/GeckoConsole( 3000): [JavaScript Error: "TypeError: 0 is read-only" {file: "app://settings.gaiamobile.org/js/call_voicemail_settings.js" line: 36}]

This is 100% reproductibility on master from yesterday, on Nexus S.
blocking-b2g: --- → 1.4?
As for bug 983459, this code has been touched by bug 975918.

Arthur, can you help me there?
Flags: needinfo?(arthur.chen)
Looks like queyring ril.iccInfo.mbdn I don't get an array but rather a string.

Hacking Settings app to force creating an array does the trick:

> diff --git a/apps/settings/js/call_voicemail_settings.js b/apps/settings/js/call_voicemail_settings.js
> index 7740b60..131d152 100644
> --- a/apps/settings/js/call_voicemail_settings.js
> +++ b/apps/settings/js/call_voicemail_settings.js
> @@ -33,6 +33,9 @@
>      var targetIndex = DsdsSettings.getIccCardIndexForCallSettings();
>      Settings.getSettings(function(results) {
>        var numbers = results['ril.iccInfo.mbdn'] || [];
> +      if (typeof numbers === 'string') {
> +        numbers = [ numbers ];
> +      }
>        numbers[targetIndex] = input.value;
>        navigator.mozSettings.createLock().set({
>          'ril.iccInfo.mbdn': number

I fear we have a regression due to DSDS.
Asking QA to check whether this may reproduce on 1.3 also.
Keywords: qawanted
Keywords: dataloss
The issue doesn't reproduce on Buri device 1.4 or 1.3
User is able to change a voicemail number
Keywords: dataloss
Keywords: dataloss
(In reply to sarsenyev from comment #4)
> The issue doesn't reproduce on Buri device 1.4 or 1.3
> User is able to change a voicemail number

You should be able to reproduce at least on 1.4. There is clearly some context in action then. 
Can you make sure you try with a profile from before 1.3 ?

And then update to 1.3 and then 1.4.

On my device there was clearly a string stored in ril.iccInfo.mbdn rather than an array.
(In reply to Alexandre LISSY :gerard-majax from comment #5)
> (In reply to sarsenyev from comment #4)
> > The issue doesn't reproduce on Buri device 1.4 or 1.3
> > User is able to change a voicemail number
> 
> You should be able to reproduce at least on 1.4. There is clearly some
> context in action then. 
> Can you make sure you try with a profile from before 1.3 ?
> 
> And then update to 1.3 and then 1.4.
> 
> On my device there was clearly a string stored in ril.iccInfo.mbdn rather
> than an array.

The problem is that's not really the same bug as filed. The bug as filed indicates that the user is unable to change a voicemail number without any data migration STR included.
(In reply to Jason Smith [:jsmith] from comment #6)
> (In reply to Alexandre LISSY :gerard-majax from comment #5)
> > (In reply to sarsenyev from comment #4)
> > > The issue doesn't reproduce on Buri device 1.4 or 1.3
> > > User is able to change a voicemail number
> > 
> > You should be able to reproduce at least on 1.4. There is clearly some
> > context in action then. 
> > Can you make sure you try with a profile from before 1.3 ?
> > 
> > And then update to 1.3 and then 1.4.
> > 
> > On my device there was clearly a string stored in ril.iccInfo.mbdn rather
> > than an array.
> 
> The problem is that's not really the same bug as filed. The bug as filed
> indicates that the user is unable to change a voicemail number without any
> data migration STR included.

Well, I had no way to know prior to asking QA. All my devices are running 1.4 newer than the DSDS commit. So now at least we know on a fresh build it seems to be okay.
So what do you want checked now? Do you want to see if this reproduces if we do a data migration from 1.3 to 1.4?
(In reply to Jason Smith [:jsmith] from comment #8)
> So what do you want checked now? Do you want to see if this reproduces if we
> do a data migration from 1.3 to 1.4?

Upgrading from anything prior to commit 7c3f9ce222c5fafbd338e7eef777e29d8b5e6f5a would be good, I think. This has been merged on March, 11th.

I'm doing all my updates using MAR packages, if it may help.

Maybe we should wait for Arthur's feedback on this, since it looks not being that reproductible.
I just upgraded my Keon from a build of around march 7th, to yesterday's build, and I'm reproducing the issue also.

This is with a different profile, and a different SIM card.
I'm also noticing the issue on my Peak, and my Desire Z. All with different SIM cards.
Okay - leaving QA Wanted to test this by doing an OTA update from 1.3 --> 1.4 on a Leo device and then executing the STR in comment 0.
(In reply to Jason Smith [:jsmith] from comment #12)
> Okay - leaving QA Wanted to test this by doing an OTA update from 1.3 -->
> 1.4 on a Leo device and then executing the STR in comment 0.

If it confirms the issue (I would be surprised if not, given the number of devices on which I reproduce).

Bug 975918 was not 1.3+, so we don't care I think :)
The issue reproduces on Leo device after OTA from 1.3 to 1.4
The bar shows "+" sign and cannot be updated

1.4 Environmental Variables:
Device: Leo 1.4 MOZ
BuildID: 20140318000203
Gaia: c03a6af9028c4b74a84b5a98085bbb0c07261175
Gecko: 3776f72f1967
Version: 30.0a2
Firmware Version: v1.2-device.cfg
Keywords: qawanted
QA Contact: sarsenyev
Okay - so this is a confirmed data migration bug then.
Summary: Unable to change the Voicemail number in Settings → Unable to change the Voicemail number in Settings after a data migration from 1.3 to 1.4
blocking-b2g: 1.4? → 1.4+
Could you share the STR you used for migration? Did you use make reset-gaia or make install-gaia?
Flags: needinfo?(arthur.chen)
(In reply to Arthur Chen [:arthurcc] from comment #16)
> Could you share the STR you used for migration? Did you use make reset-gaia
> or make install-gaia?

QA tested this via doing an OTA from 1.3 --> 1.4 using a Leo device & then running the STR in comment 0.

Alexandre I think did this differently though.
Assignee: nobody → arthur.chen
Root cause found. https://github.com/mozilla-b2g/gaia/blob/master/apps/system/js/operator_variant/operator_variant.js#L409

We should not set the result back to result[0] as it has already been set to ['', ''].
Writing a patch and adding unit tests for it.
The root cause is as my previous comment suggested. I re-written part of the  settings update logic to make it more readable and easier to test.

Jose, could you help review the patch? Thanks!
Attachment #8394030 - Flags: review?(josea.olivera)
Comment on attachment 8394030 [details]
Link to https://github.com/mozilla-b2g/gaia/pull/17373

LGTM, r=me

Travis is green on the PR, tests pass, I tested this on hamachi on a fresh build and after performing a system update and everything seems to work correctly.

Thanks Arthur!
Attachment #8394030 - Flags: review?(josea.olivera) → review+
Thanks, Jose!

master: 06cfe08cd72f32404f304d34fb902b544bdfeb9e
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: