Mhdi-kr / wireguard-insights

Wireguard administration HTTP API and web based panel
14 stars 5 forks source link

Client just keep reloading Clients Section #23

Open afzl-wtu opened 1 year ago

afzl-wtu commented 1 year ago

Finall I managed to run the server with sudo command as: sudo env PATH="$PATH" pm2 start deployment/pm2/prod.config.js and by running only server: sudo env PATH="$PATH" pnpm server:start Error: ping.probe: there was an error while executing the ping program. . Check the path or permissions... at ChildProcess.<anonymous> (/home/ubuntu/@Apps/wireguard-insights/node_modules/.pnpm/ping@0.4.2/node_modules/ping/lib/ping-promise.js:61:19) at Object.onceWrapper (node:events:627:26) at ChildProcess.emit (node:events:512:28) at ChildProcess.emit (node:domain:489:12) at Process.ChildProcess._handle.onexit (node:internal/child_process:291:12) at onErrorNT (node:internal/child_process:483:16) at processTicksAndRejections (node:internal/process/task_queues:82:21) TypeError: Cannot destructure property 'hash' of 'jwt.decode(...)' as it is null. at auth (/home/ubuntu/@Apps/wireguard-insights/packages/server/src/index.ts:48:23) at Layer.handle [as handle_request] (/home/ubuntu/@Apps/wireguard-insights/node_modules/.pnpm/express@4.18.2/node_modules/express/lib/router/layer.js:95:5) at trim_prefix (/home/ubuntu/@Apps/wireguard-insights/node_modules/.pnpm/express@4.18.2/node_modules/express/lib/router/index.js:328:13) at /home/ubuntu/@Apps/wireguard-insights/node_modules/.pnpm/express@4.18.2/node_modules/express/lib/router/index.js:286:9 at Function.process_params (/home/ubuntu/@Apps/wireguard-insights/node_modules/.pnpm/express@4.18.2/node_modules/express/lib/router/index.js:346:12) at next (/home/ubuntu/@Apps/wireguard-insights/node_modules/.pnpm/express@4.18.2/node_modules/express/lib/router/index.js:280:10) at Function.handle (/home/ubuntu/@Apps/wireguard-insights/node_modules/.pnpm/express@4.18.2/node_modules/express/lib/router/index.js:175:3) at router (/home/ubuntu/@Apps/wireguard-insights/node_modules/.pnpm/express@4.18.2/node_modules/express/lib/router/index.js:47:12) at Layer.handle [as handle_request] (/home/ubuntu/@Apps/wireguard-insights/node_modules/.pnpm/express@4.18.2/node_modules/express/lib/router/layer.js:95:5) at trim_prefix (/home/ubuntu/@Apps/wireguard-insights/node_modules/.pnpm/express@4.18.2/node_modules/express/lib/router/index.js:328:13) TypeError: Cannot destructure property 'hash' of 'jwt.decode(...)' as it is null. at auth (/home/ubuntu/@Apps/wireguard-insights/packages/server/src/index.ts:48:23) at Layer.handle [as handle_request] (/home/ubuntu/@Apps/wireguard-insights/node_modules/.pnpm/express@4.18.2/node_modules/express/lib/router/layer.js:95:5) at trim_prefix (/home/ubuntu/@Apps/wireguard-insights/node_modules/.pnpm/express@4.18.2/node_modules/express/lib/router/index.js:328:13) at /home/ubuntu/@Apps/wireguard-insights/node_modules/.pnpm/express@4.18.2/node_modules/express/lib/router/index.js:286:9 at Function.process_params (/home/ubuntu/@Apps/wireguard-insights/node_modules/.pnpm/express@4.18.2/node_modules/express/lib/router/index.js:346:12) at next (/home/ubuntu/@Apps/wireguard-insights/node_modules/.pnpm/express@4.18.2/node_modules/express/lib/router/index.js:280:10 Because without sudo command server is unable to access /etc/wireguard directory and then failed to start. Now it is started on port 5000 and client on port 4173. But after loging in client and I keep seeing this: Even CLient is not added to wg0.conf in ETC/WIreguard directory. Video

Mhdi-kr commented 1 year ago

Thank you for opening this issue. What environment are you using this web application? please specify OS, platform and versions.

The server uses interval pings to find out if peers are online or offline. In the logs you've sent me your system has failed to make ping requests, your machine either doesn't support ICMP or specific access rules was set in the past that prevents the server to access the correct binaries.

I tested the application on a fresh install of ubuntu and had no problems on it.

afzl-wtu commented 1 year ago

Thank you for opening this issue. What environment are you using this web application? please specify OS, platform and versions.

The server uses interval pings to find out if peers are online or offline. In the logs you've sent me your system has failed to make ping requests, your machine either doesn't support ICMP or specific access rules was set in the past that prevents the server to access the correct binaries.

I tested the application on a fresh install of ubuntu and had no problems on it.

I am running this application on Ubuntu 22.04 fresh installed two times. Using latest Node version throigh nvm. Installed pm2 and pnpm using npm install -g. It is Oracle Cloud Virtual machine using arm64 processor. There are two errors in above log:

  1. ping
  2. TypeError: Cannot destructure property 'hash' of 'jwt.decode(...)' as it is null. at auth But I am able to login through admin and password admin.
priteshuae commented 1 year ago

i have same issue just realoaing clients