New issue
Advanced search Search tips

Issue 877033 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner: ----
Closed: Aug 30
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 3
Type: ----



Sign in to add a comment

Locale PAK files are extracted on each startup

Reported by mlopat...@yandex-team.ru, Aug 23

Issue description

Affected version: 70.0.3531.0. 
I've also tested Chrome 68.0.3440.91 and the issue is here as well, but with slightly different logs.

Steps to reproduce:
1. Build chrome_public_apk
2. Install it on device
3. Start Chromium once, go through first run wizard
4. Kill Chromium process (swipe it off in recents)
5. Start Chromium once again

Expected result:
Locale PAKs aren't extracted during second startup because they are already on disk.

Actual result:
PAKs are extracted again (see second cr_FileUtils line in the log):

<First run>
08-23 13:50:06.545  15041 15154 org.chromium.chrome I cr_ui Using UI locale ru, system locale: ru (Android name: ru)
08-23 13:50:06.551  15041 15146 org.chromium.chrome I cr_tabmodel Starting to fetch tab list for tab_state0
08-23 13:50:06.552  15041 15146 org.chromium.chrome I cr_tabmodel Finished fetching tab list.
08-23 13:50:06.553  15041 15146 org.chromium.chrome I cr_tabmodel Starting to fetch tab list for tab_state_browser_actions
08-23 13:50:06.553  15041 15146 org.chromium.chrome I cr_tabmodel State file does not exist.
08-23 13:50:06.556  15041 15154 org.chromium.chrome I cr_ui Missing asset file: locales#lang_ru/ru.pak
08-23 13:50:06.562  15041 15154 org.chromium.chrome I cr_ui Found asset file: locales/ru.pak
08-23 13:50:06.562  15041 15154 org.chromium.chrome I cr_ui Using app bundle locale directory: locales
08-23 13:50:06.562  15041 15154 org.chromium.chrome I cr_ui UI Language: ru requires .pak files: [ru]
08-23 13:50:06.573  15041 15154 org.chromium.chrome I cr_FileUtils  Writing to /data/user/0/org.chromium.chrome/app_chrome/paks/ru.pak@165669e2a56
08-23 13:50:09.496  15041 15152 org.chromium.chrome I cr_LibraryLoader  Time to load native libraries: 3128 ms (timestamps 7946-1074)

<...Restart skipped...>

08-23 13:50:33.720  15439 15439 org.chromium.chrome I cr_base_multidex  Completed multidex installation.
08-23 13:50:34.012  15439 15478 org.chromium.chrome I cr_ui Using UI locale ru, system locale: ru (Android name: ru)
08-23 13:50:34.013  15439 15478 org.chromium.chrome I cr_ui Missing asset file: locales#lang_ru/ru.pak
08-23 13:50:34.014  15439 15478 org.chromium.chrome I cr_ui Found asset file: locales/ru.pak
08-23 13:50:34.014  15439 15478 org.chromium.chrome I cr_ui Using app bundle locale directory: locales
08-23 13:50:34.014  15439 15478 org.chromium.chrome I cr_ui UI Language: ru requires .pak files: [ru]
08-23 13:50:34.019  15439 15478 org.chromium.chrome I cr_FileUtils  Writing to /data/user/0/org.chromium.chrome/app_chrome/paks/ru.pak@165669e2a56
08-23 13:50:34.019  15439 15470 org.chromium.chrome I cr_tabmodel Starting to fetch tab list for tab_state0
08-23 13:50:34.027  15439 15478 org.chromium.chrome I cr_tabmodel Starting to fetch tab list for tab_state_browser_actions
08-23 13:50:34.041  15439 15470 org.chromium.chrome I cr_tabmodel Finished fetching tab list.
08-23 13:50:34.048  15439 15478 org.chromium.chrome I cr_tabmodel State file does not exist.
08-23 13:50:36.807  15439 15476 org.chromium.chrome I cr_LibraryLoader  Time to load native libraries: 2956 ms (timestamps 5428-8384)
08-23 13:50:36.807  15439 15476 org.chromium.chrome W chromium  [0823/135036.807630:WARNING:trace_startup_config.cc(188)] The trace config file does not exist.

 
I'll submit a patch for this
Project Member

Comment 2 by bugdroid1@chromium.org, Aug 30

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/bee3da7c06f4f3f60cc14bf94f2af351ea332276

commit bee3da7c06f4f3f60cc14bf94f2af351ea332276
Author: Mikhail Lopatkin <mlopatkin@yandex-team.ru>
Date: Thu Aug 30 15:42:34 2018

Fix checking of extracted locale PAKs existence

The detectFilesToExtract was returning a list of paths to assets files.
Such path included a directory within assets (e.g. locales/en-US.pak)
but the code that is checking file existense is expecting just name here
(e.g. en-US.pak). This mismatch caused existense check to always fail.

BUG= 877033 

Change-Id: I93f2e2cdc529ae7f4bf15aac21730853e1ef265e
Reviewed-on: https://chromium-review.googlesource.com/1186465
Reviewed-by: David Turner <digit@chromium.org>
Reviewed-by: Ted Choc <tedchoc@chromium.org>
Commit-Queue: David Turner <digit@chromium.org>
Cr-Commit-Position: refs/heads/master@{#587595}
[modify] https://crrev.com/bee3da7c06f4f3f60cc14bf94f2af351ea332276/ui/android/java/src/org/chromium/ui/resources/ResourceExtractor.java

Status: Fixed (was: Unconfirmed)

Sign in to add a comment