Repository: ublue-os/bazzite

Issue #1972: Error when booting terminal / TTY
Created: 2024-12-10T16:32:05Z
Describe the bug
Getting the following error whenever I open my terminal in Gnome.

Error: invalid character '}' looking for beginning of object key string

I tested and I also see this under a TTY. I am using fish as my default shell, but if I launch bash I also see the same error.
Happy to debug further if anyone has suggestions on how to do.
What did you expect to happen?
No error on terminal start.
Output of rpm-ostree status
> State: idle
Deployments:
● ostree-image-signed:docker://ghcr.io/ublue-os/bazzite-gnome:stable
                   Digest: sha256:21a8cf708dfee9c32ed02c39d3faf2ca3432598e09c0fceb51af6bb3382a5cc8
                  Version: 41.20241210 (2024-12-10T08:50:31Z)
          LayeredPackages: bat neovim

  ostree-image-signed:docker://ghcr.io/ublue-os/bazzite-gnome:stable
                   Digest: sha256:bdeeffaf67fc29a2e4372afb4d49b506c9d9b7a2ca1b0db324f8ace5e3fbed54
                  Version: (2024-12-09T05:04:02Z)
          LayeredPackages: bat neovim
Hardware
System Details Report

Report details

Date generated:                              2024-12-10 10:21:37

Hardware Information:

Hardware Model:                              ASUS ROG STRIX X670E-I GAMING WIFI
Memory:                                      32.0 GiB
Processor:                                   AMD Ryzen™ 7 7800X3D × 16
Graphics:                                    AMD Radeon™ RX 7900 XTX
Graphics 1:                                  AMD Radeon™ Graphics
Disk Capacity:                               4.0 TB

Software Information:

Firmware Version:                            3035
OS Name:                                     Bazzite 41 (FROM Fedora Silverblue)
OS Build:                                    Stable (F41.20241210)
OS Type:                                     64-bit
GNOME Version:                               47
Windowing System:                            Wayland
Kernel Version:                              Linux 6.11.10-304.bazzite.fc41.x86_64

Extra information or context
If I boot bash with bash -x I see the following around the error message:

+++ grep --color=auto -Fxq 'import "/usr/share/ublue-os/justfile"' /home/username/.justfile
++ for i in /etc/profile.d/.sh
++ '[' -r /etc/profile.d/user-motd.sh ']'
++ '[' '${PROMPT_START@P}[\e[${PROMPT_COLOR}${PROMPT_HIGHLIGHT:+;$PROMPT_HIGHLIGHT}m]${PROMPT_USERHOST@P}[\e[0m]${PROMPT_SEPARATOR@P}[\e[${PROMPT_DIR_COLOR-${PROMPT_COLOR}}${PROMPT_HIGHLIGHT:+;$PROMPT_HIGHLIGHT}m]${PROMPT_DIRECTORY@P}[\e[0m]${PROMPT_END@P}$[\e[0m] ' ']'
++ . /etc/profile.d/user-motd.sh
+++ '[' -z '' ']'
+++ USERMOTDSOURCED=Y
+++ test -d /home/username
+++ test '!' -e /home/username/.config/no-show-user-motd
+++ test -x /usr/libexec/ublue-motd
+++ /usr/libexec/ublue-motd
Error: invalid character '}' looking for beginning of object key string
++ for i in /etc/profile.d/.sh
++ '[' -r /etc/profile.d/vte.sh ']'
++ '[' '${PROMPT_START@P}[\e[${PROMPT_COLOR}${PROMPT_HIGHLIGHT:+;$PROMPT_HIGHLIGHT}m]${PROMPT_USERHOST@P}[\e[0m]${PROMPT_SEPARATOR@P}[\e[${PROMPT_DIR_COLOR-${PROMPT_COLOR}}${PROMPT_HIGHLIGHT:+;$PROMPT_HIGHLIGHT}m]${PROMPT_DIRECTORY@P}[\e[0m]${PROMPT_END@P}$[\e[0m] ' ']'
++ . /etc/profile.d/vte.sh

bash --noprofile --norc gives no error. Ditto with fish --no-config.
I haven't done any customization to my terminal rc / config files, which makes thing this is not just a my machine issue. I also did not see the error with the exact same setup in 41.20241209 or 41.20241125.

Duplicate issue #1974: MOTD display error; Error: invalid character '}' looking for beginning of object key string
Created: 2024-12-11T05:46:52Z
Describe the bug
When I start a terminal to run bash, I receive an error message
 Error: invalid character '}' looking for beginning of object key string
Or, you can invoke /usr/libexec/ublue-motd directly :-
ublue-os/motd/themes🔒 
❯ /usr/libexec/ublue-motd 
Error: invalid character '}' looking for beginning of object key string

What did you expect to happen?
When I start a terminal to run bash or run /usr/libexec/ublue-motd, I expect to see the Bazzite MOTD
Output of rpm-ostree status

Hardware
No response
Extra information or context
The error is caused by an error in the default glow theme file, set by /usr/libexec/ublue-motd to point to /usr/share/ublue-od/motd/themes/purple.json
The theme files purple.json, pink.json and red.json all have a mistake on line 80, where the key "bold" has a trailing ,, but is actually the last item in an object.
cat pink.json | sed -n '80,81p'
    "bold": true,
  },

A simple workaround would be to set the user's org.gnome.desktop.interface accent-color to one of the working themes: blue, green, orange, slate, teal or yellow.
❯ gsettings get org.gnome.desktop.interface accent-color 
'purple'

~ 
❯ /usr/libexec/ublue-motd 
Error: invalid character '}' looking for beginning of object key string

~ 
❯ gsettings set org.gnome.desktop.interface accent-color green

~ 
❯ /usr/libexec/ublue-motd 
                                                                                
  Welcome to Bazzite 󰊴                                                          
                                                                                
  󱋩  bazzite-gnome-nvidia-open:stable                                           
                                                                                
   Command                            │Description                             
  ─────────────────────────────────────┼────────────────────────────────────────
   ujust                               │List all available commands             
   ujust toggle-user-motd              │Toggle this banner on/off               
   ujust changelog                     │View changelog                          
   fastfetch                           │View system information                 
                                                                                
  󰋼 The  bazzite-rollback-helper  command can guide you for rolling back or     
  rebasing to older Bazzite builds                                              
                                                                                
  •  Report an issue https://github.com/ublue-os/bazzite/issues                
  • 󰈙 Documentation http://docs.bazzite.gg/                                     
  • 󰙯 Discord https://discord.bazzite.gg/                                       
  • 󰫑 Mastodon https://fosstodon.org/@UniversalBlue

Closing comment (2024-12-11T05:52:37Z): Looks like a duplicate of #1972 - sorry I didn't search "closed" issues as well as open ones when deciding to log this or not ...