[snap] Dialog font missing

Bug #1864365 reported by Steven on 2020-02-23
44
This bug affects 9 people
Affects Status Importance Assigned to Milestone
chromium-browser (Ubuntu)
Medium
Olivier Tilloy

Bug Description

$ lsb_release -rb
Description: Ubuntu 19.10
Release: 19.10

$ snap info chromium
name: chromium
summary: Chromium web browser, open-source version of Chrome
publisher: Canonical✓
store-url: https://snapcraft.io/chromium
contact: https://bugs.launchpad.net/ubuntu/+source/chromium-browser/+bugs?field.tag=snap
license: unset
description: |
  An open-source browser project that aims to build a safer, faster, and more stable way for all
  Internet users to experience the web.
commands:
  - chromium.chromedriver
  - chromium
snap-id: XKEcBqPM06H1Z7zGOdG5fbICuf8NWK5R
tracking: latest/stable
refresh-date: 3 days ago, at 01:56 CET
channels:
  stable: 80.0.3987.116 2020-02-19 (1036) 160MB -
  candidate: 80.0.3987.116 2020-02-19 (1036) 160MB -
  beta: 81.0.4044.17 2020-02-17 (1028) 161MB -
  edge: 81.0.4044.17 2020-02-14 (1028) 161MB -
installed: 80.0.3987.116 (1036) 160MB -

Basic Ubuntu 19.10 installation using "factory default" font settings.

Expected :
When opening any file dialog (to open or upload a file, for example) from Chromium snap application, the file dialog renders normally.

What happened instead:
When opening any file dialog (to open or upload a file, for example) from Chromium snap application, all characters in the dialog box are empty squares (see attached screenshot).

Steven (svanpoeck) wrote :
description: updated
Paul White (paulw2u) on 2020-02-29
summary: - Dialog font missing
+ [snap] Dialog font missing
tags: added: snap
Olivier Tilloy (osomon) wrote :

What's your locale?

Can you run chromium in a terminal with the following command, reproduce the problem, save the output to a file and share it here?

    chromium --enable-logging=stderr

Thanks!

Changed in chromium-browser (Ubuntu):
status: New → Incomplete
Download full text (9.7 KiB)

Hi Olivier,

Thanks for looking into this, much appreciated.

Here's the output of the locale command:

> $ locale
> LANG=en_US.UTF-8
> LANGUAGE=en
> LC_CTYPE="en_US.UTF-8"
> LC_NUMERIC=fr_FR.UTF-8
> LC_TIME=fr_FR.UTF-8
> LC_COLLATE="en_US.UTF-8"
> LC_MONETARY=fr_FR.UTF-8
> LC_MESSAGES="en_US.UTF-8"
> LC_PAPER=fr_FR.UTF-8
> LC_NAME=fr_FR.UTF-8
> LC_ADDRESS=fr_FR.UTF-8
> LC_TELEPHONE=fr_FR.UTF-8
> LC_MEASUREMENT=fr_FR.UTF-8
> LC_IDENTIFICATION=fr_FR.UTF-8
> LC_ALL=
The computer is operated in US english with FR regional settings.

Here's the output of the command you gave me :

> $ chromium --enable-logging=stderr
> Gtk-Message: 17:08:26.449: Failed to load module "canberra-gtk-module"
> Gtk-Message: 17:08:26.450: Failed to load module "canberra-gtk-module"
> [810:810:0306/170827.138080:ERROR:sandbox_linux.cc(374)]
> InitializeSandbox() called with multiple threads in process gpu-process.
> [853:1:0306/170828.283307:ERROR:child_process_sandbox_support_impl_linux.cc(79)]
> FontService unique font name matching request did not receive a response.
> [853:1:0306/170828.283625:ERROR:child_process_sandbox_support_impl_linux.cc(79)]
> FontService unique font name matching request did not receive a response.
> [661:661:0306/170829.374429:INFO:CONSOLE(1127)] "Application Cache API
> use is deprecated and will be removed in M82, around April 2020. See
> https://www.chromestatus.com/features/6192449487634432 for more
> details.", source:
> https://docs.google.com/static/doclist/client/js/924573575-frame_bin.js
> (1127)
> [661:661:0306/170829.595400:INFO:CONSOLE(0)] "A cookie associated with
> a cross-site resource at http://google.com/ was set without the
> `SameSite` attribute. A future release of Chrome will only deliver
> cookies with cross-site requests if they are set with `SameSite=None`
> and `Secure`. You can review cookies in developer tools under
> Application>Storage>Cookies and see more details at
> https://www.chromestatus.com/feature/5088147346030592 and
> https://www.chromestatus.com/feature/5633521622188032.", source:
> chrome-extension://ghbmnnjooekpmoecnnnilnnbdlolhkhi/_generated_background_page.html
> (0)
> [661:661:0306/170829.595473:INFO:CONSOLE(0)] "A cookie associated with
> a cross-site resource at https://google.com/ was set without the
> `SameSite` attribute. A future release of Chrome will only deliver
> cookies with cross-site requests if they are set with `SameSite=None`
> and `Secure`. You can review cookies in developer tools under
> Application>Storage>Cookies and see more details at
> https://www.chromestatus.com/feature/5088147346030592 and
> https://www.chromestatus.com/feature/5633521622188032.", source:
> chrome-extension://ghbmnnjooekpmoecnnnilnnbdlolhkhi/_generated_background_page.html
> (0)
> [661:661:0306/170829.709280:INFO:CONSOLE(0)] "A cookie associated with
> a cross-site resource at https://docs.google.com/ was set without the
> `SameSite` attribute. A future release of Chrome will only deliver
> cookies with cross-site requests if they are set with `SameSite=None`
> and `Secure`. You can review cookies in developer tools under
> Application>Storage>Cookies and see more details ...

Read more...

Steven (svanpoeck) on 2020-03-08
Changed in chromium-browser (Ubuntu):
status: Incomplete → New
Olivier Tilloy (osomon) wrote :

Nothing really suspicious in there (the Gtk message about mapping a dialog without a transient parent can be safely ignored). Can you close chromium, execute the following command in a terminal, run it again and see whether that fixes the problem?

    rm -rf ~/snap/chromium/common/.cache

Steven (svanpoeck) wrote :

Hi Olivier,

Emptying the snap cache fixed my issue. I'll definitely keep that in mind if I stumble upon any other issue with a snap software!

Many thanks,
Steven

Olivier Tilloy (osomon) wrote :

Thanks for the feedback Steven. I'm glad the problem is gone.
I wish we'd gone to the bottom of it, if the issue is ever reported again I'll look into it further.

Changed in chromium-browser (Ubuntu):
status: New → Invalid
Steven (svanpoeck) wrote :

Hi Olivier,

At your disposal to provide you with any additional information that might help you find the origin of the issue.

It's a but strange that emptying the cache did the trick as I experienced the issue even after removing (with --purge flag) and re-installing the snap...

If the issue arises again, I'll reopen this bug if that's ok with you.

Thanks,
Steven

Olivier Tilloy (osomon) wrote :

Yes, please re-open this bug if the issue crops up again. Thanks!

Steven (svanpoeck) wrote :

Hi,

I can systematically reproduce the issue now: I empty the cache, start Chromium, close Chromium, start Chromium again and the issue appears.

Please let me know how I can gather the necessary information for you, so you can trace back to the origin of this issue.

Thank you,
Steven

Changed in chromium-browser (Ubuntu):
status: Invalid → New
Chris Patterson (cjp256) wrote :

Reproduces for me in the same manner as Steven. I removed my profile, removed cache and config, and still reproduces.

Logging between working run and failed run shows no diff.

$ locale
LANG=en_US.UTF-8
LANGUAGE=
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=

$ chromium --enable-logging=stderr
Gtk-Message: 13:24:59.088: Failed to load module "canberra-gtk-module"
Gtk-Message: 13:24:59.089: Failed to load module "canberra-gtk-module"
GLib-GIO-Message: 13:24:59.097: Using the 'memory' GSettings backend. Your settings will not be saved or shared with other applications.
[28309:28309:0323/132459.160785:ERROR:sandbox_linux.cc(374)] InitializeSandbox() called with multiple threads in process gpu-process.
[28312:28321:0323/132459.422856:WARNING:spdy_session.cc(3304)] Received HEADERS for invalid stream 3
[28174:28174:0323/132459.462323:ERROR:CONSOLE(1)] "Refused to execute inline event handler because it violates the following Content Security Policy directive: "script-src 'strict-dynamic' 'sha256-1+GSDjMMklBjZY0QiWq+tGupCvajw4Xbn46ect2mZgM=' 'sha256-2mX1M62Fd0u8q0dQY2mRsK5S1NS9jJuQAvyE8tD0dkQ=' 'sha256-6ilhNY6mjQEQ9pQ14zz/I7nMIcfHcceCwbNxtAalnbQ=' 'sha256-HqdPsO6hNmT/mfSeGdcX3eEGrZVva7AKD2Z2+1ujCZ8=' 'sha256-5ArfzK+D442gOOu18DQ8eY13vaOV24n4bfqmSi17OoI=' 'sha256-IEF9PjeyU0vsr61C8cm3JQOerOYWdBsaGddCSPp6tZs=' 'sha256-RIDhH5uF+ciLoS6AP6ZkoxuwQyczkrTetThxXwVwFJI=' 'sha256-fLmgOLhnyIaxgfQuiOVP+mhFRdHP2zDXlKpsRJWBbr4='". Either the 'unsafe-inline' keyword, a hash ('sha256-...'), or a nonce ('nonce-...') is required to enable inline execution.
", source: chrome-search://local-ntp/local-ntp.html (1)
[28333:1:0323/132459.611915:ERROR:child_process_sandbox_support_impl_linux.cc(79)] FontService unique font name matching request did not receive a response.
[28333:1:0323/132459.612368:ERROR:child_process_sandbox_support_impl_linux.cc(79)] FontService unique font name matching request did not receive a response.
Gtk-Message: 13:25:00.348: GtkDialog mapped without a transient parent. This is discouraged.
[28174:28316:0323/132500.805810:ERROR:udev_watcher.cc(96)] Failed to begin udev enumeration.
[28174:28174:0323/132502.787189:WARNING:pref_notifier_impl.cc(40)] Pref observer for media_router.cast_allow_all_ips found at shutdown.
[28174:28174:0323/132502.787211:WARNING:pref_notifier_impl.cc(40)] Pref observer for browser.relaunch_notification_period found at shutdown.

Chris Patterson (cjp256) wrote :

I narrowed it down to something happening with a locally installed font in ~/.fonts.

To reproduce:
$ wget https://github.com/adobe-fonts/source-code-pro/blob/release/VAR/SourceCodeVariable-Roman.otf?raw=true -O ~/.fonts/SourceCodeVariable-Roman.otf

$ chromium --enable-logging=stderr
<ctrl+s> to see dialog works
<ctrl+w> to kill browser

$ chromium --enable-logging=stderr
<ctrl+s> to see dialog breaks

Chris Patterson (cjp256) wrote :

FWIW, I'm running 20.04 and it appears to affect other snaps too (e.g. irccloud).

Steven (svanpoeck) wrote :
Download full text (14.8 KiB)

Thanks @cjp256.

I reproduced without having to install the specific font you mention.

** Output for chromium --enable-logging=stderr:
Gtk-Message: 08:36:31.469: Failed to load module "canberra-gtk-module"
Gtk-Message: 08:36:31.480: Failed to load module "canberra-gtk-module"
[22267:22267:0324/083632.558343:ERROR:sandbox_linux.cc(374)] InitializeSandbox() called with multiple threads in process gpu-process.
[22267:22267:0324/083633.033316:ERROR:gl_surface_presentation_helper.cc(259)] GetVSyncParametersIfAvailable() failed for 1 times!
[22267:22267:0324/083633.054816:ERROR:gl_surface_presentation_helper.cc(259)] GetVSyncParametersIfAvailable() failed for 2 times!
[22267:22267:0324/083633.057148:ERROR:gl_surface_presentation_helper.cc(259)] GetVSyncParametersIfAvailable() failed for 3 times!
[22267:22267:0324/083633.081677:ERROR:gl_surface_presentation_helper.cc(259)] GetVSyncParametersIfAvailable() failed for 4 times!
[22267:22267:0324/083633.082746:ERROR:gl_surface_presentation_helper.cc(259)] GetVSyncParametersIfAvailable() failed for 5 times!
[22267:22267:0324/083633.106709:ERROR:gl_surface_presentation_helper.cc(259)] GetVSyncParametersIfAvailable() failed for 6 times!
[22267:22267:0324/083633.108653:ERROR:gl_surface_presentation_helper.cc(259)] GetVSyncParametersIfAvailable() failed for 7 times!
[22267:22267:0324/083633.133981:ERROR:gl_surface_presentation_helper.cc(259)] GetVSyncParametersIfAvailable() failed for 8 times!
[22267:22267:0324/083633.135463:ERROR:gl_surface_presentation_helper.cc(259)] GetVSyncParametersIfAvailable() failed for 9 times!
[22267:22267:0324/083633.139346:ERROR:gl_surface_presentation_helper.cc(259)] GetVSyncParametersIfAvailable() failed for 10 times!
[22267:22267:0324/083633.162658:ERROR:gl_surface_presentation_helper.cc(259)] GetVSyncParametersIfAvailable() failed for 11 times!
[22267:22267:0324/083633.361920:ERROR:gl_surface_presentation_helper.cc(259)] GetVSyncParametersIfAvailable() failed for 12 times!
[22267:22267:0324/083633.386580:ERROR:gl_surface_presentation_helper.cc(259)] GetVSyncParametersIfAvailable() failed for 13 times!
[22267:22267:0324/083633.432391:ERROR:gl_surface_presentation_helper.cc(259)] GetVSyncParametersIfAvailable() failed for 14 times!
[22267:22267:0324/083633.772968:ERROR:gl_surface_presentation_helper.cc(259)] GetVSyncParametersIfAvailable() failed for 15 times!
[22267:22267:0324/083633.793151:ERROR:gl_surface_presentation_helper.cc(259)] GetVSyncParametersIfAvailable() failed for 16 times!
[22267:22267:0324/083633.874544:ERROR:gl_surface_presentation_helper.cc(259)] GetVSyncParametersIfAvailable() failed for 17 times!
[22267:22267:0324/083633.904848:ERROR:gl_surface_presentation_helper.cc(259)] GetVSyncParametersIfAvailable() failed for 18 times!
[22267:22267:0324/083633.983218:ERROR:gl_surface_presentation_helper.cc(259)] GetVSyncParametersIfAvailable() failed for 19 times!
[22307:1:0324/083634.019150:ERROR:child_process_sandbox_support_impl_linux.cc(79)] FontService unique font name matching request did not receive a response.
[22307:1:0324/083634.019616:ERROR:child_process_sandbox_support_impl_linux.cc(79)] FontService unique font name matching request did not receive a resp...

Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in chromium-browser (Ubuntu):
status: New → Confirmed
Olivier Tilloy (osomon) wrote :

Thanks for the investigation Chris, I can confirm the problem by following instructions in comment #11.

Olivier Tilloy (osomon) wrote :

And removing the custom font in ~/.fonts appears to resolve the problem.

Olivier Tilloy (osomon) wrote :

I straced the chromium snap and I'm not seeing anything obviously problematic when opening font files in ~/.fonts/. No related apparmor denials either.

Changed in chromium-browser (Ubuntu):
importance: Undecided → Medium
Steven (svanpoeck) wrote :

The problem is most likely elsewhere nevertheless, because I don't even have a ~/.fonts directory:

$ cd $HOME/.fonts
bash: cd: /home/steven/.fonts: No such file or directory

Happy to provide any information that can help you, please let me know.

Torsten Bronger (bronger) wrote :

Removing ~/snap/chromium/common/.cache/fontconfig was enough for me. It was not necessary to remove the whole .cache directory.

I start Chromium with a script which always removes that directory first. But I still observe the broken dialog boxes from time to time.

Steven (svanpoeck) wrote :

Any news on this?

The upgrade to Ubuntu 20.04 did not solve the issue for me. I did not uninstall/reinstall the snap though.

I have the same issue with Chromium 83.0.4103.106 (Official Build) snap (64-bit).
I'm using Kubuntu 20.04 minimal installation.

Chromium:
83.0.4103.106 (Official Build) snap (64-bit)

Revision:
ce7134bb3d95141cd18f1e65772a4247f282d950-refs/branch-heads/4103@{#694}

OS:
Linux

JavaScript:
V8 8.3.110.13

Flash:
(Disabled)

User Agent:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.106 Safari/537.36

Command Line:
/snap/chromium/1193/usr/lib/chromium-browser/chrome --no-default-browser-check --no-first-run --password-store=basic --user-agent=Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.106 Safari/537.36 --flag-switches-begin --flag-switches-end --disable-webrtc-apm-in-audio-service

Olivier Tilloy (osomon) wrote :

This bug has also been reported upstream: https://bugs.chromium.org/p/chromium/issues/detail?id=1098379.

It was brought to my attention that chromium ships its own copy of fontconfig, it could be that this affects the way it writes to the cache.

I'll test building the snap with use_bundled_fontconfig=false, let's see if the problem goes away.

Changed in chromium-browser (Ubuntu):
assignee: nobody → Olivier Tilloy (osomon)
Olivier Tilloy (osomon) wrote :
Changed in chromium-browser (Ubuntu):
status: Confirmed → In Progress
Olivier Tilloy (osomon) wrote :

A snap with the tentative fix is now available in the candidate channel (amd64 only, revision 1221).

Everyone affected by the bug, could you please refresh to that revision ("snap refresh chromium --candidate") and run it for some time, reporting here whether the problem went away? Thanks in advance!

Steven (svanpoeck) wrote :

Hi Olivier,

Thank you for following up on this.

I've removed the snap ("snap remove --purge chromium") and reinstalled from candidate channel ("snap install chromium --candidate") and so far the problem has not occurred again.

I will be reporting back here after having run it for a few days.

Olivier:

I am running revision 1213 on Kubuntu 20.04. Removing ~/snap/chromium/common/.cache fixed this issue for me, and it has not returned after multiple restarts nor after I installed the font as described in comment #11.

Before I removed the .cache directory, my file dialogs did look very much like the screenshot Steven posted in comment #1, with rectangles instead of letters. But now that the letters are back, I notice that many of the icons are garbled, which is different from Steven's screenshot. So for sure at least the icon part is a different issue, and I will look to see if anyone else has posted it, or else I'll post it as a new bug.

I am now assuming that my font problem was a different issue as well, so I'm going to stick with the revision I have, unless it would help you for me to try revision 1221 too, in which case please let me know. :-)

Olivier Tilloy (osomon) wrote :

Thanks for the feedback Chris. The garbled icons problem is a different one indeed, tracked by bug #1867402.

Steven (svanpoeck) wrote :

Hi Olivier,

The issue has no longer occurred since the update to revision 1228 from the candidate channel.

Olivier Tilloy (osomon) wrote :

Thanks for the feedback Steven.
I'm tentatively marking the bug fixed. Feel free to re-open it if the issue happens again.

Changed in chromium-browser (Ubuntu):
status: In Progress → Fix Released

I recently added nerd-fonts to my system. I placed them in ~/.local/share/fonts directory.

https://github.com/ryanoasis/nerd-fonts

And now I have this bug.

I removed that directory and copied all those fonts to ~/.fonts and the bug is gone. I'm not sure if some programs need the fonts to be in ~/.local/share/fonts directory.

So today the problem returned.

I'm using the beta channel.

Also the Opera snap has the exact same problem.

So this definitely isn't resolved.

Shiney (martyn-chessels) wrote :

Hi,

My version info from snap list

chromium 84.0.4147.105 1260 latest/stable canonical

Tripped over this issue today as I needed to install windows fonts on a user PC (they get documents with windows ttf fonts) - did so in /usr/share/fonts/win so fonts would be available to others and then chromium failed to load. This answer solved it

https://askubuntu.com/a/1259802

# first close all instances of chromium
sudo rm /var/cache/fontconfig/*
rm ~/.cache/fontconfig/*
sudo fc-cache -r -v
rm -rf ~/snap/chromium/common/.cache/fontconfig/

Bit of a bummer as there are quite a few other machines that need windows fonts and Chromium.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers