Subject: bug#61914: IceCat does not start with en_GB.utf8 locale

From: Timo Wilken <[email-masked]>
Date: Thu, 2 Mar 2023 13:33:20 +0100

I cannot start IceCat with a non-C locale. It opens an almost-blank
window, and I cannot open new tabs or navigate to any URL.

If I run `LANG=C icecat', then it works fine.

I use `guix system' and `guix home', and have IceCat installed in my
`guix home' profile.

I have my operating-system configured with the following locales:

(locale "en_GB.utf8")
(locale-definitions
 (list (locale-definition (name "en_GB.utf8") (source "en_GB"))
       (locale-definition (name "en_US.utf8") (source "en_US"))
       (locale-definition (name "fr_FR.utf8") (source "fr_FR"))))

This is the output when running IceCat in my terminal (without
explicitly setting LANG, so that it retains its value of
"en_GB.utf8"):

$ icecat
ATTENTION: default value of option mesa_glthread overridden by environment.
ATTENTION: default value of option mesa_glthread overridden by environment.
ATTENTION: default value of option mesa_glthread overridden by environment.
JavaScript error: chrome://pocket/content/SaveToPocket.jsm, line 130: NS_ERROR_FAILURE: Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIStringBundle.formatStringFromName]
JavaScript error: chrome://browser/content/tabbrowser.js, line 7004: NS_ERROR_FAILURE: Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIStringBundle.GetStringFromName]
JavaScript error: chrome://browser/content/tabbrowser-tabs.js, line 64: NS_ERROR_UNEXPECTED: Component returned failure code: 0x8000ffff (NS_ERROR_UNEXPECTED) [nsIStringBundle.GetStringFromName]
JavaScript error: resource:///modules/sessionstore/SessionStore.jsm, line 2458: TypeError: browser is undefined
JavaScript error: resource:///modules/UrlbarInput.jsm, line 2641: NS_ERROR_FAILURE: Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIStringBundle.GetStringFromName]
JavaScript error: chrome://browser/content/browser.js, line 8052: TypeError: browser is undefined
JavaScript error: resource:///modules/sessionstore/TabStateFlusher.jsm, line 230: TypeError: browser is undefined
Missing chrome or resource URL: resource://gre/modules/UpdateListener.jsm
Missing chrome or resource URL: resource://gre/modules/UpdateListener.sys.mjs
console.error: "Error during quit-application-granted: [Exception... \"File error: Not found\"  nsresult: \"0x80520012 (NS_ERROR_FILE_NOT_FOUND)\"  location: \"JS frame :: resource:///modules/BrowserGlue.jsm :: _onQuitApplicationGranted/tasks< :: line 1996\"  data: no]"
$ guix shell glibc -- locale
LANG=en_GB.utf8
LC_CTYPE="en_GB.utf8"
LC_NUMERIC="en_GB.utf8"
LC_TIME="en_GB.utf8"
LC_COLLATE="en_GB.utf8"
LC_MONETARY="en_GB.utf8"
LC_MESSAGES="en_GB.utf8"
LC_PAPER="en_GB.utf8"
LC_NAME="en_GB.utf8"
LC_ADDRESS="en_GB.utf8"
LC_TELEPHONE="en_GB.utf8"
LC_MEASUREMENT="en_GB.utf8"
LC_IDENTIFICATION="en_GB.utf8"
LC_ALL=
$ guix shell glibc -- locale -a
C
en_GB.utf8
en_US.utf8
fr_FR.utf8
POSIX
$ guix describe
Generation 2	Mar 02 2023 13:25:29	(current)
  [one non-free channel omitted]
  guix a7763e0
    repository URL: https://git.savannah.gnu.org/git/guix.git
    branch: master
    commit: a7763e067d86908210758aab80d33e4f8b815b1c

GUIX_PACKAGE_PATH="/home/twilken/src/guix-decls"
$ ls -l "$(which icecat)"
lrwxrwxrwx 1 root root 84 Jan  1  1970 /home/twilken/.guix-home/profile/bin/icecat -> /gnu/store/bwcrfgfrri9bpglgb5raih167jaxibkv-icecat-102.8.0-guix0-preview1/bin/icecat