Categories Not Recognized in F-Droid Metadata During Linting

Hello,

I’m trying to submit an app to F-Droid, but I’m encountering an issue where the Categories field in my metadata file isn’t being recognized during the fdroid lint process.

Problem:

I’ve followed this. However, when I run fdroid lint, it returns errors stating that the categories are not valid. It doesn’t matter what categories I use, it always gives error.

$ sudo docker run --rm -itu vagrant --entrypoint /bin/bash \                              ✔ 
  -v ~/fdroiddata:/build:z \
  -v ~/fdroidserver:/home/vagrant/fdroidserver:Z \
  registry.gitlab.com/fdroid/fdroidserver:buildserver
[sudo] password for mat: 
vagrant@89c7c48e2a38:/$ . /etc/profile
export PATH="$fdroidserver:$PATH" PYTHONPATH="$fdroidserver"
export JAVA_HOME=$(java -XshowSettings:properties -version 2>&1 > /dev/null | grep 'java.home' | awk -F'=' '{print $2}' | tr -d ' ')
cd /build
vagrant@89c7c48e2a38:/build$ fdroid readmeta
fdroid rewritemeta com.example.journal
fdroid checkupdates --allow-dirty com.example.journal
fdroid lint com.example.journal
2024-08-19 07:19:04,970 INFO: Rewriting 'com.example.journal'
2024-08-19 07:19:05,266 INFO: Processing com.example.journal
com.example.journal: Categories 'Writing' is not valid

This is the contents of ~/fdroiddata/metadata/com.example.journal.yml:

Categories:
  - Writing
License: GPL-3.0-or-later
SourceCode: https://github.com/jan-mate/Journalize
IssueTracker: https://github.com/jan-mate/Journalize/issues
Changelog: https://github.com/jan-mate/Journalize/releases

AutoName: Journalize
Summary: A fast-to-use journaling app
Description: |
  Journalize is a simple journaling app. It supports markdown, tagging, and more.

RepoType: git
Repo: https://github.com/jan-mate/Journalize.git

Builds:
  - versionName: 1.0.2
    versionCode: 3
    commit: v1.0.2
    subdir: app
    gradle:
      - yes

AutoUpdateMode: Version
UpdateCheckMode: Tags
CurrentVersion: 1.0.2
CurrentVersionCode: 3```

/home/vagrant/fdroidserver contains a clone of the repo from today, yes?

or better said, make sure the Docker that runs, contains a recent clone, not sure how old is that image :person_shrugging:

Yes, the clone is from today, and Docker is also up to date

works fine for me locally so not sure what the issue is

can you run as fdroid lint --format --verbose com.example.journal ?

$ fdroid lint --format --verbose com.example.journal
2024-08-19 09:46:12,771 DEBUG: Reading 'config.yml'
2024-08-19 09:46:12,781 DEBUG: ipfs_cid not found, skipping CIDv1 generation
com.example.journal: Categories 'Writing' is not valid
1 Like

is fdroiddata up-to-date?

Thanks! I found the issue.

fdroiddata was the latest version, but I had moved the repo, which I didn’t know would break the .git. So after re-cloning fdroiddata it works and my app built! :slight_smile:

1 Like

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.