Ext() not properly passing arguments to extension

Hi,

When trying to call an external script in GenieACS, I get “Extension timed out”. Doing some debugging, it looks like it’s not even properly passing any arguments I give ext() to the extension script.

Here is the provision that is calling ext().

let serial = declare("DeviceID.SerialNumber",{value: 1});

const params = ext("VISPSerial","main","--serial",serial);

declare("VirtualParamters.BandSteering",null,{value: params.Band_Steering});

At the beginning of my extension script I have it logging process.argv to see what arguments are actually being passed, which appears to be this array:

[
    '/usr/bin/node',
    '/usr/local/share/.config/yarn/global/node_modules/genieacs/bin/genieacs-ext',
    'VISPSerial'
]

Which doesn’t contain the argument --serial or the serial number its getting from the provision.

I don’t know with 100% certainty that this is why I’m getting the Extension timed out error but I’m sure it doesn’t help anything.

Thanks.

EDIT:
The problem seems to have fixed itself. I haven’t messed with it at all but now it is suddenly giving me the correct arguments passed to the extension. I would still be very interested to know why this happens now.

process.argv now shows
['--serial', '[object Object]']

inside a provision argv is a global you can use directly.

about the timeout, I had the same issue (particullary during black outs) until I switched from a web service call to a simple text file reading.

also check this:

Hi! I’m new here, could you help me with provisioning?

Captura de tela 2023-04-20 115626

My current scenario the scripts do not communicate, I would like to understand these calls, in the ext() function. My internal code has the function resetPppoe(serialNumber) and it returns a promise but they are not communicating

Necromancy is frowned upon. Please create your own thread instead of resurrecting a dead thread.

sorry, i’m new here