Skip to content

Plasmoid configuration not written #339

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

Open
1 of 7 tasks
sharkberrypizza opened this issue May 11, 2025 · 10 comments
Open
1 of 7 tasks

Plasmoid configuration not written #339

sharkberrypizza opened this issue May 11, 2025 · 10 comments
Labels

Comments

@sharkberrypizza
Copy link

Relevant components

  • Standalone tray application (based on Qt Widgets)
  • Plasmoid/applet for Plasma desktop
  • Dolphin integration
  • Command line tool (syncthingctl)
  • Integrated Syncthing instance (libsyncthing)
  • Android app or mobile UI in general
  • Backend libraries

Environment and versions

  • Versions of syncthingtray, qtutilities and c++utilities: syncthingtray-qt6 (Syncthing Plasmoid 1.7.7), Plasma 6.3.5
  • Qt version: 6.9.0
  • C++ compiler (name and version): gcc v. 15.1.1
  • C++ standard library (name and version): glibc v. 2.41
  • Operating system (name and version): EndeavourOS [6.14.6-arch1-1]

Bug description

Adding the plasmoid works as intended, and all usage thereafter is normal, including moving its position elsewhere, but its entry isn't added to plasma-org.kde.plasma.desktop-appletsrc meaning it's lost on plasmashell restart/reboot/etc. All other plasmoids work correctly, and once the default entry is added to file, it also seems to write other data (such as position) correctly too.

Noting use of Wayland, though I don't think it matters since this is a config issue? Also not sure if this bug report belongs here or KDE, but felt likely here. Please advise if that isn't the case!

Steps to reproduce

  1. Add the plasmoid to a bar
  2. Restart plasmashell, reboot, etc

Expected behavior
The plasmoid is persistent.

Screenshots
N/A

Additional context
N/A

@Martchus
Copy link
Owner

I haven't noticed this problem so far. If it is a recent regression then it is probably caused by a change in Plasma as I haven't changed anything concerning the Plasmoid directly. Writing this config file is also done by the Plasma shell and not the Plasmoid themselves so the problem is most likely there anyway. For another issue I've already tried to figure out what is possibly wrong with my Plasmoid and unfortunately I'm not sure what needs to be improved. (I'm not a Plasma dev and only created this Plasmoid by checking the source code of official Plasmoids for how things are done.)

@sharkberrypizza
Copy link
Author

It did happen before the latest update, but I wasn't on that version long and can't say for certain if it's the exact same issue (since version changes may introduce different variables).

I'll see if I can find where the problems are happening but it may not be for a while since I'm extremely busy with a project.
(Note I'm not a plasma developer either, but I don't mind getting my hands in different things when I'm able.)

If I find anything I'll let you know, but for now if anyone runs into this exact problem and needs a fix, the file I mentioned plasma-org.kde.plasma.desktop-appletsrc is definitely the issue. The plasmoid works as expected and saves its location configurations with these lines added:

[Containments][BAR_NUMBER][Applets][HIGHEST_NUMBER]
immutability=1
plugin=martchus.syncthingplasmoid-qt6

where BAR_NUMBER is the number of the bar you want the plasmoid on, and HIGHEST_NUMBER is "your current highest configuration number"+1

@Delivator
Copy link

I have the same issue and I found this error in my journalctl, not sure if its related:

Mai 17 20:48:15 chaos plasmashell[1350]: "SystemServices" from "martchus.syncthingplasmoid-qt6" is not a known category that can be translated
Mai 17 20:48:20 chaos plasmashell[1350]: -------->  load applet:  "martchus.syncthingplasmoid-qt6"  relpath:  "plasma/plasmoids/martchus.syncthingplasmoid-qt6"
Mai 17 20:48:20 chaos plasmashell[1350]:  .. pathes:  QList("/usr/share/plasma/plasmoids/martchus.syncthingplasmoid-qt6")
Mai 17 20:48:46 chaos plasmashell[1350]: "SystemServices" from "martchus.syncthingplasmoid-qt6" is not a known category that can be translated

syncthingtray-qt6 v1.7.7-1 from AUR
KDE Plasma Version: 6.3.5
KDE Frameworks Version: 6.14.0
Qt Version: 6.9.0

@Martchus
Copy link
Owner

Martchus commented May 18, 2025

Even if it is unrelated there might be something I could do to avoid this warning/message. Or it is literally about a missing translation/localization? In this case I can't help much as I could only add English and German.

@Martchus
Copy link
Owner

I've just tested this on my system and can reproduce it. This definitely worked before so I assume there's a breaking change or regression in Plasma (considering I haven't changed anything).

I guess the relevant log line below the translation one could be relevant as well:

"SystemServices" from "martchus.syncthingplasmoid-git" is not a known category that can be translated 
Invalid plugin metadata. :(

The icon of the Plasmoid is also no longer displayed correctly in the selection which would also indicate "invalid" meta-data. I'm quoting "invalid" here because I don't think I have changed anything about the meta-data on the Syncthing Tray side.

Martchus added a commit that referenced this issue May 18, 2025
* Use correct prefix/suffix in icon name so it is also displayed when the
  regular variant (without prefix/suffix) is not installed as well
* Change the category within `KPlugin` to `Utilities` which seems to be the
  most fitting category among the list of categories outputed on my system
  via `cat /usr/share/plasma/plasmoids/*/metadata.json | jq .KPlugin.Category`
    * Note that the currrent category `SystemServices` is not on that list.
    * It looks like the category needs to be translatable so this change
      might help preventing warnings like `"SystemServices" from
      "martchus.syncthingplasmoid-qt6" is not a known category that can be
      translated`.
* Expose the version correctly so it isn't empty
* Simplify specifying version in Plasma 5 version of the metadata file
* See #339
@Martchus
Copy link
Owner

Martchus commented May 18, 2025

I pushed a change that will avoid the is not a known category that can be translated.

With this I'm still getting Invalid plugin metadata. :( but I'm not sure anymore whether it is related because I double checked whether the meta-data is valid (and it seems to be valid) and the icon problem was something else (which is fixed with my latest change, too).

~/.config/plasma-org.kde.plasma.desktop-appletsrc is still not updated. The only diff I'm getting is:

   1   │ --- -   2025-05-18 12:59:42.769803232 +0200
   2   │ +++ /home/martchus/.config/plasma-org.kde.plasma.desktop-appletsrc  2025-05-18 12:59:36.974061356 +0200
   3   │ @@ -159,6 +159,9 @@
   4   │  immutability=1
   5   │  plugin=org.kde.plasma.lock_logout
   6   │  
   7   │ +[Containments][275][Applets][379][Configuration]
   8   │ +selectedConfig=0
   9   │ +
  10   │  [Containments][275][ConfigDialog]
  11   │  DialogHeight=82
  12   │  DialogWidth=1365
  13   │ @@ -167,7 +170,7 @@
  14   │  PreloadWeight=34
  15   │  
  16   │  [Containments][275][General]
  17   │ -AppletOrder=310;338;329;333;311;375;327
  18   │ +AppletOrder=310;338;379;329;333;311;375;327
  19   │  
  20   │  [Containments][309]
  21   │  ItemGeometries-1280x720=

Enabling/disabling the Plasmoid as entry within the system tray Plasmoid works (is is configured persistently).

I also see tons of errors like:

file:///usr/share/plasma/plasmoids/martchus.syncthingplasmoid-git/contents/ui/TinyButton.qml:18:18: QML Image: Fehlschlag beim Öffnen: file:///usr/share/plasma/plasmoids/martchus.syncthingplasmoid-git/contents/ui/refresh

Those errors are probably unrelated as well. I haven't seen them before so they are probably caused by a change in either Qt or Plasma. (Strangely all those icons are still shown correctly. I also used the debugger adding a breakpoint when the relevant icon provider for these icons is registered. The registration happens before those errors are logged so it is not like the registration happens to late. When removing the registration there are also other errors logged in addition and then the icons aren't shown for real. Maybe this is an additional check on the image sources by Plasma which is wrongly performed on the image:// URLs I'm using in my Plasmoid.)

@Martchus
Copy link
Owner

I asked on the Plasma Matrix channel for help yesterday but haven't gotten any reply so far. I could try filing a Plasma bug but probably I'll have to figure this out on my own anyway. So I probably have to make a development build of Plasma and all KDE Frameworks dependencies to improve logging and debug the Plasma parts together why my own code. This will be a bigger task again so I'm not sure when I can dedicate time to do it.

@Delivator
Copy link

Thank you for the effort. Luckily the the syncthing started is still working but I guess the main use of the tray app is currently not really usable for us.

@Martchus
Copy link
Owner

Martchus commented May 19, 2025

Not sure what you mean by "the the syncthing started is still working" and "I guess the main use of the tray app is currently not really usable for us".

Note that you can still use the Plasmoid. Either use the workaround mentioned on #339 (comment) or enable it as entry in the system tray plasmoid. The latter still seems to work despite #239. I've also updated the relevant README section accordingly.

@Delivator
Copy link

Sorry for the confusion, I was just saying that the build in systemd unit configuration is of course still working, so the syncing is also still working.
The workaround works for me!

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

No branches or pull requests

3 participants