neetly / figma-agent-linux

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

Service enabled but inactive because of and error 'AddrInUse' #61

Closed jimblue closed 1 year ago

jimblue commented 1 year ago

Hi,

Figma-agent doesn't worked after installation and reboot so I've run:

systemctl --user status figma-agent.service

Which returns:

× figma-agent.service - Figma Agent for Linux
     Loaded: loaded (/home/jim/.local/share/systemd/user/figma-agent.service; enabled; vendor preset: enabled)
     Active: failed (Result: exit-code) since Tue 2023-02-21 17:19:04 CET; 42s ago
TriggeredBy: ● figma-agent.socket
    Process: 703608 ExecStart=/home/jim/.local/share/figma-agent/figma-agent (code=exited, status=1/FAILURE)
   Main PID: 703608 (code=exited, status=1/FAILURE)
        CPU: 3ms

Feb 21 17:19:04 MP-P153 systemd[1523]: Starting Figma Agent for Linux...
Feb 21 17:19:04 MP-P153 systemd[1523]: Started Figma Agent for Linux.
Feb 21 17:19:04 MP-P153 figma-agent[703608]: Error: Os { code: 98, kind: AddrInUse, message: "Address already in use" }
Feb 21 17:19:04 MP-P153 systemd[1523]: figma-agent.service: Main process exited, code=exited, status=1/FAILURE
Feb 21 17:19:04 MP-P153 systemd[1523]: figma-agent.service: Failed with result 'exit-code'.

Apparently the service is enabled but not active because of and error 'AddrInUse'.

Thank you for your help :)

latin-1 commented 1 year ago

Have you previously installed figma-linux-font-helper? If that's the case, could you please stop that service and try again?

latin-1 commented 1 year ago

Additional, could you please run this command to see which program uses the port 18412?

sudo lsof -iTCP:18412
jimblue commented 1 year ago

Have you previously installed figma-linux-font-helper? If that's the case, could you please stop that service and try again?

Yes, but already stopped and completely removed.

jimblue commented 1 year ago

Additional, could you please run this command to see which program uses the port 18412?

sudo lsof -iTCP:18412

It does not output anything, so I've check again the Figma agent status with:

systemctl --user status figma-agent.service

This time I go a completely different error:

❯ systemctl --user status figma-agent.service
× figma-agent.service - Figma Agent for Linux
     Loaded: loaded (/home/jim/.local/share/systemd/user/figma-agent.service; disabled; vendor preset: enabled)
     Active: failed (Result: exit-code) since Wed 2023-02-22 14:39:55 CET; 2min 16s ago
TriggeredBy: × figma-agent.socket
    Process: 248071 ExecStart=/home/jim/.local/share/figma-agent/figma-agent (code=exited, status=1/FAILURE)
   Main PID: 248071 (code=exited, status=1/FAILURE)
        CPU: 4ms

Feb 22 14:39:55 MP-P153 systemd[1476]: Starting Figma Agent for Linux...
Feb 22 14:39:55 MP-P153 systemd[1476]: Started Figma Agent for Linux.
Feb 22 14:39:55 MP-P153 figma-agent[248071]: Error: Os { code: 98, kind: AddrInUse, message: "Address already in use" }
Feb 22 14:39:55 MP-P153 systemd[1476]: figma-agent.service: Main process exited, code=exited, status=1/FAILURE
Feb 22 14:39:55 MP-P153 systemd[1476]: figma-agent.service: Failed with result 'exit-code'.
Feb 22 14:39:55 MP-P153 systemd[1476]: figma-agent.service: Start request repeated too quickly.
Feb 22 14:39:55 MP-P153 systemd[1476]: figma-agent.service: Failed with result 'exit-code'.
Feb 22 14:39:55 MP-P153 systemd[1476]: Failed to start Figma Agent for Linux.
latin-1 commented 1 year ago

It's weird. I have no idea. Have you attempted to restart the service manually?

systemctl --user restart figma-agent.service

What if you start the program manually?

~/.local/share/figma-agent/figma-agent

Can you run a Python server on the same port?

python -m http.server 18412

Additionally, does this command have any output?

sudo lsof -nP | grep 18412
jimblue commented 1 year ago

Hey @latin-1, I have no idea why, but just systemctl --user restart figma-agent.service did it ! To be sure, I'll monitor that in the next few days to see if the problem come back. If everything is fine I'll close this issue end of the week. Thank you for your help 🙏🏼

jimblue commented 1 year ago

The Figma agent is still perfectly running so I'm closing this issue ! Thank you for the amazing work 👍🏼