[SRU] Can't load addons list in a non-English locale (already fixed upstream)

Bug #1983307 reported by xalt7x
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Knewstuff
Fix Released
High
knewstuff (Ubuntu)
Fix Released
High
Rik Mills
Jammy
Fix Released
Undecided
Unassigned

Bug Description

[Impact]

 * Users expect to be able to download additional assets (icons/themes etc) from store.kde.org via the built in "get new stuff" integration in systemsettings and discover.

 * Currently several categories are broken for users of a non-Eglish locale, whereby the list of available items does not load, but instead a "Unknown Open Collaboration Service API error. (0)." message is displayed

[Test Plan]

 * In an non English locale system try various getnewstuff categories to identify one impacted by the bug.

 * Install the updated packages.

 * Test that the integration now works

 * Additionally if possible test that integration in an English based locale still works.

[Where problems could occur]

 * English locales could break. Not likely from the code, but these must be checked. getnewstuff categories previously unaffected could break, so some checking here is also important.

**** original bug text ****

When Kubuntu 22.04.1 is set on a non-English locale (like Ukrainian) it's currently impossible to download addons (widgets, themes, scripts etc) with a built-in "Get new..." downloader in a System Settings.
User receives error "Unknown Open Collaboration Service API error. (0)."
Current workaround is to force systemsettings to English locale (e.g. with "LANG=en_US systemsettings" on a terminal).
Bug is already fixed upstream in KDE Framework 5.93 and fix probably could be backported to KDE Framework 5.92

ProblemType: Bug
DistroRelease: Ubuntu 22.04
Package: knewstuff-dialog (not installed)
ProcVersionSignature: Ubuntu 5.15.0-43.46-generic 5.15.39
Uname: Linux 5.15.0-43-generic x86_64
ApportVersion: 2.20.11-0ubuntu82.1
Architecture: amd64
CasperMD5CheckResult: pass
CurrentDesktop: KDE
Date: Tue Aug 2 07:18:52 2022
InstallationDate: Installed on 2022-07-31 (1 days ago)
InstallationMedia: Kubuntu 22.04 LTS "Jammy Jellyfish" - Release amd64 (20220419)
SourcePackage: knewstuff
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
In , Makosol (makosol) wrote :

Created attachment 147295
error message

SUMMARY
Error message when clicking "Get new icons..." in system settings

STEPS TO REPRODUCE
1.Go to System settings / Appearence / Icons
2. Click the "Get new icons..." button

OBSERVED RESULT
Error message (cf screenshot)

EXPECTED RESULT
Display available Icons from servers

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: KDE Neon 5.24
(available in About System)
KDE Plasma Version: 5.24.2
KDE Frameworks Version: 5.91
Qt Version: 5.15.3

ADDITIONAL INFORMATION

Revision history for this message
In , Beluchukwunjike (beluchukwunjike) wrote :

Can't confirm this behavior. Everything works great for me.

SOFTWARE/OS VERSIONS
Distro: Manjaro
KDE Plasma Version: 5.24.2
KDE Frameworks Version: 5.91
Qt Version: 5.15.2

Revision history for this message
In , Makosol (makosol) wrote :

Happens also in Fedora 35. Maybe it is linked to french language ?

Revision history for this message
In , Justin Zobel (justin-zobel) wrote :

Are you able to try in another language please, that way we can confirm if that's the issue. I've also not been able to replicate this issue on Fedora 36 with "American English" Language and en_AU (Australia) keyboard layout.

Revision history for this message
In , Makosol (makosol) wrote :

My system is in french, but in System settings / Language, only American English is present...
I don't know why and I don't know how to make the changes necessary to test the issue.

Revision history for this message
In , Alexander-lohnau (alexander-lohnau) wrote :

(In reply to makosol from comment #2)
> Happens also in Fedora 35. Maybe it is linked to french language ?

Can reproduce when setting the language to french. With my default en_US it works fine. In attica one gets a QNetworkReply::RemoteHostClosedError, @leinir any ideas?

Revision history for this message
In , Dan Leinir Turthra Jensen (leinir) wrote :

i mean, apart from the remote host refusing to serve us seeming like it has to be a service side issue, i'm really not sure... Especially given how this code just hasn't changed on our side for ages, and it's suddenly broken... Maybe something with the new caching setup causes it to fail if there's a language set in the request header? (which we don't do ourselves, but i expect it gets sent along by qnam, not really sure). A quick test just trying to manually set the accept-language header to fr seems to just result in a correctly returned list of categories, though, so i'm really not sure what's going on here.

Revision history for this message
In , Dr-4 (dr-4) wrote :

According to KNS, I found out an interesting thing: if the dialog opens in a category that is not translated (or has Latin characters), everything is displayed without problems. Those. sections konsole, yakuake, etc. open, but which contain non-English characters not. Tested with renaming the translation of /usr/share/knsrcfiles/*

Revision history for this message
In , ZaWertun (zawertun) wrote :

This error was caused by this line in KF5 Attica code:
https://invent.kde.org/frameworks/attica/-/blob/dde032d415e26a87f900eb6f0131f5114f0e72f9/src/provider.cpp#L1724

User-Agent header was set to UTF-8 value, "knewstuff-dialog/1.0 (+Вход в систему)" in my case.
It's not valid according to HTTP standard (as I know), so HTTP server breaks connection.

(See also: https://stackoverflow.com/questions/10384741/is-a-unicode-user-agent-legal-inside-an-http-header)

Commenting this line solves issue for me.

Revision history for this message
In , ZaWertun (zawertun) wrote :

Maybe it's worth to encode m_additionalAgentInformation with QUrl::toPercentEncoding(...) before setting it to header.

Revision history for this message
In , Alexander-lohnau (alexander-lohnau) wrote :

I think it is worth rethinking if we even want the user-visible name inside the user agent. Instead I would propose to use the knsrc file basename. This is an identifier we use when creating the engine.

Revision history for this message
In , Bug-janitor (bug-janitor) wrote :

A possibly relevant merge request was started @ https://invent.kde.org/frameworks/knewstuff/-/merge_requests/173

Revision history for this message
In , Alexander-lohnau (alexander-lohnau) wrote :

@Yaroslav Sidlovsky Thanks for the valuable investigation!

Revision history for this message
In , Justin Zobel (justin-zobel) wrote :

Thank you so much Yaroslav! Amazing work!

Revision history for this message
In , Nate-b (nate-b) wrote :

*** Bug 451087 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Nate-b (nate-b) wrote :

Git commit 693a2ea3926400b1482888a2df2c532852b8f971 by Nate Graham, on behalf of Alexander Lohnau.
Committed on 23/03/2022 at 22:58.
Pushed by ngraham into branch 'master'.

Do not set user-visible name as additional agent information

Instead we want the filename, which is more useful as an identifier anyways, because
we would otherwise have to check which user-visible names originate from which knsrc file.

M +4 -1 src/core/engine.cpp

https://invent.kde.org/frameworks/knewstuff/commit/693a2ea3926400b1482888a2df2c532852b8f971

Revision history for this message
In , Justin Zobel (justin-zobel) wrote :

Created attachment 147691
attachment-12149-0.html

No bugfix release?

On Thu, Mar 24, 2022, 9:32 AM Nate Graham <email address hidden> wrote:

> https://bugs.kde.org/show_bug.cgi?id=451165
>
> Nate Graham <email address hidden> changed:
>
> What |Removed |Added
>
> ----------------------------------------------------------------------------
> Version Fixed In| |5.93
>
> --
> You are receiving this mail because:
> You are on the CC list for the bug.

Revision history for this message
In , Nate-b (nate-b) wrote :

That would be up to distro packagers or the Frameworks folks. Frameworks doesn't get automatic bugfix releases, just the normal monthly releases. So someone would need to request one. Would you be interested in doing so?

Revision history for this message
In , Justin Zobel (justin-zobel) wrote :

Created attachment 147692
attachment-12570-0.html

If this patch cleanly applies to the current frameworks release I guess
there's no need for a separate release. I've already proposed the use of
the patch for Fedora KDE.

On Thu, Mar 24, 2022, 10:13 AM Nate Graham <email address hidden> wrote:

> https://bugs.kde.org/show_bug.cgi?id=451165
>
> --- Comment #17 from Nate Graham <email address hidden> ---
> That would be up to distro packagers or the Frameworks folks. Frameworks
> doesn't get automatic bugfix releases, just the normal monthly releases. So
> someone would need to request one. Would you be interested in doing so?
>
> --
> You are receiving this mail because:
> You are on the CC list for the bug.

Revision history for this message
In , Bug-janitor (bug-janitor) wrote :

A possibly relevant merge request was started @ https://invent.kde.org/frameworks/knewstuff/-/merge_requests/175

Revision history for this message
In , Alexander-lohnau (alexander-lohnau) wrote :

There is another place where I am not sure how relevant it even is. Once that is figured out I will reach out to distros and make a backport request.

Revision history for this message
In , Alexander-lohnau (alexander-lohnau) wrote :

Git commit 3ec15eaac29d6b73b078ffe1665fc68fc2beeeac by Alexander Lohnau.
Committed on 24/03/2022 at 06:02.
Pushed by alex into branch 'master'.

Do not set user-visible name as additional agent information when copying provider

Instead we want the filename, which is more useful as an identifier anyways, because
we would otherwise have to check which user-visible names originate from which knsrc file.

M +1 -1 src/core/engine.cpp

https://invent.kde.org/frameworks/knewstuff/commit/3ec15eaac29d6b73b078ffe1665fc68fc2beeeac

Revision history for this message
In , Nate-b (nate-b) wrote :

*** Bug 451088 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Nate-b (nate-b) wrote :

*** Bug 451611 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Nate-b (nate-b) wrote :

*** Bug 451364 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Nate-b (nate-b) wrote :

*** Bug 452157 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Nate-b (nate-b) wrote :

*** Bug 453066 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Nate-b (nate-b) wrote :

*** Bug 453954 has been marked as a duplicate of this bug. ***

Revision history for this message
xalt7x (xalt7x) wrote :
summary: - Can't load addons list in a non-English locale (upstream fix already
- landed in a newer KDE Framework)
+ Can't load addons list in a non-English locale (already fixed upstream)
description: updated
xalt7x (xalt7x)
description: updated
Revision history for this message
Rik Mills (rikmills) wrote : Re: Can't load addons list in a non-English locale (already fixed upstream)

Thanks for the bug report. I will try to make a PPA build with the fix to test later today. If you could confirm once done that this works, then I will start the process of getting the fix into the main Ubuntu archive for Jammy via a stable release update.

Changed in knewstuff:
importance: Unknown → High
status: Unknown → Fix Released
Rik Mills (rikmills)
description: updated
summary: - Can't load addons list in a non-English locale (already fixed upstream)
+ [SRU] Can't load addons list in a non-English locale (already fixed
+ upstream)
Revision history for this message
Rik Mills (rikmills) wrote :

@xalt7x the packages in the following ppa fix the issue for me in a french VM

https://launchpad.net/~rikmills/+archive/ubuntu/bug1983307

it would good but not essential if you could confirm before we proceed

Changed in knewstuff (Ubuntu):
status: New → Confirmed
importance: Undecided → High
assignee: nobody → Rik Mills (rikmills)
Rik Mills (rikmills)
Changed in knewstuff (Ubuntu):
status: Confirmed → Triaged
Revision history for this message
xalt7x (xalt7x) wrote :

@rikmills
I can confirm that the the packages from the aforementioned ppa fix the issue.
Thanks!

Revision history for this message
Rik Mills (rikmills) wrote :

Thanks. This is new uploaded to the jammy unapproved queue. I suspect this will need to wait until after the 220.4.1 point release next week before it can be accepted into the proposed pocket

Changed in knewstuff (Ubuntu):
status: Triaged → In Progress
Revision history for this message
In , Nate-b (nate-b) wrote :

*** Bug 457990 has been marked as a duplicate of this bug. ***

Revision history for this message
In , patked (patked2) wrote :

(In reply to Nate Graham from comment #22)
> *** Bug 451088 has been marked as a duplicate of this bug. ***

thank you all. Nice responsiveness !
Best regards

Revision history for this message
Steve Langasek (vorlon) wrote : Please test proposed package

Hello xalt7x, or anyone else affected,

Accepted knewstuff into jammy-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/knewstuff/5.92.0-0ubuntu1.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-jammy to verification-done-jammy. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-jammy. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in knewstuff (Ubuntu Jammy):
status: New → Fix Committed
tags: added: verification-needed verification-needed-jammy
Revision history for this message
Rik Mills (rikmills) wrote :

Verified that this fixes the issue in a non English install

tags: added: verification-done verification-done-jammy
removed: verification-needed verification-needed-jammy
Revision history for this message
Robie Basak (racb) wrote :

The Test Plan also says:

> * Additionally if possible test that integration in an English based locale still works.

Was this done please?

And which version of the package was tested?

Revision history for this message
Rik Mills (rikmills) wrote : Re: [Bug 1983307] Re: [SRU] Can't load addons list in a non-English locale (already fixed upstream)

On 07/09/2022 11:13, Robie Basak wrote:
> The Test Plan also says:
>
>> * Additionally if possible test that integration in an English based
> locale still works.
>
> Was this done please?
>
> And which version of the package was tested?

Sorry for not mentioning that. Tested in a en-gb install, and en-us live
session, each time upgrading to the 5.92.0-0ubuntu1.1 packages from the
jammy-proposed pocket. In both systemsettings and via plasma-discover,
knewstuff could show, search, and download assets for store.kde.org the
directly affected categories (e.g icons sets), and for any others that
were tried.

Revision history for this message
In , rsbrux (rsbrux) wrote :

This bug report says that this is fixed in KDE Plasma Framework 5.93. I am running Ubuntu Studio 22.04.1 LTS with KDE Plasma 5.24.6 and Framework 5.95, but this error appears when I try to download a new "Login Screen (SDDM)" by clicking "Get New SDDM Themes..." (in "System Settings" under "Startup and Shutdown").

Revision history for this message
In , rsbrux (rsbrux) wrote :

P.S. My language is en_US, but my locale is de_CH.

Changed in knewstuff:
status: Fix Released → Confirmed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package knewstuff - 5.92.0-0ubuntu1.1

---------------
knewstuff (5.92.0-0ubuntu1.1) jammy; urgency=medium

  * Add upstream patches requested by KDE to fix downloading assets when
    in a non-English locale. (LP: #1983307)

 -- Rik Mills <email address hidden> Fri, 05 Aug 2022 08:30:42 +0100

Changed in knewstuff (Ubuntu Jammy):
status: Fix Committed → Fix Released
Revision history for this message
Łukasz Zemczak (sil2100) wrote : Update Released

The verification of the Stable Release Update for knewstuff has completed successfully and the package is now being released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Revision history for this message
In , Nate-b (nate-b) wrote :

The locale doesn't matter; if your language is English, it's a different bug. Can you file a new bug report? Also please make sure to attach a screenshot of the error message. Thanks!

Changed in knewstuff:
status: Confirmed → Fix Released
Rik Mills (rikmills)
Changed in knewstuff (Ubuntu):
status: In Progress → Fix Released
Revision history for this message
In , rsbrux (rsbrux) wrote :

(In reply to Nate Graham from comment #32)
> The locale doesn't matter; if your language is English, it's a different
> bug. Can you file a new bug report? Also please make sure to attach a
> screenshot of the error message. Thanks!

Thanks, I started to file a new bug as you suggested, but can no longer reproduce the problem. Perhaps an update fixed it, or perhaps it was an issue with privileges or with the server connection. IAC, despite the thousands of icons available, I didn't find what I was looking for. I was hoping to find avatar images like the ones macOS and Windows provide fr their accounts and login screens.

Revision history for this message
In , patked (patked2) wrote :

the bug has been fixed now for 10 days during a KDE update.
Thanks to the developers.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.