Error with Omeka CLI

We are using the excellent Ghent Omeka S Command Line Interface to automate the deployment of an Omeka-S installation. For some reason the module:download command is not working for us now. I am sure it was a few days ago.

For example we might call:
./omeka-s-cli module:download --base-path=build ValueSuggest:1.19.0

And we get the error:
OSC\Repository\Module\ModuleDetails::__construct(): Argument #3 ($latestVersion) must be of type string, null given, called in phar:///home/fake/jenkins/workspace/Library/Omeka/Public/Testing/omeka-s/omeka-s-cli/src/Repository/Module/OmekaDotOrg.php on line 46

This happens whether we supply a version number of not after the module name. If we supply a URL instead of a module name, the download works fine.

We are using release 0.13.0 of the CLI. I could try a more recent version, but this one was working earlier so that may not help.

I should add that the build server I am running this on has pretty restricted access to the internet. There is a possibility that it is trying to get something from an external server which it is denied access to. But I think not, as I would expect to see a long time-out before it failed. I will double-check this shortly by running on a machine which is not restricted.

I am hoping someone understands what is going on with this error. As we are using the single-file CLI it’s hard to add debugging to it.

I’ve worked out that the issue is because of the latest_version of one of the modules being null in the JSON obtained from https://omeka.org/add-ons/json/s_module.json which the CLI uses.

Reported to the Ghent team via a GitHub issue.

There is one module with a null value in that field, which I guess must have been changed in the last few days.

"AccessResource": {
        "dirname": "AccessResource",
        "id": 223,
        "latest_version": null,
        "owner": "Daniel-KM",
        "registered": "2022-09-14 17:01:08",
        "repo": "Omeka-s-module-AccessResource",
        "type": "s_module",
        "versions": {}
    },

There have been commits in the last couple of days that cope with the null latest_version value, so I expect building from the latest code would avoid the problem. There has not been a new release yet, so the pre-built .phar files will still exhibit the issue.

Hi! I just created a patch release that fixes the problem. And thanks for using the omeka-s-cli tool!

1 Like

On our end I’ve updated the JSON outputs for the addons directories to just omit entirely any addons that don’t have any releases. So the problem should be avoided on older versions of the tool also.

3 Likes