AxisCommunications / acap-native-sdk-examples

Example code for APIs and features in AXIS Camera Application Platform (ACAP) Native SDK
Apache License 2.0
39 stars 22 forks source link

Invalid application manifest when adding dbus resource to manifest #210

Closed Cacsjep closed 4 months ago

Cacsjep commented 4 months ago

Set dbus resource in manifest according to docs, results in a non installable app.

2024-03-09T07:35:34.664+01:00 axis-b8a44f914a20 [ WARNING ] acapmanager[1579]: acapmanager-dbus.c:1770 Failed to install acap package '/tmp/pm_download_YR3EK2/package.eap' on location 'internal'
2024-03-09T07:35:34.664+01:00 axis-b8a44f914a20 [ WARNING ] acapmanager[1579]: acapmanager-dbus.c:629 acapctl error 80: Invalid application manifest
2024-03-09T07:35:34.664+01:00 axis-b8a44f914a20 [ WARNING ] packagemanager.cgi[1347185]: pm_install_acap.c:99 pm_install_acap: Acap manager D-Bus install method returned error: (1)

To reproduce

Add resources and bus to manifest

{
    "schemaVersion": "1.3.1",
    "acapPackageConf": {
        "setup": {
            "appName": "dbustest",
            "friendlyName": "Dbus Test APP",
            "vendor": "Acs",
            "version": "1.0.1",
            "runMode": "never",
            "embeddedSdkVersion": "3.0",
            "user": {
                "group": "root",
                "username": "root"
            }
        }
    },
    "resources": {
        "dbus": {
            "requiredMethods": ["com.axis.HTTPConf1.VAPIXServiceAccounts1.GetCredentials"]
        }
    }
}

Environment

Cacsjep commented 4 months ago

oh I see I get the creds from dbus even i dont set the resources dbus entry in the manifest.

pataxis commented 4 months ago

Hi @Cacsjep , thanks for your question.

The documentation states that you need to use a dynamic user, the second bullet under updating the manifest in the documentation. This is done by removing the user section in the manifest.json.

Related to this in the ACAP 4.13 release last week,

Cacsjep commented 4 months ago

ok thx