There is no inconsistency. This is by design. Because provision scripts and the API are designed for two different scenarios. One for setting up a CPE (provision scripts), and one for getting/setting/refreshing specific values.
To accomplish the same things, you will need to do this, repeated for every instance of WANDevice:
I think the GetParameterNames should have NextLevel =1 and after it it should skip all the GetParameterValues RPC’s.
The problem is with all objects, the WANIPConnection was just an example … but yes, these instances could change directly on the device and I need to refresh them on demand, and I do this via API but this no longer works the way it did in the previous version I tested (v1.2.0-beta).
sorry for replying to this old thread, I did try this back then but received an error (“Task name not recognized”) since I was using a older version of genieacs. But I’ve test this now on the latest branch and it throws this error in the cwmp logs:
genieacs-cwmp[23686]: 2021-05-21T11:35:57.737Z [ERROR] Uncaught exception; pid=31671 exceptionName=“TypeError”
exceptionMessage=“Cannot read property ‘add’ of undefined”
exceptionStack=“TypeError: Cannot read property ‘add’ of undefined
at c (/opt/genieacs/dist/bin/genieacs-cwmp:2:87065)
at c (/opt/genieacs/dist/bin/genieacs-cwmp:2:87513)
at c (/opt/genieacs/dist/bin/genieacs-cwmp:2:87513)
at c (/opt/genieacs/dist/bin/genieacs-cwmp:2:87513)
at c (/opt/genieacs/dist/bin/genieacs-cwmp:2:87513)
at c (/opt/genieacs/dist/bin/genieacs-cwmp:2:87513)
at c (/opt/genieacs/dist/bin/genieacs-cwmp:2:87513)
at c (/opt/genieacs/dist/bin/genieacs-cwmp:2:87513)
at /opt/genieacs/dist/bin/genieacs-cwmp:2:87551
at Qs (/opt/genieacs/dist/bin/genieacs-cwmp:2:87571)”
The stack trace seems to indicate that this is a bug that has nothing to do with the structure of the task object. Can you confirm whether you installed it from npm or from source and whether you have made any potentially changes to the code?
FYI, you can pass the following environment variable to enable source map support for better stack traces:
Hi Zaidka,
I’ve installed it from source and I didn’t change anything notable (I’ve run npm audit fix which just changed the version of some dependencies in the package.json and npm-shrinkwrap.json: postcss , hosted-git-info , nanoid, source-map-js).
Thank you very much for the source map hint, I din’t knew about it and enabling it helped me to spot the issue. The stack traces now pointed to the exact location from the source code: