Bug 462931 - "No metadata URIs for vendor directory" error seen in Discover for disabled fwupd repo
Summary: "No metadata URIs for vendor directory" error seen in Discover for disabled f...
Status: RESOLVED FIXED
Alias: None
Product: Discover
Classification: Applications
Component: fwupd Backend (show other bugs)
Version: 5.27.5
Platform: Arch Linux Linux
: NOR minor
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
: 469086 469812 (view as bug list)
Depends on:
Blocks:
 
Reported: 2022-12-11 20:10 UTC by Daniel Duris
Modified: 2023-06-01 06:27 UTC (History)
16 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.27.6
Sentry Crash Report:


Attachments
Screencast showcasing the unexpected error message (161.31 KB, image/gif)
2023-02-17 01:26 UTC, Rodrigo Pedra Brum
Details
discover settings page highlighting vendor directory checkbox (94.26 KB, image/png)
2023-02-18 01:38 UTC, Rodrigo Pedra Brum
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Duris 2022-12-11 20:10:22 UTC
SUMMARY
No metadata URIs for vendor directory popup is displayed on launching Discover.

STEPS TO REPRODUCE
1. Launch Discover.

OBSERVED RESULT
No metadata URIs for vendor directory popup is displayed on launching Discover.

EXPECTED RESULT
No confused popup.

SOFTWARE/OS VERSIONS
Operating System: KDE neon 5.26
KDE Plasma Version: 5.26.4
KDE Frameworks Version: 5.100.0
Qt Version: 5.15.7
Kernel Version: 5.15.0-53-generic (64-bit)
Graphics Platform: X11

ADDITIONAL INFORMATION
Comment 1 Aleix Pol 2022-12-13 16:57:19 UTC
Does it work properly if you try to update from the terminal? You can try with "pkcon upgrade" or "apt get dist-upgrade"
Comment 2 Nate Graham 2023-01-04 19:09:51 UTC
.
Comment 3 Bug Janitor Service 2023-01-19 05:14:21 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 4 Bug Janitor Service 2023-02-03 05:03:59 UTC
This bug has been in NEEDSINFO status with no change for at least
30 days. The bug is now closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!
Comment 5 Daniel Duris 2023-02-03 09:00:02 UTC
(In reply to Aleix Pol from comment #1)
> Does it work properly if you try to update from the terminal? You can try
> with "pkcon upgrade" or "apt get dist-upgrade"

Yes, that works without issues. Anyway, I don't think this is an issue with an actual upgrade. That works. This is an issue with displaying nonsense message (without any actual background issues) to a user.
Comment 6 Rodrigo Pedra Brum 2023-02-17 01:21:08 UTC
I also have the exact same issue on OpenSUSE Tumbleweed. Updating from terminal using zypper works without any messages.

When searching to solve this I found the Stack Overflow answer below asking the user to change some configuration on Discover. Unfortunately, this configuration is not available to me.

https://askubuntu.com/questions/1444178/kubuntu-update-yeilds-no-metadata-uris-for-vendor-directory

For reference easiness, I will paste the steps given in the answer here, I don't have the "Advanced button" on my Discover installation, nor any option similar to those on the answer neither in Discover nor on the Settings app.

> You can try the following steps if you want to use "Discover" to install updates.
> 
> - Open Discover and go to the Updates tab.
> - In the Updates tab, click on the Settings button in the top right corner of the window.
> - In the Settings window, go to the "Updates" section and click on the "Advanced" button.
> - In the Advanced settings window, go to the "Metadata" section and check the "Use vendor-provided metadata" option.
> - Click on the "Apply" button to save your changes and close the Settings window.

In one of the comments on the answer above, a user said they also don't have this configuration option but managed to fix it by reinstalling WINE, after comparing its apt source files to another installation where the message was absent. 

I don't have WINE installed, and I can't tell how I could verify the repos about this on OpenSUSE
Comment 7 Rodrigo Pedra Brum 2023-02-17 01:26:38 UTC
Created attachment 156337 [details]
Screencast showcasing the unexpected error message

Screencast showcasing the unexpected "no metadata URIs for vendor-directory" error message
Comment 8 Nate Graham 2023-02-17 18:08:47 UTC
It's not a great error message, that's for sure. Unfortunately there's nothing Discover can do about it because this error message comes from the system itself; Discover it just passing it along and showing it to you. It means that something is misconfigured with respect to the PackageKit or AppStream setup on the machine. Ideally there would be a better error message that actually tells you what's going on, but, again, that's out of Discover's hands.

I would recommend following up with your distro about this when you see it.
Comment 9 Daniel Duris 2023-02-17 18:22:04 UTC
(In reply to Nate Graham from comment #8)
> It's not a great error message, that's for sure. Unfortunately there's
> nothing Discover can do about it because this error message comes from the
> system itself; Discover it just passing it along and showing it to you. It
> means that something is misconfigured with respect to the PackageKit or
> AppStream setup on the machine. Ideally there would be a better error
> message that actually tells you what's going on, but, again, that's out of
> Discover's hands.
> 
> I would recommend following up with your distro about this when you see it.

I use Neon. Aren't this the actual bug repo for Neon as well?
Comment 10 Nate Graham 2023-02-17 18:32:59 UTC
Sure, we can move the bug report to Neon. But anyone else who had this issue on another distro needs to submit a bug for their distro.
Comment 11 Rodrigo Pedra Brum 2023-02-18 00:40:22 UTC
(In reply to Nate Graham from comment #10)
> Sure, we can move the bug report to Neon. But anyone else who had this issue
> on another distro needs to submit a bug for their distro.

Hey Nathan, thanks for the reply!

Regarding the screen mentioned on SO here

> - In the Settings window, go to the "Updates" section and click on the "Advanced" button.
> - In the Advanced settings window, go to the "Metadata" section and check the "Use vendor-provided metadata" option.

Do you happen to know if these screens were added by a particular distro, or if they should be available on every Discover install?
Comment 12 Nate Graham 2023-02-18 00:49:29 UTC
Yes, that UI is distro-specific. Discover includes a button to open it if it's present; not all distros ship a config UI to tweak packaging stuff.
Comment 13 Rodrigo Pedra Brum 2023-02-18 01:11:25 UTC
(In reply to Nate Graham from comment #12)
> Yes, that UI is distro-specific. Discover includes a button to open it if
> it's present; not all distros ship a config UI to tweak packaging stuff.

OK, thanks for the reply =)
Comment 14 Rodrigo Pedra Brum 2023-02-18 01:38:09 UTC
Created attachment 156408 [details]
discover settings page highlighting vendor directory checkbox

I thought it was weird two different distros, from different Linux "lineage" (sorry, couldn't find a better word), to have the exact same error message.

After some more research, I found a bug report on Arch bug tracker where the user ran `plasma-dsicover-update` from their terminal. 

I ran in mine and had the following output

```bash
$ plasma-discover-update
fetch ratings! false
adding empty sources model QStandardItemModel(0x55d272279b60)
QCommandLineParser: option not defined: "feedback"
Fwupd Error 10 no metadata URIs for vendor-directory
no component found for "org.opensuse.opensuse-tumbleweed"
ready 0
steady 0
No updates available, exiting
```

Which hinted the problem to be with `fwupd`.

I ended up disabling the "vendor directory" checkbox on Discover's settings page, under the "Firmware Updates" section, and the message is gone. (see attached image)

Of course this is not an optimal solution, but could give someone else a hint. 

I know  `fwupd` is about hardware firmware updates from LVFS. The "vendor directory" checkbox is what is not yet clear to me, but I'll keep looking around.

I'd appreciate if someone knows better about how `fwupd` works, and what this "vendor directory" could be.
Comment 15 Rodrigo Pedra Brum 2023-02-18 02:01:04 UTC
Looking into `/etc/fwupd/remotes.d` I have two files called `vendor.conf` and `vendor-directory.conf`.

In both files, I have a key-pair `Enabled=false` (they were already like this).

They also have these key-pair for their MetadataURI property:

- vendor.conf 
MetadataURI=file:///usr/share/fwupd/remotes.d/vendor/vendor.xml.gz

- vendor-directory.conf
MetadataURI=file:///usr/share/fwupd/remotes.d/vendor/firmware


The directory exists, but the `vendor.xml.gz` file referenced above is missing.

As I don't have any relevant files on the `/usr/share/fwupd/remotes.d/vendor/` directory, I'll call it a day, and leave the Discover's Settings Page vendor-directory checkbox unchecked.

My doubt is if Discover, or PackageKit, or fwupd (somehow), should be respecting the `Enabled=false`. Or if this still is something to be reported on the distro level.
Comment 16 Daniel Duris 2023-02-18 10:20:16 UTC
I can confirm that unchecking the vendor directory in the Settings solved it for me as well. There is no error message anymore.  Thanks!
Comment 17 Störm Poorun 2023-03-11 14:54:31 UTC
(In reply to Dan Duris from comment #16)
> I can confirm that unchecking the vendor directory in the Settings solved it
> for me as well. There is no error message anymore.  Thanks!

I am having the same issue on Manjaro, the same confusing error message popup, also starting also the end of last year.

Running plasma-discover-update in console I get the same message:  

fetch ratings! true
adding empty sources model QStandardItemModel(0x55f1c25088e0)
QCommandLineParser: option not defined: "feedback"
packagekitqt.transaction: Unknown Transaction property: "Sender" QVariant(QString, ":1.241")
Fwupd Error 10 no metadata URIs for vendor-directory
no component found for "org.manjaro.manjaro"

The the same resolution (unticking 'vendor directory' in settings) works for me
Comment 18 Nate Graham 2023-04-28 18:51:49 UTC
*** Bug 469086 has been marked as a duplicate of this bug. ***
Comment 19 Aleix Pol 2023-05-14 21:26:41 UTC
Git commit 565cea219d80d3117a0539df9a9ca2bbefb95c51 by Aleix Pol Gonzalez, on behalf of Adam Williamson.
Committed on 14/05/2023 at 21:26.
Pushed by apol into branch 'master'.

fwupd: don't refresh directory-type remotes on setup

File- and directory-type remotes cannot be refreshed, attempting
to do so will trigger an error "no metadata URIs for (remote)"
(because, internally, fwupd does not set the metadata_uri
property for file- or directory-type remotes). We already avoid
trying to refresh file-type remotes on setup, but we need to do
the same for directory-type remotes. This fixes the error
appearing with fwupd 1.9.1 (which ships with a directory-type
remote, vendor-directory, enabled by default).

Signed-off-by: Adam Williamson <awilliam@redhat.com>

M  +3    -1    libdiscover/backends/FwupdBackend/FwupdBackend.cpp

https://invent.kde.org/plasma/discover/commit/565cea219d80d3117a0539df9a9ca2bbefb95c51
Comment 20 Juan Simón 2023-05-15 12:28:20 UTC Comment hidden (spam)
Comment 21 Nate Graham 2023-05-15 12:40:00 UTC Comment hidden (spam)
Comment 22 Nate Graham 2023-05-15 17:37:11 UTC
*** Bug 469812 has been marked as a duplicate of this bug. ***