cassidyjames / butler

Home Assistant companion app for Linux
https://cassidyjames.com
GNU General Public License v3.0
89 stars 1 forks source link

Flatpak "Invalid byte sequence in conversion input" with mismatched locales #18

Open viemarimyyra opened 10 months ago

viemarimyyra commented 10 months ago

Application is stuck on Loading the dashboard with either demo, local ip, local URL or external URL set as the server address. I tried disabling firewall, manually setting the default routes and checked Flatpak permissions for Butler. Am I missing something or is the application just broken? Server works brilliantly from the same computer with a Firefox and with Firefox (Flatpak).

Butler v1.0.2 on EndeavourOS (x84-64), kernel 6.6.10-arch1-1 with Budgie Desktop.

cassidyjames commented 10 months ago

I'm not sure what could be happening exactly, as I can't reproduce this here on Fedora Silverblue, Endless OS, or Raspberry Pi OS. 😞

Can you try running it from a terminal (flatpak run com.cassidyjames.butler) and share any output?

Running from a terminal will also enable the built-in WebKit developer tools, but it sounds like you're not even getting to the WebKit screen (the loading screen is native GTK and hides once the WebKit WebView signals it's done loading).

viemarimyyra commented 10 months ago

Yeah, here's the output:

(com.cassidyjames.butler:2): Gtk-WARNING **: 13:35:31.708: Locale not supported by C library. Using the fallback 'C' locale. flatpak-spawn: Invalid byte sequence in conversion input Try "flatpak-spawn --help" for more information.

Also checked with verbose and got some extra lines that might be useful, but the end result was the same:

F: No installations directory in /etc/flatpak/installations.d. Skipping F: Opening system flatpak installation at path /var/lib/flatpak F: Opening user flatpak installation at path /home/viemarimyyra/.local/share/flatpak F: Opening user flatpak installation at path /home/viemarimyyra/.local/share/flatpak F: Opening system flatpak installation at path /var/lib/flatpak F: Skipping parental controls check for app/com.cassidyjames.butler/x86_64/stable since parental controls are disabled globally F: Opening user flatpak installation at path /home/viemarimyyra/.local/share/flatpak F: Opening system flatpak installation at path /var/lib/flatpak F: /var/lib/flatpak/runtime/org.gnome.Platform/x86_64/45/e6f142e232584a0575c084d3d619fc5a81b73f39b84d939672f2fd91fb284f63/files/lib32 does not exist F: Cleaning up unused container id 3712442554 F: Cleaning up per-app-ID state for com.cassidyjames.butler F: Allocated instance id 721838698 F: Add defaults in dir /com/cassidyjames/butler/ F: Add locks in dir /com/cassidyjames/butler/ F: Allowing host-fs access F: Allowing wayland access F: Allowing x11 access F: Allowing pulseaudio access F: Pulseaudio user configuration file '/home/viemarimyyra/.config/pulse/client.conf': Error opening file /home/viemarimyyra/.config/pulse/client.conf: No such file or directory F: CUPS configuration file '/home/viemarimyyra/.cups/client.conf': Error opening file /home/viemarimyyra/.cups/client.conf: No such file or directory F: CUPS configuration file '/etc/cups/client.conf': Error opening file /etc/cups/client.conf: No such file or directory F: Allowing session-dbus access F: Allowing system-dbus access F: Running 'bwrap --args 41 xdg-dbus-proxy --args=43' F: Running 'bwrap --args 41 com.cassidyjames.butler'

(com.cassidyjames.butler:2): Gtk-WARNING **: 13:40:16.307: Locale not supported by C library. Using the fallback 'C' locale. flatpak-spawn: Invalid byte sequence in conversion input Try "flatpak-spawn --help" for more information.

And the verbose output when the default permissions are set in Flatseal, problem still remains:

F: No installations directory in /etc/flatpak/installations.d. Skipping F: Opening system flatpak installation at path /var/lib/flatpak F: Opening user flatpak installation at path /home/viemarimyyra/.local/share/flatpak F: Opening user flatpak installation at path /home/viemarimyyra/.local/share/flatpak F: Opening system flatpak installation at path /var/lib/flatpak F: Skipping parental controls check for app/com.cassidyjames.butler/x86_64/stable since parental controls are disabled globally F: Opening user flatpak installation at path /home/viemarimyyra/.local/share/flatpak F: Opening system flatpak installation at path /var/lib/flatpak F: /var/lib/flatpak/runtime/org.gnome.Platform/x86_64/45/e6f142e232584a0575c084d3d619fc5a81b73f39b84d939672f2fd91fb284f63/files/lib32 does not exist F: Cleaning up unused container id 2525701588 F: Cleaning up per-app-ID state for com.github.tchx84.Flatseal F: Allocated instance id 97379606 F: Add defaults in dir /com/cassidyjames/butler/ F: Add locks in dir /com/cassidyjames/butler/ F: Allowing dri access F: Allowing wayland access F: Allowing x11 access F: Running 'bwrap --args 39 xdg-dbus-proxy --args=42' F: Running 'bwrap --args 39 com.cassidyjames.butler'

(com.cassidyjames.butler:2): Gtk-WARNING **: 13:53:18.274: Locale not supported by C library. Using the fallback 'C' locale. flatpak-spawn: Invalid byte sequence in conversion input Try "flatpak-spawn --help" for more information.

cassidyjames commented 10 months ago

@viemarimyyra hm, what language do you have set for your user?

viemarimyyra commented 10 months ago

English, UK to be exact. Input language and currencies etc. are set to Finnish.

karco commented 10 months ago

I have the same issue on ZorinOS 17 (Ubuntu 22.04)

The software worked normally for a while. On the other hand, I don't know if it's related, but I cleaned up the installed languages.

(com.cassidyjames.butler:2): Gtk-WARNING **: 16:28:49.718: Locale not supported by C library.
    Using the fallback 'C' locale.
flatpak-spawn: Invalid byte sequence in conversion input
Try "flatpak-spawn --help" for more information.
LANG=en_CA.UTF-8
LANGUAGE=en_CA:en
LC_CTYPE="en_CA.UTF-8"
LC_NUMERIC=fr_CA.UTF-8
LC_TIME=fr_CA.UTF-8
LC_COLLATE="en_CA.UTF-8"
LC_MONETARY=fr_CA.UTF-8
LC_MESSAGES="en_CA.UTF-8"
LC_PAPER=fr_CA.UTF-8
LC_NAME=fr_CA.UTF-8
LC_ADDRESS=fr_CA.UTF-8
LC_TELEPHONE=fr_CA.UTF-8
LC_MEASUREMENT=fr_CA.UTF-8
LC_IDENTIFICATION=fr_CA.UTF-8
LC_ALL=
Sturmkater commented 9 months ago

Same here:

    Using the fallback 'C' locale.
flatpak-spawn: Invalid byte sequence in conversion input
Try "flatpak-spawn --help" for more information.

LANG=en_US.UTF-8
LANGUAGE=en_US:en
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC=de_CH.UTF-8
LC_TIME=de_CH.UTF-8
LC_COLLATE="en_US.UTF-8"
LC_MONETARY=de_CH.UTF-8
LC_MESSAGES="en_US.UTF-8"
LC_PAPER=de_CH.UTF-8
LC_NAME=de_CH.UTF-8
LC_ADDRESS=de_CH.UTF-8
LC_TELEPHONE=de_CH.UTF-8
LC_MEASUREMENT=de_CH.UTF-8
LC_IDENTIFICATION=de_CH.UTF-8
LC_ALL=
cassidyjames commented 9 months ago

Apparently this is a bug in Flatpak itself; I'll see it there's a way I can work around it, but I'm not sure.

https://github.com/flatpak/flatpak/issues/5564

MediaElf commented 8 months ago

This only happens in version 1.1.1 When I rolled back to version 1.1 everything went back to normal in French, Russian and other locales Thank you

akosiaris commented 8 months ago

Hi, thanks for this app.

I met the same issue today, first time I installed this app (so I got version 1.1.1, if that matters, which I am pretty sure it doesn't). Given the comment above I also rolled back to 1.1 and 1.0.3, to no avail.

The PS1 trick mentioned in https://github.com/flatpak/flatpak/issues/5564 did work but well, it's suboptimal of course.

So, running using PS1= flatpak run com.cassidyjames.butler the app worked but I still got the Locale not supported by C library. Using the fallback 'C' locale.

locale is a bit messy (I want some things en_US like and some el_GR like):

LANG=en_US.UTF-8
LANGUAGE=en_US:en
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC=el_GR.utf8
LC_TIME=el_GR.utf8
LC_COLLATE="en_US.UTF-8"
LC_MONETARY=el_GR.utf8
LC_MESSAGES="en_US.UTF-8"
LC_PAPER=el_GR.utf8
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT=el_GR.utf8
LC_IDENTIFICATION="en_US.UTF-8"

What actually fixed this for me was

flatpak --user config --set extra-languages el followed by a flatpak update. Double checked that flatpak info org.gnome.Platform.Locale/x86_64/46 said Subdirectories: /el,/en

and then the app started normally.

MediaElf commented 8 months ago

Hi, thanks for this app.

I met the same issue today, first time I installed this app (so I got version 1.1.1, if that matters, which I am pretty sure it doesn't). Given the comment above I also rolled back to 1.1 and 1.0.3, to no avail.

The PS1 trick mentioned in flatpak/flatpak#5564 did work but well, it's suboptimal of course.

So, running using PS1= flatpak run com.cassidyjames.butler the app worked but I still got the Locale not supported by C library. Using the fallback 'C' locale.

locale is a bit messy (I want some things en_US like and some el_GR like):

LANG=en_US.UTF-8
LANGUAGE=en_US:en
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC=el_GR.utf8
LC_TIME=el_GR.utf8
LC_COLLATE="en_US.UTF-8"
LC_MONETARY=el_GR.utf8
LC_MESSAGES="en_US.UTF-8"
LC_PAPER=el_GR.utf8
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT=el_GR.utf8
LC_IDENTIFICATION="en_US.UTF-8"

What actually fixed this for me was

flatpak --user config --set extra-languages el followed by a flatpak update. Double checked that flatpak info org.gnome.Platform.Locale/x86_64/46 said Subdirectories: /el,/en

and then the app started normally.

Sorry, but for me it's still not working...

Any ideas ? I'm running on Elementary OS 7.1 :) Thank you

jmcjm commented 7 months ago

I'm on Fedora Silverblue 39.20240403.0 and my locales are

LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC=pl_PL.UTF-8
LC_TIME=pl_PL.UTF-8
LC_COLLATE="en_US.UTF-8"
LC_MONETARY=pl_PL.UTF-8
LC_MESSAGES="en_US.UTF-8"
LC_PAPER=pl_PL.UTF-8
LC_NAME="en_US.UTF-8"
LC_ADDRESS=pl_PL.UTF-8
LC_TELEPHONE=pl_PL.UTF-8
LC_MEASUREMENT=pl_PL.UTF-8
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=

and in order for Butler to work, I had to add LC_ALL=en_US.UTF-8 as variable in Butler config in Flatseal