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

Random crash at startup with "Type is not convertible to string" #1402

Closed
zsolt-donca opened this issue Jan 22, 2022 · 8 comments · Fixed by #1451
Closed

Random crash at startup with "Type is not convertible to string" #1402

zsolt-donca opened this issue Jan 22, 2022 · 8 comments · Fixed by #1451
Labels
bug Something isn't working

Comments

@zsolt-donca
Copy link

Waybar randomly crashes at startup with the below error message. I am running waybar as a systemd user service, and it takes lots and lots of retries to catch one instance of Waybar that actually runs. It keeps restarting for 10-20 seconds usually until it finally starts correctly.

The error message is:

unhandled exception (type std::exception) in signal handler:
what: Type is not convertible to string

The results of coredumpctl dump waybar is at, along with my config and style.css files: https://gist.github.com/zsolt-donca/8c4d3a8003ae2a9af6f7c9e27ec98f97

I am on Arch Linux using the official build from the community repo. Last time I checked waybar-git it was doing the same.

In case it's relevant, I am using a HiDPI display with a scale factor = 2.

@Ranguvar
Copy link

I'll update this later but have been having random crashes on Arch with the official build as well.

At least one of the crashes is with the same error message.

@Alexays Alexays added the bug Something isn't working label Jan 24, 2022
@zenista
Copy link

zenista commented Jan 24, 2022

i think i have found a temporary solution for now... just comment out the line that says "custom/weather".... and waybar works fine after that. In default config setup... in "modules-right" section the line is at no 32.

@zsolt-donca
Copy link
Author

i think i have found a temporary solution for now... just comment out the line that says "custom/weather".... and waybar works fine after that. In default config setup... in "modules-right" section the line is at no 32.

Thank for the hint of looking into the modules. Even though I also have "custom/weather", the troublemaker in my case is not that, but "custom/waybar-mpris". This module is of return type JSON, and the exec command (waybar-mpris --position) apparently sometimes returns an invalid json:

Couldn't dial socket, deleting instead: dial unix /tmp/waybar-mpris.sock: connect: connection refused{}

When it works, I guess it just returns empty JSON object {} (or non-empty, depending on whether I something play).

While this seems to be a bug in the custom module itself (which I will report), I guess waybar should also better handle invalid JSON messages and not just crash.

@zsolt-donca
Copy link
Author

waybar-mpris returning the error message on the standard output was fixed already: https://git.hrfee.pw/hrfee/waybar-mpris/issues/6

I guess what's remaining here is a more robust error handling in Waybar for custom modules of JSON type.

@Ranguvar
Copy link

Ranguvar commented Jan 25, 2022

I think in my case this was caused by a custom/media which I had never set up the script file for.

After disabling it, no crashes so far for hours.

@jallbrit
Copy link

I was having this issue starting with even the default config, and it keeps popping up seemingly randomly. I can sometimes hunt down an individual line in the config that causes it, but I don't understand what's happening.

@jasperjonker
Copy link

jasperjonker commented Feb 2, 2022

I'm having this issue as well randomly and receive the same error message. Will run it now without the custom weather app and update if it's any better
Using the official build on Fedora 34

@Ranguvar
Copy link

Getting this again often despite no change to the package or config

This is with both waybar 0.9.9-1 and waybar 0.9.9-2 from Arch's repository

May try to get a stack trace or such, any tips appreciated

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants