Cannot upload app forms to CHT4

I have installed cht-confusing

npm install -g cht-conf
python -m pip install git+https://github.com/medic/pyxform.git@medic-conf-1.17#egg=pyxform-medic

But when I run a command to compile and upload an app form, the compilation and validation succeeds, but uploading throws the following error message:

INFO TypeError: Cannot read properties of null (reading '0')
    at readIdFrom (/home/rafael/.nvm/versions/node/v16.20.1/lib/node_modules/cht-conf/src/lib/forms-utils.js:95:38)
    at execute (/home/rafael/.nvm/versions/node/v16.20.1/lib/node_modules/cht-conf/src/lib/upload-forms.js:70:24)
    at uploadAppForms (/home/rafael/.nvm/versions/node/v16.20.1/lib/node_modules/cht-conf/src/fn/upload-app-forms.js:6:10)
    at Object.execute (/home/rafael/.nvm/versions/node/v16.20.1/lib/node_modules/cht-conf/src/fn/upload-app-forms.js:15:18)
    at executeAction (/home/rafael/.nvm/versions/node/v16.20.1/lib/node_modules/cht-conf/src/lib/main.js:258:40)
    at module.exports (/home/rafael/.nvm/versions/node/v16.20.1/lib/node_modules/cht-conf/src/lib/main.js:193:11)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async /home/rafael/.nvm/versions/node/v16.20.1/lib/node_modules/cht-conf/src/bin/index.js:16:5 
ERROR Cannot read properties of null (reading '0') 

Hi @raf

This doesn’t look like it has something with the version of the CHT, rather the way that the form is structured. It looks like your form’s main instance is missing the id property. code
Can you please check?

Hello @diana,
Thank you for helping me out. Yes, there is a form_id and the form works well on a different cht instance.

Can you please share the contents of your resulting form XML?

Dear @diana,
the xml is too long to paste it in and xml files are not allowed as attachment, but you could download it here:

Let me precise that the xls form works well on a different cht instance, that also has its own cht-conf, so the working and the non-working xml were generated from the same xlsx file, but with different tools.

Hi @raf

My guess is that the first child of your instance has an id that doesn’t match.

   <model odk:xforms-version="1.0.0">      
      <instance>
        <data id="alm" version="202308081605">
          <inputs>
            <meta>
              <location>

Can you try changing the form so the element is actually ?

that also has its own cht-conf

Is the version of cht-conf the same?