Upload app settings - TypeError: Invalid Version: null

Getting the following error. Efforts to apply stackoverflow suggested fixes not working . Kindly assist.


Version of cht conf

Command : i’m trying to run against a 4.2 instance of cht.

cht convert-app-forms upload-app-forms compile-app-settings upload-app-settings --url="https://medic:password@127-0-0-1.my.local-ip.co:10443" --accept-self-signed-certs

Things attempted.

  • Uninstall and re-install of cht
  • deleted node_modules in the project and in the nvm ,cleared cache and reran the npm install.

Hi @vchelule !

This code is trying to get the version of cht-core that you’re running. There are a few reasons why this might not work.

Can you please share the full cht-conf command you’re running?
Secondly, what version of CHT Core are you uploading configuration to?
Thirdly, to make sure I’m looking at the right version of the code, what version of CHT Conf CLI are you running?

Please see updated question with the added context. And thanks for the prompt response.

Looking at the code the only way I can see that failing in that way is if there’s a problem getting the version from API. The way it does this is by requesting this url:

https://medic:password@127-0-0-1.my.local-ip.co:10443/api/deploy-info

Can you try opening that in a browser and seeing if you get a JSON response with a valid version field?

Also check the API log to see if any errors are being thrown?

1 Like
// 20240205112954
// https://127-0-0-1.my.local-ip.co:10443/api/deploy-info

{
  "application": "medic",
  "author": "grunt on runner",
  "base_version": "4.2.1",
  "build": "4.2.1.5228573265",
  "namespace": "medic",
  "schema_version": 2,
  "time": "2023-06-10T06:29:44.071Z",
  "version": "4.2.1.5228573265",
  "user": "",
  "upgrade_log_id": "upgrade_log:1688322561889:4.2.1",
  "timestamp": 1688322566407
}

Update:
Update is issue has resolved after i redid install of pyxform, chtconf and python env setup as per the guidelines here: Getting started building a CHT app | Community Health Toolkit so not sure what broke it at first.

1 Like

Ahh it sounds like you hit this bug which is fixed in the latest version of cht-conf so reinstalling probably did the trick!

Glad to hear you’re up and running.

3 Likes