Closed Bug 927335 Opened 11 years ago Closed 6 years ago

[B2G][Helix][OTA][ChenHoulai]After the system update is successful, the app update do not effect.

Categories

(Firefox OS Graveyard :: General, defect, P2)

defect

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: lecky.wanglei, Unassigned)

Details

Attachments

(1 file)

11.40 KB, text/plain
Details
User Agent: Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; .NET4.0E; aff-kingsoft-ciba)

Steps to reproduce:

【Detail Description*】:
   [B2G][Helix][OTA][ChenHoulai]After the system update is successful, the  app update do not effect.
【Repro Steps*】:
    1、Enter into the settings, click 'check now' to get update info.
    2、If there is both system update info and app update info, select both of them and download.
    3、When the download is complete, click the 'Install Now' button to install the system update. 
    4、After the handset reboot and the sysytem update is successful, enter into the settings, click 'check now' to get update info.
【Expect Result*】:
    4、There is no update info.	
【Real Result*】:
    4、There is still app update info, the previous app update do not effective. You need to download it again.
【Test Count*】:5
【Found Count*】:5
【Gaia commit ID*】: f601fe6e5edb7d5016c07abfad8f069af7354f7b
【Gecko commit ID*】: 60d9e982e07e8d09e9d0e52bad6433c302c17f32
【Log*】:NA
【Network environment】:
【Resume operation】:
【Carrier】:
Priority: -- → P2
Severity: normal → critical
blocking-b2g: --- → hd?
Priority: P2 → P1
Flags: needinfo?(wchang)
Kaizhen,

Can you check this? is this how it is expected to behave at the moment?

Concern is the app download traffic will occur twice, but again these apps may be relatively small in size.
Flags: needinfo?(wchang) → needinfo?(kli)
Wayne, I think it seems as a duplicate issue of bug 912840.
Flags: needinfo?(kli)
Thanks Kaizhen,

If that's the case, can you follow up here? That bug should have been fixed and landed a month ago so this bug should not exist.
Flags: needinfo?(kli)
Lecky, There is patch in bug 912840. Can you apply the patch and try again?
Flags: needinfo?(kli) → needinfo?(lecky.wanglei)
(In reply to Kai-Zhen Li from comment #4)
> Lecky, There is patch in bug 912840. Can you apply the patch and try again?

hi Kai-Zhen:
The version I repoduce the issue has already apply this patch.
But the issue still exists.
It seems that thet are no a same issue.
Thanks.
Flags: needinfo?(lecky.wanglei)
Flags: needinfo?(kli)
(In reply to lecky from comment #5)
> hi Kai-Zhen:
> The version I repoduce the issue has already apply this patch.
> But the issue still exists.
> It seems that thet are no a same issue.
> Thanks.

Can you check logcat if there is WRONG_APP_STORE_ID error during app update?
If there is error during app update, the update will not be finished.
The update for this app will be notified again when check for update.
Flags: needinfo?(kli)
hi Kai-Zhen:
I trace into the case, there is no WRONG_APP_STORE_ID error during update.
I did an exact test when I choose a system update and a calculator app update. The result is as follows.
  1、Before I download the update files, I back up the /data/local/webapps/calculator directory. The version in the update.webapp file is 1.4
  2、Then I choose the system update and calculator app update and begin to download them.
  3、When the download is finish, the system update tip you to install it, I click 'later' button.
  4、Then I pull the  /data/local/webapps/calculator directory out from the handset again. The directory is different from the one I backup. And the version in the update.webapp file become 1.5
  5、Then I choose the update info in the state bar, and install the system update.  The handset begin to reboot and install the system update.
  6、When the system update is finish and the handset reboots, I pull the  /data/local/webapps/calculator directory out from the handset again. The directory change again. It become the same as the directory I first back up. And the version in the update.webapp file become 1.4

  

Do you hava some suggestion?   Thanks.
Flags: needinfo?(kli)
Can you check if the system update package include calculator?
If the system update include calculator 1.4, it will overwrite 1.5 during install system update.
Flags: needinfo?(kli)
(In reply to Kai-Zhen Li from comment #8)
> Can you check if the system update package include calculator?
> If the system update include calculator 1.4, it will overwrite 1.5 during
> install system update.

hi Kai-Zhen:
There is no calculator info in the system update package.
What else do I should to check?
Flags: needinfo?(kli)
Priority: P1 → P2
blocking-b2g: hd? → ---
OTA mechanism is very critical to keep customers updated and offer them the new features of FxOS platform. IMHO we should pay attention to all the improvements that we can add in this mechanism and include them in backlog prioratization and roadmap.
I would like to nominate this improvement for 1.3.
blocking-b2g: --- → 1.3?
(In reply to lecky from comment #9)
> hi Kai-Zhen:
> There is no calculator info in the system update package.
> What else do I should to check?

Lecky, Can  you attach the recovery log under /cache ? I'd like to make use if something is wrong as Comment 8.
Flags: needinfo?(kli)
Attached file log
Lecky, from the log I can see there are a lot webapps is updated and camera is also included.
---
applying patch to /system/b2g/webapps/camera.gaiamobile.org/application.zip
target 225972 bytes; free space 323244032 bytes; retry 1; enough 1
---

So I think the cause will be what I told in Comment 8. 

When webapps and FOTA is done in the same time, 
- webapps will be updated first and then reboot into recovery to finish FOTA update.
- if the FOTA update includes webapps which is older, the existing updated one will be replaced with the one from FOTA update.
hi, Kai-Zhen:
But it seems that in the log file that is no update info of calculator app mentioned in Comment 8?
Flags: needinfo?(kli)
This case is really strange to me. 

Can you do the apps update and system update separately?
- Do apps update and check its version.
- Do system update and check apps version and system version.

Don't select to update both of them at the same time.

I think this can help us to make sure if this error is because of doing system update and apps update at the same time.
Flags: needinfo?(kli)
Hi, Kai-Zhen Li:
  I am sorry to reply so lately.
  I try to test the cases for a few times, and find that:
  1、When I only do the apps update and reboot, it goes well and calculator version change from 1.4 to 1.5
  2、When I only do the system update, the calculator  has no changes. The version is still 1.4, and the application.zip file on the dir also has no changes. It indicates that the system update do not containes calculator app.
  3、When i do the system upate after the apps update, the calculator will revert to 1.4
  So it is surely that the system update effects the apps update.
  
  I also find that the calculator app file is both under the /data/local/webapps and /system/b2g/webapps.
  When I do the apps update, the file under the /data/local/webapps will change, and the file under the /system/b2g/webapps will not change. I guess when I do the system update later, the file under the /system/b2g/webapps will replace the file under /data/local/webapps.
   Can you kindly help to confirm this?  Thanks!
Flags: needinfo?(kli)
To verify OTA, I think user build should be used.
When user build is used, webapps will be under /system/b2g and not under /data/local.
After a user build is flashed to device from eng build, remember to erase /data or flash it with a empty img.
Flags: needinfo?(kli)
(In reply to Kai-Zhen Li from comment #17)
> To verify OTA, I think user build should be used.
> When user build is used, webapps will be under /system/b2g and not under
> /data/local.
> After a user build is flashed to device from eng build, remember to erase
> /data or flash it with a empty img.

Thanks. The version I used is already user.
But i do not erase the /data partion.
The reson is likely here.
I will try again and tell you the answer.
hi, Kai-Zhen Li:
  I tried a few times.
  Before I flash a user version, I clean the data partion by the command 'rm -r *' under the data
directory. But after the user version is flashed, the apps under the /data/local/webapps still exists.
  Do I do some thing wrong or it is a normal phenomenon?
  Can you give me some suggestion? 
  Thanks!
Flags: needinfo?(kli)
After you flash to a user build, can you use "adb shell ls /data/local/webapps" to check if any app are under this dir?
Suppose, no Apps should be there at the beginning. 

BTW, the method of how to check if the system update includes the calculator 1.4 is not right. I think update.zip could be under /mnt/sdcard/updates/fota or /data/local/updates/fota. You can pull the update.zip to PC and unzip it to check if calculator is in it.
Flags: needinfo?(kli)
Hi, Kai-Zhen:
  After I flash to a user build, there are still apps under the /data/local/webapps dir.
  And before I flash the user build, I have clean the /data partion by the command 'rm -r *' under the data dir.
  I do not know why. 
  If I clean the the /data partion by the command 'rm -r *' again at this time, the handset can not reboot normally.

  And about the method of check the update.zip under /mnt/sdcard/updates/fota or /data/local/updates/fota, I have already tried before. I pull the  update.zip to pc and unzip it and find that there is no calculator in it.
  What other reasons could there be?
This isn't happening for 1.3 at this point, as this is not committed. Clearing nom.
blocking-b2g: 1.3? → ---
Hi, Kai-Zhen:
   I trace into the issue, and find that the 'installPreinstalledApp' function in the 'Webapps.jsm' file will do the copy from /system/app/webapps dir to the /data/local/webapps dir. It hints that a 3rd app file both in the /system/app/webapps dir and the /data/local/webapps dir is a normal phenomenon. The copy will do after you flash the version.
   I have tried serveral times, and the result is as above.
   Can you kindly help to put a 3rd app under the gaia\external-apps dir and compile the version to confirm it?    
   Thanks.
Flags: needinfo?(kli)
(In reply to lecky from comment #23)
> Hi, Kai-Zhen:
>    I trace into the issue, and find that the 'installPreinstalledApp'
> function in the 'Webapps.jsm' file will do the copy from /system/app/webapps
> dir to the /data/local/webapps dir. It hints that a 3rd app file both in the
> /system/app/webapps dir and the /data/local/webapps dir is a normal
> phenomenon. The copy will do after you flash the version.
>    I have tried serveral times, and the result is as above.
>    Can you kindly help to put a 3rd app under the gaia\external-apps dir and
> compile the version to confirm it?    
>    Thanks.

Yes, this is expected. We copy 3rd party apps to the /data partition so that they can be updated.
Fabrice, Thanks! I think you already answered the question.
Flags: needinfo?(kli)
Hi Fabrice and Kai-Zhen :
    Thanks!
    Now the problem is that after the app update is successful, the /data/local/webapps dir changes and the /system/b2g/webapps dir does not change.
    And then after a system fota update, the /data/local/webapps will be reverted. I think at this time the copy from /system/b2g/webapps  to /data/local/webapps  is done again. 
    So you need to update the app again after the system fota update.
    Can you kindly give some suggestion to the issue above?
    Thanks!
Flags: needinfo?(kli)
Flags: needinfo?(fabrice)
Lecky, this is the expected behavior. That means that you need to ship an up to date version of 3rd party apps as part as the system update.
Flags: needinfo?(fabrice)
Ok, I will try, thanks!
Flags: needinfo?(kli)
Firefox OS is not being worked on
Status: UNCONFIRMED → RESOLVED
Closed: 6 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: