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] Error: Command failed: cat /sys/class/net/ppp0/speed #715

Closed
easonyen16 opened this issue Apr 27, 2023 · 7 comments
Closed

[Bug] Error: Command failed: cat /sys/class/net/ppp0/speed #715

easonyen16 opened this issue Apr 27, 2023 · 7 comments

Comments

@easonyen16
Copy link

Description of the bug

I am running dashdot from source.
After installing, I type in sudo -E yarn start to start it, it show the error

How to reproduce

sudo -E yarn start

Relevant log output

Version file not found. This is normal on from-source builds.
listening on *:3001
Multiple default network interfaces found [ppp0, eth0], using "ppp0"
Using default network interface "ppp0"
Using host os version from "/etc/os-release"
(node:1114655) UnhandledPromiseRejectionWarning: Error: Command failed: cat /sys/class/net/ppp0/speed
cat: /sys/class/net/ppp0/speed: Invalid argument
    at ChildProcess.exithandler (child_process.js:308:12)
    at ChildProcess.emit (events.js:314:20)
    at maybeClose (internal/child_process.js:1022:16)
    at Socket.<anonymous> (internal/child_process.js:444:11)
    at Socket.emit (events.js:314:20)
    at Pipe.<anonymous> (net.js:676:12)
(node:1114655) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:1114655) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate
the Node.js process with a non-zero exit code.

Info output of dashdot cli

INFO
=========
Yarn: 3.5.0
Node: v18.15.0
Dash: unknown
Cwd: /home/yanyixuan/dashdot
Hash: c6cb25447599a94fc7955b5ccb680a61d0c97d5e
In Docker: false
In Podman: false
In Docker (env):

What browsers are you seeing the problem on?

Chrome

Where is your instance running?

Raspberry Pi

Additional context

In my browsers it shows
Screenshot_20230428_020437_Chrome

@MauriceNino MauriceNino changed the title Error: Command failed: cat /sys/class/net/ppp0/speed [Bug] Error: Command failed: cat /sys/class/net/ppp0/speed Apr 27, 2023
@MauriceNino
Copy link
Owner

Hi there, can you by any chance post the output of this command:

route | grep '^default' | grep -o '[^ ]*$'

or

ip route get 8.8.8.8 | sed -n 's/.*dev \([^\ ]*\).*/\1/p'

If that doesn't work, please have a look at this StackExchange post for another method of finding out your main network interface.

What I suspect is that ppp0 is not your actual network interface and there is some weirdness happening.

@easonyen16
Copy link
Author

yanyixuan@raspberrypi:~ $ route | grep '^default' | grep -o '[^ ]*$'
ppp0
eth0
yanyixuan@raspberrypi:~ $ ip route get 8.8.8.8 | sed -n 's/.*dev \([^\ ]*\).*/\1/p'
ppp0

@MauriceNino
Copy link
Owner

So I just pushed a new version on the dev branch, could you please try that out?

docker image pull mauricenino/dashdot:dev
docker container run -it --rm --privileged -v /:/mnt/host:ro -p 3002:3001 mauricenino/dashdot:dev

@MauriceNino
Copy link
Owner

@SuimgPhilip You are having similar issues, so could you please also try out that solution?

@easonyen16
Copy link
Author

Thank you!
It can run now.
截圖 2023-04-29 下午9 25 12

github-actions bot pushed a commit that referenced this issue Apr 29, 2023
# [5.2.0](v5.1.3...v5.2.0) (2023-04-29)

### Bug Fixes

* also hide hidden storage labels on multiple drives ([213b73e](213b73e)), closes [#716](#716)
* dont crash on missing network interface speed ([c62ba63](c62ba63)), closes [#715](#715) [#727](#727)
* hide public ip, if not included in label list ([ccf7d12](ccf7d12)), closes [#690](#690)
* **view:** remove not broadly supported ECMA Script features in the frontend ([5ba5ed2](5ba5ed2))

### Features

* allow adjusting of items per page in multi-drive storage widget ([54be449](54be449))
@github-actions
Copy link
Contributor

🎉 This issue has been resolved in version 5.2.0

Please check the changelog for more details.

@SuimgPhilip
Copy link

@SuimgPhilip You are having similar issues, so could you please also try out that solution?

The problem is solved

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

No branches or pull requests

3 participants