Figma does not send requests to font-helper anymore
Opened this issue · 4 comments
Apparently figma sometimes in the last days stopped sending requests to 127.0.0.01:44950
when the user agent tells it that it's running on linux. I created a post in the forum with more details: https://forum.figma.com/t/requests-to-font-helper-on-linux-stopped-working/61389
I guess a workaround is to overwrite the user agent…
thanks for the information.
I added this Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.3
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:
I get errors:
127.0.0.1 - - [02/Feb/2024 22:00:06] "GET /figma/font-file?file=/home/user/FontBase/Providers/Google/RobotoCondensed-Regular.ttf&freetype_minimum_api_version=20 HTTP/1.1" 500 -
127.0.0.1 - - [02/Feb/2024 22:00:06] "OPTIONS /figma/font-file?file=/home/user/.fonts/SF_Pro_Display_Bold.otf&freetype_minimum_api_version=20 HTTP/1.1" 200 -
127.0.0.1 - - [02/Feb/2024 22:00:06] "OPTIONS /figma/font-file?file=/home/user/FontBase/Providers/Google/Quicksand-Bold.ttf&freetype_minimum_api_version=20 HTTP/1.1" 200 -
127.0.0.1 - - [02/Feb/2024 22:00:06] "OPTIONS /figma/font-file?file=/home/user/.fonts/FiraSans-Black.ttf&freetype_minimum_api_version=20 HTTP/1.1" 200 -
127.0.0.1 - - [02/Feb/2024 22:00:06] "OPTIONS /figma/font-file?file=/home/user/.fonts/FiraSans-Medium.ttf&freetype_minimum_api_version=20 HTTP/1.1" 200 -
127.0.0.1 - - [02/Feb/2024 22:00:06] "OPTIONS /figma/font-file?file=/home/user/FontBase/Providers/Google/NotoSansSC-Regular.otf&freetype_minimum_api_version=20 HTTP/1.1" 200 -
[2024-02-02 22:00:06,994] ERROR in app: Exception on /figma/font-file [GET]
Traceback (most recent call last):
File "/usr/local/lib/python3.10/dist-packages/flask/app.py", line 2190, in wsgi_app
response = self.full_dispatch_request()
File "/usr/local/lib/python3.10/dist-packages/flask/app.py", line 1486, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/usr/lib/python3/dist-packages/flask_cors/extension.py", line 165, in wrapped_function
return cors_after_request(app.make_response(f(*args, **kwargs)))
File "/usr/local/lib/python3.10/dist-packages/flask/app.py", line 1484, in full_dispatch_request
rv = self.dispatch_request()
File "/usr/local/lib/python3.10/dist-packages/flask/app.py", line 1469, in dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
File "/home/user/figma-linux-font-helper/server.py", line 68, in font_file
response = make_response(send_file(
TypeError: send_file() got an unexpected keyword argument 'attachment_filename'
127.0.0.1 - - [02/Feb/2024 22:00:06] "GET /figma/font-file?file=/home/user/.fonts/SF_Pro_Display_Bold.otf&freetype_minimum_api_version=20 HTTP/1.1" 500 -
[2024-02-02 22:00:06,999] ERROR in app: Exception on /figma/font-file [GET]
Traceback (most recent call last):
File "/usr/local/lib/python3.10/dist-packages/flask/app.py", line 2190, in wsgi_app
response = self.full_dispatch_request()
File "/usr/local/lib/python3.10/dist-packages/flask/app.py", line 1486, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/usr/lib/python3/dist-packages/flask_cors/extension.py", line 165, in wrapped_function
return cors_after_request(app.make_response(f(*args, **kwargs)))
File "/usr/local/lib/python3.10/dist-packages/flask/app.py", line 1484, in full_dispatch_request
rv = self.dispatch_request()
File "/usr/local/lib/python3.10/dist-packages/flask/app.py", line 1469, in dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
File "/home/user/figma-linux-font-helper/server.py", line 68, in font_file
response = make_response(send_file(
TypeError: send_file() got an unexpected keyword argument 'attachment_filename'
127.0.0.1 - - [02/Feb/2024 22:00:07] "GET /figma/font-file?file=/home/user/FontBase/Providers/Google/Quicksand-Bold.ttf&freetype_minimum_api_version=20 HTTP/1.1" 500 -
[2024-02-02 22:00:07,007] ERROR in app: Exception on /figma/font-file [GET]
Traceback (most recent call last):
File "/usr/local/lib/python3.10/dist-packages/flask/app.py", line 2190, in wsgi_app
response = self.full_dispatch_request()
File "/usr/local/lib/python3.10/dist-packages/flask/app.py", line 1486, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/usr/lib/python3/dist-packages/flask_cors/extension.py", line 165, in wrapped_function
return cors_after_request(app.make_response(f(*args, **kwargs)))
File "/usr/local/lib/python3.10/dist-packages/flask/app.py", line 1484, in full_dispatch_request
rv = self.dispatch_request()
File "/usr/local/lib/python3.10/dist-packages/flask/app.py", line 1469, in dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
File "/home/user/figma-linux-font-helper/server.py", line 68, in font_file
response = make_response(send_file(
TypeError: send_file() got an unexpected keyword argument 'attachment_filename'
127.0.0.1 - - [02/Feb/2024 22:00:07] "GET /figma/font-file?file=/home/user/.fonts/FiraSans-Black.ttf&freetype_minimum_api_version=20 HTTP/1.1" 500 -
[2024-02-02 22:00:07,023] ERROR in app: Exception on /figma/font-file [GET]
Traceback (most recent call last):
File "/usr/local/lib/python3.10/dist-packages/flask/app.py", line 2190, in wsgi_app
response = self.full_dispatch_request()
File "/usr/local/lib/python3.10/dist-packages/flask/app.py", line 1486, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/usr/lib/python3/dist-packages/flask_cors/extension.py", line 165, in wrapped_function
return cors_after_request(app.make_response(f(*args, **kwargs)))
File "/usr/local/lib/python3.10/dist-packages/flask/app.py", line 1484, in full_dispatch_request
rv = self.dispatch_request()
File "/usr/local/lib/python3.10/dist-packages/flask/app.py", line 1469, in dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
File "/home/user/figma-linux-font-helper/server.py", line 68, in font_file
response = make_response(send_file(
TypeError: send_file() got an unexpected keyword argument 'attachment_filename'
127.0.0.1 - - [02/Feb/2024 22:00:07] "GET /figma/font-file?file=/home/user/.fonts/FiraSans-Medium.ttf&freetype_minimum_api_version=20 HTTP/1.1" 500 -
[2024-02-02 22:00:07,034] ERROR in app: Exception on /figma/font-file [GET]
Traceback (most recent call last):
File "/usr/local/lib/python3.10/dist-packages/flask/app.py", line 2190, in wsgi_app
response = self.full_dispatch_request()
File "/usr/local/lib/python3.10/dist-packages/flask/app.py", line 1486, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/usr/lib/python3/dist-packages/flask_cors/extension.py", line 165, in wrapped_function
return cors_after_request(app.make_response(f(*args, **kwargs)))
File "/usr/local/lib/python3.10/dist-packages/flask/app.py", line 1484, in full_dispatch_request
rv = self.dispatch_request()
File "/usr/local/lib/python3.10/dist-packages/flask/app.py", line 1469, in dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
File "/home/user/figma-linux-font-helper/server.py", line 68, in font_file
response = make_response(send_file(
TypeError: send_file() got an unexpected keyword argument 'attachment_filename'
127.0.0.1 - - [02/Feb/2024 22:00:07] "GET /figma/font-file?file=/home/user/FontBase/Providers/Google/NotoSansSC-Regular.otf&freetype_minimum_api_version=20 HTTP/1.1" 500
For me using google-chrome --user-agent="Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36"
As well as using https://github.com/neetly/figma-agent-linux instead of the this font-helper. I hope this helps and I hope even more that figma gets themselves in order and appreciate their linux users.
I'm using https://github.com/Figma-Linux/figma-linux-font-helper
it works fine (systemd service). But not sure about variable fonts.