fastfetch-cli / fastfetch

An actively maintained, feature-rich and performance oriented, neofetch like system information tool.
MIT License
10.14k stars 399 forks source link

Termux error[BUG] #760

Closed wowlikon closed 5 months ago

wowlikon commented 7 months ago

General description of bug:

Screenshot: image

Output of fastfetch -c ci.jsonc --format json: error.json

Output of fastfetch --list-features:

threads
vulkan
freetype
videodev2
CarterLi commented 7 months ago

Thanks for reporting. Unfortunately I cannot reproduce this issue on my cell phone. Can you provide the output of the following command?

for structure in localip battery poweradapter locale break colors; do ./fastfetch -l none --show-errors -s $structure; done
wowlikon commented 7 months ago

Thanks for reporting. Unfortunately I cannot reproduce this issue on my cell phone. Can you provide the output of the following command?

for structure in localip battery poweradapter locale break colors; do ./fastfetch -l none --show-errors -s $structure; done

Output:


❯ for structure in localip battery poweradapter locale break colors; do fastfetch -l none --show-errors -s $structure; done
Local IP (rmnet_data6): 12.34.67.90/24
Local IP (wlan0): 192.168.0.164/24
Battery: 50% [DISCHARGING]
Power Adapter: Not supported on this platform
Locale: en_US.UTF-8

████████████████████████ ████████████████████████

CarterLi commented 7 months ago

Well, is the bug consistantly reproduceable?

wowlikon commented 7 months ago

Well, is the bug consistantly reproduceable?

The error is probably related to termux-api. because without it, the battery status is not displayed and an error does not occur

❯ termux-battery-status
{
  "health": "GOOD",
  "percentage": 49,
  "plugged": "UNPLUGGED",
  "status": "DISCHARGING",
  "temperature": 28.0,
  "current": -1002000
}
CarterLi commented 7 months ago

However it didn't occur here:

Battery: 50% [DISCHARGING]

wowlikon commented 7 months ago

Perhaps some other termux-api commands are causing errors, or do not return the expected response

CarterLi commented 7 months ago

Can you please try this?

for structure in Title Separator OS Host Kernel Uptime Packages Shell Display DE WM WMTheme Theme Icons Font Cursor Terminal TerminalFont CPU GPU Memory Swap Disk LocalIp Battery PowerAdapter Locale Break Colors; do fastfetch -l none --show-errors -s $structure; done
wowlikon commented 7 months ago

Can you please try this?

for structure in Title Separator OS Host Kernel Uptime Packages Shell Display DE WM WMTheme Theme Icons Font Cursor Terminal TerminalFont CPU GPU Memory Swap Disk LocalIp Battery PowerAdapter Locale Break Colors; do fastfetch -l none --show-errors -s $structure; done

WindowsTerminal_rMicxOJTh6

CarterLi commented 7 months ago

The crash seems to be random. Let's wait and see if it occurs to others.

CarterLi commented 7 months ago

Anyway, you can always disable the battery module manually with fastfetch -s Title:Separator:OS:Host:Kernel:Uptime:Packages:Shell:Display:DE:WM:WMTheme:Theme:Icons:Font:Cursor:Terminal:TerminalFont:CPU:GPU:Memory:Swap:Disk:LocalIp:Locale:Break:Colors

Efreak commented 5 months ago

I'm getting this as well, though I'm not sure if it's for the same reason. It goes away when I disable battery, however the battery report is correct. It also goes away if I set --pipe, oddly.

detailed info and fastfetch output [`fastfetch -c ci.jsonc --format json`](https://gist.github.com/Efreak/ea14bfd983558c5c00e5babad8046d0e) Output from fastfetch `--list-features`: ``` threads vulkan freetype linux/videodev2 linux/wireless ``` ![SmartSelect_20240501_070345_Termux](https://github.com/fastfetch-cli/fastfetch/assets/749751/b10a990f-1bca-4f09-b475-bcf80cd7aa70)