Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Services page crashes on Buster and Stretch #14

Closed
MichaIng opened this issue Nov 6, 2021 · 4 comments
Closed

[Bug] Services page crashes on Buster and Stretch #14

MichaIng opened this issue Nov 6, 2021 · 4 comments

Comments

@MichaIng
Copy link
Collaborator

MichaIng commented Nov 6, 2021

Nov 06 16:36:19 VM-Buster dietpi-dashboard[2597]: thread 'tokio-runtime-worker' panicked at 'called `Option::unwrap()` on a `None` value', src/systemdata.rs:333:54
Nov 06 16:36:19 VM-Buster dietpi-dashboard[2597]: note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Works fine on Bullseye, but on Buster and Stretch it crashes with above error as fast as the services page is accessed.

@MichaIng
Copy link
Collaborator Author

MichaIng commented Nov 6, 2021

This will be the problem: https://github.com/ravenclaw900/DietPi-Dashboard/blob/da0841b/src/backend/src/systemdata.rs#L333

On Buster and Stretch the colon is somehow missing

2021-11-06 16:43:25 root@VM-Buster:~# /boot/dietpi/dietpi-services status

 DietPi-Services
─────────────────────────────────────────────────────
 Mode: status

[  OK  ] DietPi-Services | cron                 active (running) since Sat 2021-11-06 16:18:33 CET; 25min ago
[  OK  ] DietPi-Services | dropbear             active (running) since Sat 2021-11-06 15:32:35 CET; 1h 10min ago
[ INFO ] DietPi-Services | dietpi-vpn           inactive (dead)
[  OK  ] DietPi-Services | dietpi-dashboard     active (running) since Sat 2021-11-06 16:43:25 CET; 10s ago
[  OK  ] DietPi-Services | dietpi-ramlog        active (exited) since Sat 2021-11-06 15:32:35 CET; 1h 11min ago
[  OK  ] DietPi-Services | dietpi-preboot       active (exited) since Sat 2021-11-06 15:32:35 CET; 1h 11min ago
[  OK  ] DietPi-Services | dietpi-postboot      active (exited) since Sat 2021-11-06 15:32:35 CET; 1h 11min ago
[ INFO ] DietPi-Services | dietpi-wifi-monitor  inactive (dead)

On Bullseye

 DietPi-Services
─────────────────────────────────────────────────────
 Mode: status

[  OK  ] DietPi-Services | cron                 : active (running) since Sat 2021-11-06 16:18:48 CET; 24min ago
[  OK  ] DietPi-Services | dropbear             : active (running) since Sat 2021-11-06 15:33:59 CET; 1h 9min ago
[ INFO ] DietPi-Services | dietpi-vpn           : inactive (dead)
[  OK  ] DietPi-Services | dietpi-dashboard     : active (running) since Sat 2021-11-06 16:18:48 CET; 24min ago
[  OK  ] DietPi-Services | dietpi-ramlog        : active (exited) since Sat 2021-11-06 15:33:59 CET; 1h 9min ago
[  OK  ] DietPi-Services | dietpi-preboot       : active (exited) since Sat 2021-11-06 15:33:59 CET; 1h 9min ago
[  OK  ] DietPi-Services | dietpi-postboot      : active (exited) since Sat 2021-11-06 15:33:59 CET; 1h 9min ago
[ INFO ] DietPi-Services | dietpi-wifi-monitor  : inactive (dead)

I'll fix that DietPi wise to align the status output on all distro versions.

@MichaIng
Copy link
Collaborator Author

MichaIng commented Nov 6, 2021

The problem is that the colon is actually not intended, so it is removed with the fix. I hope tab characters are preserved, as this is what is assured to separate the service name from the status?

@ravenclaw900
Copy link
Owner

Yes, I'll change it to use the tabs.

@MichaIng
Copy link
Collaborator Author

MichaIng commented Nov 6, 2021

Okay great. I pushed the dietpi-services change as well: MichaIng/DietPi@4664307

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants