Chrome on Android bundle crashes on startup after switching system language to unsupported locale. |
||
Issue descriptionFor more context, see http://b/119248395 (Google only). Chrome on Android, when built as a bundle with language-based splits will crash at startup in the following scenario: 1) Have the device configured to only have "Spanish" as the system locale (i.e. "English" should *not* be in the list). 2) Install the bundle locally. 3) Chrome starts properly and displays its UI in Spanish. 4) Switch the system language to Slovenskso (sk_SK locale), and *remove* Spanish from the list of languages as well. 5) Restart Chrome, it will crash immediately on startup.
,
Nov 16
Candidate CL here: https://chromium-review.googlesource.com/c/chromium/src/+/1340303
,
Nov 19
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/697a88b14abcfec82278dd46c7bf155e210d7cdf commit 697a88b14abcfec82278dd46c7bf155e210d7cdf Author: David 'Digit' Turner <digit@google.com> Date: Mon Nov 19 19:15:41 2018 android: Place English locale pak files into fallback directory. This change ensures that all English locale pak files (i.e. en-US.pak and en-GB.pak) are stored inside an app bundle into a directory named: assets/fallback-locales/ This ensures that said .pak files are always stored in the base module split APK, and thus available on all Chrome installs, after any system locale change. This prevents Chrome from crashing on startup under rare circumstances (see related bug for details). Testing was performed manually because we don't have a good regression test suite that can change the device's system locale programmatically (see http://crbug.com/904360 for this). Following these steps: 1) Set device's language to Spanish 2) Ensure Chrome is not installed, then install the bundle. 3) Start Chrome. It displays its UI in Spanish. 4) Change system language to SlovenĨina, and *remove* Spanish from the list of system languages. 5) Start Chrome. It displays its UI in English (the fallback) instead of crashing. English is chosen because it is the fallback language that the Android framework actually choses when the application doesn't have any resources compatible with the current system language. BUG= 905725 R=agrieve@chromium.org,estevenson@chromium.org,yfriedman@chromium.org,tiborg@chromium.org,tedchoc@chromium.org Change-Id: I2c1f53a805122b6e48fb5105c1d9aa8c6262fa1d Reviewed-on: https://chromium-review.googlesource.com/c/1340303 Reviewed-by: Tibor Goldschwendt <tiborg@chromium.org> Reviewed-by: Eric Stevenson <estevenson@chromium.org> Reviewed-by: agrieve <agrieve@chromium.org> Reviewed-by: Ted Choc <tedchoc@chromium.org> Commit-Queue: David Turner <digit@chromium.org> Cr-Commit-Position: refs/heads/master@{#609385} [modify] https://crrev.com/697a88b14abcfec82278dd46c7bf155e210d7cdf/build/android/gyp/create_app_bundle.py [modify] https://crrev.com/697a88b14abcfec82278dd46c7bf155e210d7cdf/ui/android/java/src/org/chromium/ui/resources/ResourceExtractor.java
,
Nov 22
Manually tested that this now works properly. |
||
►
Sign in to add a comment |
||
Comment 1 by digit@google.com
, Nov 16