Cannot read property 'value' of undefined

Hello, I’m trying to use acs for one not popular vendor.
It sends next parameters:

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:cwmp="urn:dslforum-org:cwmp-1-0">
  <SOAP-ENV:Header>
    <cwmp:ID SOAP-ENV:mustUnderstand="1">rg_wac_tr069_stack_c226a</cwmp:ID>
  </SOAP-ENV:Header>
  <SOAP-ENV:Body>
    <cwmp:Inform>
      <DeviceId>
        <Manufacturer>ELTEX</Manufacturer>
        <OUI>A8F94B</OUI>
        <ProductClass>RG-35-WZ</ProductClass>
        <SerialNumber>VI57003509</SerialNumber>
      </DeviceId>
      <Event SOAP-ENC:arrayType="cwmp:EventStruct[2]">
        <EventStruct>
          <EventCode>1 BOOT</EventCode>
          <CommandKey/>
        </EventStruct>
        <EventStruct>
          <EventCode>0 BOOTSTRAP</EventCode>
          <CommandKey/>
        </EventStruct>
      </Event>
      <MaxEnvelopes>1</MaxEnvelopes>
      <CurrentTime>2019-10-09T12:07:46Z</CurrentTime>
      <RetryCount>3</RetryCount>
      <ParameterList SOAP-ENC:arrayType="cwmp:ParameterValueStruct[8]">
        <ParameterValueStruct>
          <Name>InternetGatewayDevice.DeviceSummary</Name>
          <Value>InternetGatewayDevice:1.0[](Baseline:1, EthernetLAN:1, WiFiLAN:1, EthernetWAN:1, IPPing:1)</Value>
        </ParameterValueStruct>
        <ParameterValueStruct>
          <Name>InternetGatewayDevice.DeviceInfo.SpecVersion</Name>
          <Value>1.0</Value>
        </ParameterValueStruct>
        <ParameterValueStruct>
          <Name>InternetGatewayDevice.DeviceInfo.HardwareVersion</Name>
          <Value>1v7</Value>
        </ParameterValueStruct>
        <ParameterValueStruct>
          <Name>InternetGatewayDevice.DeviceInfo.SoftwareVersion</Name>
          <Value>2.0.1-b14</Value>
        </ParameterValueStruct>
        <ParameterValueStruct>
          <Name>InternetGatewayDevice.DeviceInfo.ProvisioningCode</Name>
          <Value/>
        </ParameterValueStruct>
        <ParameterValueStruct>
          <Name>InternetGatewayDevice.ManagementServer.ConnectionRequestURL</Name>
          <Value>http://81.1.228.133:7474/</Value>
        </ParameterValueStruct>
        <ParameterValueStruct>
          <Name>InternetGatewayDevice.ManagementServer.ParameterKey</Name>
          <Value/>
        </ParameterValueStruct>
        <ParameterValueStruct>
          <Name>InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANIPConnection.1.ExternalIPAddress</Name>
          <Value>{HiddenIP}</Value>
        </ParameterValueStruct>
      </ParameterList>
    </cwmp:Inform>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

but ACS says
2019-10-16T07:30:26.551Z [ERROR] {HiddenIP}: XML parse error; parseError=“Cannot read property ‘value’ of undefined”

could you please help me to define on which value error appears?

I use version 1.2.0-beta.0+20190731093016

The element is missing a ‘type’ attribute.

Hi,

I have the same error here. Unfortunately, I can not change the XML that is sent by the device.
I used to use this patch:

but it does not work anymore with the beta version.

Any change someone has an equivalent for the beta version ?

Thanks,

Hi,

Try this patch on lib/soap.ts :

133c133
<     .value.trim()
---
>     //.value.trim()
154c154,161
<       const valueType = getValueType(valueElement.attrs);
---
>       let valueType = getValueType(valueElement.attrs);
>
>       if(valueType) {
>               valueType = valueType.value.trim();
>       } else {
>               valueType = 'xsd:string';
>       }
>

Hi,

Thanks, it better: I can now see the parameters, but most of them are blank.
Is there a way to see what is sent by the device ? (I can not use tcpdump, as it’s over https)

Set the config cwmp.debug (from admin → config) to true. And make sure to genieacs-cwmp is started with the environment variable GENIEACS_DEBUG_FILE set to the path of the debug log file.