Requests to font-helper on linux stopped working

I’m running Figma on linux in the browser with figma-linux-font-helper to enable usage of local fonts — this helper is basically a drop-in replacement for the official Figma font helper with the difference that it also works on linux.

Well, it did until today, when I noticed that my local fonts are not available anymore. When Investigating the issue I found that requests to localhost or 127.0.0.1 (with the purpose of communicating with the font helper) were no longer showing up in the network panel of the browser dev tools. Two days ago, everything was working fine and I didn’t change anything on my system since then. I asked around and for other people it’s basically the same story.

After further experiments I discovered that Figma still send the requests, when I overwrite my User agent to:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36

My suspicion now is that the app is sniffing the user agent and is not sending the requests to localhost, when it detects that it’s running on linux.

I can’t think of a good explaination how this could be a bug and I’m afraid this is intentional. If that’s the case: WTF?

17 Likes

Hey Thomas, unfortunately we can’t help you out with your issue, because this is a third party font helper.

I have the same issue. I use Linux and this is a must. I guess I was wondering when the guys from Figma would deploy code to screw this up :laughing:

This is not an issue with the third party font helper but with the Figma app which doesn’t event send requests to the font helper when it detects it’s running on linux. Like I mentioned when I change my user agent to a non-linux one everything works just fine. Please fix this!

6 Likes

I’ve tried sniffing the UserAgent header but I didn’t get it to work. I’ve checked the logs from the network tab, and it isn’t even calling localhost.

1 Like

You can override the user agent when running chrome by adding a parameter:

chrome --user-agent="Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36"

Or alternatively overwrite it in the dev tools, but I think they’ll need to stay open/enabled in this case.

1 Like

Awesome, thanks!

By the way, I saw your gh issue: Figma does not send requests to font-helper anymore · Issue #15 · tryvin/figma-linux-font-helper · GitHub.

And was able to fix it by changing the HTTP port 44950.

Wasn’t the port before 18412?

When did this changed?

Anyhow, thanks. This was a life saver, gotta go back to work now lol

One small addition, setting the User agent to mac messes with the shortcuts, using the windows one seems to work better:

Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36
2 Likes

We’re in sync. I was just going to say this here :slight_smile:

I created a script to open Figma on the web using brave:

#!/usr/bin/env bash

set -euo pipefail

USER_AGENT="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.3"

brave-browser --user-agent="${USER_AGENT}" https://www.figma.com/files/recent

Thanks for the tip!

1 Like

Relaying a user agent for feature detection is a really poor decision, and lazy engineering. Could it be please be removed?

3 Likes

Thanks.
I added this useragent via User Agent Switcher and Manager
and changed port to 44950 and it works again.

But not as good as before.
Fonts are found but not automatically applied:

And cyrillic symbols are not displayed

Nope, for me it’s still the same…

I removed all my comments.

Apparently Figma already had some fonts I installed locally…

I’m really sorry.

It still isn’t working, the bug still remains.

Don’t worry about it :wink: It has happened to me before

1 Like

I found figma-agent-linux and it fixed my case.

Once opensource Community like penpot become mature… everbody will fu**ck Figma. No support for linux.

2 Likes

Sharing what worked for me. There are a few of different linux agents and here is the only one setup that works for me:

  1. Download chrome
  2. Install GitHub - neetly/figma-agent-linux: Figma Agent for Linux (a.k.a. Font Helper)
  3. Reboot
  4. Open the terminal and paste:
USER_AGENT="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.3"
google-chrome-stable --user-agent="${USER_AGENT}" https://www.figma.com/files/recent

Brave or Firefox won’t load fonts.

2 Likes

Thanks to Figma, it is not working on Linux anymore … So please fix this or I have to switch to Lunacy (wasting time but Figma without fonts sucks)

changing user agent isn’t working anymore :frowning: