OpenAsar/arrpc

Issues with arrpc instillation on arch (hyprland)

Closed this issue · 4 comments

Hi,

I'm encountering several issues with the arrpc package on Arch. I've tried various commands to diagnose and resolve the issues, but haven't been successful. Here's what I've done and the output I received:

  1. Attempting to check version and run arrpc results in errors:
arrpc --version
Pkg: Error reading from file.
arrpc
Pkg: Error reading from file.
  1. Searching for service files across the system shows multiple instances but using them leads to further issues:
sudo find / -name "*.service" | grep arrpc
/media/tickbase/hdd/cache/yay/arrpc-git/arrpc.service
/media/tickbase/hdd/cache/yay/arrpc/arrpc.service
/usr/lib/systemd/user/arrpc.service
/home/autismo/.config/systemd/user/default.target.wants/arrpc.service
/home/autismo/.cache/yay/arrpc/arrpc.service
  1. Trying to enable and check the status of arrpc.service:
sudo systemctl daemon-reload
sudo systemctl enable --now arrpc.service
Failed to enable unit: Unit file arrpc.service does not exist.
sudo systemctl status arrpc.service
Unit arrpc.service could not be found.
  1. Dependency check using ldd:
ldd $(which arrpc)
	linux-vdso.so.1 (0x00007fff28393000)
	libdl.so.2 => /usr/lib/libdl.so.2 (0x00007099ff05b000)
	libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00007099fec00000)
	libm.so.6 => /usr/lib/libm.so.6 (0x00007099fef6f000)
	libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x00007099fef4a000)
	libpthread.so.0 => /usr/lib/libpthread.so.0 (0x00007099fef45000)
	libc.so.6 => /usr/lib/libc.so.6 (0x00007099fea1e000)
	/lib64/ld-linux-x86-64.so.2 => /usr/lib64/ld-linux-x86-64.so.2 (0x00007099ff098000)

I have tried both the arrpc and arrpc-git package from aur and both seems to be broken.

I'm having the same exact issue on Arch too. Hope this gets fixed soon. Have you found a way to fix this on your own by any chance?

Cloning the github project and running it from there seems to work just fine but the aur package as of now is fully broken until dev decides to fix it. For now here is a solution to run arrpc on your pc and on startup.

Step 1: Install pm2 and start arRPC

cd arrpc
npm install pm2
./node_modules/.bin/pm2 start src

Step 2: Create a systemd service file

sudo nano /etc/systemd/system/arrpc.service
[Unit]
Description=arRPC Service
After=network.target

[Service]
ExecStart=/usr/bin/node /path/to/arrpc/src
Restart=always
User=<your-user-name>
Group=<your-group-name>
Environment=PATH=/usr/bin:/usr/local/bin
Environment=NODE_ENV=production
WorkingDirectory=/path/to/arrpc

[Install]
WantedBy=multi-user.target

Then run the following commands:

sudo systemctl daemon-reload
sudo systemctl enable arrpc
sudo systemctl start arrpc
sudo systemctl status arrpc

If you encounter an error, run pm2 logs --no-daemon and check the log for errors. If you see ER_UNSUPPORTED_DIR_IMPORT, edit package.json and add "type": "commonjs" under "main": "src/index.js".

The AUR package is not official and makes big changes which are unsupported.

Cloning the github project and running it from there seems to work just fine but the aur package as of now is fully broken until dev decides to fix it. For now here is a solution to run arrpc on your pc and on startup.

Step 1: Install pm2 and start arRPC

cd arrpc
npm install pm2
./node_modules/.bin/pm2 start src

Step 2: Create a systemd service file

sudo nano /etc/systemd/system/arrpc.service
[Unit]
Description=arRPC Service
After=network.target

[Service]
ExecStart=/usr/bin/node /path/to/arrpc/src
Restart=always
User=<your-user-name>
Group=<your-group-name>
Environment=PATH=/usr/bin:/usr/local/bin
Environment=NODE_ENV=production
WorkingDirectory=/path/to/arrpc

[Install]
WantedBy=multi-user.target

Then run the following commands:

sudo systemctl daemon-reload
sudo systemctl enable arrpc
sudo systemctl start arrpc
sudo systemctl status arrpc

If you encounter an error, run pm2 logs --no-daemon and check the log for errors. If you see ER_UNSUPPORTED_DIR_IMPORT, edit package.json and add "type": "commonjs" under "main": "src/index.js".

getting this on my end, any advice?

[yseult@Galatine-II ~]$ sudo systemctl status arrpc
× arrpc.service - arRPC Service
     Loaded: loaded (/etc/systemd/system/arrpc.service; enabled; preset: disabled)
     Active: failed (Result: exit-code) since Fri 2024-05-17 13:18:09 CDT; 6s ago
   Duration: 22ms
    Process: 15644 ExecStart=/usr/bin/node /home/yseult/Applications/Discord arRPC/arrpc/src/ (code=exited, status=1/FAILURE)
   Main PID: 15644 (code=exited, status=1/FAILURE)
        CPU: 22ms

May 17 13:18:09 Galatine-II systemd[1]: arrpc.service: Scheduled restart job, restart counter is at 5.
May 17 13:18:09 Galatine-II systemd[1]: arrpc.service: Start request repeated too quickly.
May 17 13:18:09 Galatine-II systemd[1]: arrpc.service: Failed with result 'exit-code'.
May 17 13:18:09 Galatine-II systemd[1]: Failed to start arRPC Service.

Edit: Ah space in the filepath was the culprit, ignore me!