neetly / figma-agent-linux

Figma Agent for Linux (a.k.a. Font Helper)
MIT License
157 stars 9 forks source link

The service has stopped working due to Figma website changes. #147

Open shobhit747 opened 9 months ago

shobhit747 commented 9 months ago

Notes from the maintainer:

Figma currently only requests local fonts on Windows and macOS. They also chose a different port for the service. (18412 -> 44950)

Please upgrade to version 0.3.2 for the port changes. However, we still need to override the browser's user-agent. There is nothing I can do about it.

The issue report on the Figma's official forum: https://forum.figma.com/t/requests-to-font-helper-on-linux-stopped-working/61389

Original bug report # Both the figma.agent.socket and figma.agent.service are enabled but fonts are not appearing on figma in any browser. Command : ``` systemctl --user status --now figma-agent.socket ``` output : ``` ● figma-agent.socket - Figma Agent for Linux Loaded: loaded (/home/shobhit/.local/share/systemd/user/figma-agent.socket; enabled; vendor pr> Active: active (running) since Fri 2024-01-12 22:10:01 IST; 9min ago Triggers: ● figma-agent.service Listen: [::]:18412 (Stream) CGroup: /user.slice/user-1000.slice/user@1000.service/app.slice/figma-agent.socket Jan 12 22:10:01 mint-Hp systemd[1448]: Listening on Figma Agent for Linux. ``` Command : ``` systemctl --user status --now figma-agent.service ``` output : ``` ● figma-agent.service - Figma Agent for Linux Loaded: loaded (/home/shobhit/.local/share/systemd/user/figma-agent.service; enabled; vendor p> Active: active (running) since Fri 2024-01-12 22:10:42 IST; 9min ago TriggeredBy: ● figma-agent.socket Main PID: 7487 (figma-agent) Tasks: 3 (limit: 4269) Memory: 7.0M CPU: 215ms CGroup: /user.slice/user-1000.slice/user@1000.service/app.slice/figma-agent.service └─7487 /home/shobhit/.local/share/figma-agent/figma-agent Jan 12 22:10:42 mint-Hp systemd[1448]: Starting Figma Agent for Linux... Jan 12 22:10:42 mint-Hp systemd[1448]: Started Figma Agent for Linux. Jan 12 22:10:42 mint-Hp figma-agent[7487]: [2024-01-12T16:40:42Z INFO actix_server::builder] Start> Jan 12 22:10:42 mint-Hp figma-agent[7487]: [2024-01-12T16:40:42Z INFO actix_server::server] Actix > Jan 12 22:13:58 mint-Hp figma-agent[7487]: [2024-01-12T16:43:58Z INFO actix_web::middleware::logge> ``` Command : ``` systemctl --user is-enabled figma-agent.socket figma-agent.service ``` Output : ``` enabled enabled ```
m4theushw commented 9 months ago

I'm having the same issue. I tested in Chromium and Firefox and in both cases Figma doesn't seem to even be making any request to the agent like in https://github.com/neetly/figma-agent-linux/issues/134#issuecomment-1868670410. I tried the cURL command and it returned a JSON with all fonts I've installed.

m4theushw commented 9 months ago

I discovered that Figma only queries the font agent if it is running on an officially supported operating system, i.e. Windows and macOS. Since there's no official client for Linux, it skips the HTTP request. Changing my browser's user agent to a supported OS was enough to bypass this check. I also had to change the port in figma-agent.socket to 44950. After that my local fonts appeared.

shobhit747 commented 9 months ago

I discovered that Figma only queries the font agent if it is running on an officially supported operating system, i.e. Windows and macOS. Since there's no official client for Linux, it skips the HTTP request. Changing my browser's user agent to a supported OS was enough to bypass this check. I also had to change the port in figma-agent.socket to 44950. After that my local fonts appeared.

Thanks! @m4theushw It worked for me as well.

I changed the browser agent to windows and set port ( ListenStream ) to 44950

nano .config/systemd/user/sockets.target.wants/figma-agent.socket

And it worked after restarting the socket and service.

latin-1 commented 9 months ago

Let me keep this issue open for tracking purposes.

orkben commented 9 months ago

Same issue for me as well. Changing port and user agent string worked. Oddly, changing it to Chrome-Macos as the user agent didn't work, Chrome-Windows as the user agent did though.

blackinitial commented 8 months ago

same problem with user agent browser. change to windows agent its work, the local fonts was appeared.

IgorFerreiraMoraes commented 5 months ago

Figma Agent stopped working after Chrome update

I'm on Fedora and today (May 11th) I updated my Chrome to 124.0.6367.201, after that my local fonts stopped working. It was tested on both the Flatpak and the RPM package. I know the problem is on Chrome's side since it works on Firefox. Reporting here in case someone also finds themselves with the problem.

Here is the user-agent: User Agent

The port: Socket Port

My .fonts folder: Fonts Folder

And the Figma missing fonts warning: Figma Warning