Core Framework easy deployment instructions error

Hi All,

I am a first time user of Core Framework and CHT platform, I am trying to follow easy deployment instructions from the below link to get a reference application running and to upload test data.
https://github.com/medic/cht-core/blob/master/INSTALL.md

  • Install medic-conf
  • Check out the cht-core repository to your local machine, either by using the Github Desktop app or by running the following command in the directory you want to check the code out into: git clone https://github.com/medic/cht-core.git . This will create a cht-core directory.
  • Navigate your terminal to the config/default directory of the cht-core directory. This is where the reference application is stored.
  • Run the following medic-conf command: medic-conf --url=https://medic:password@localhost --accept-self-signed-certs csv-to-docs upload-docs . This first compiles and then uploads the shipped default test data to your local instance

Why I run the last command, none of the files get uploaded and I get the following error "
“00a37402-7bc9-5619-92b0-99ade2056cb2”: “conflict: Document update conflict.”

Please let me know if there is something I could try here differently.

Thank you,
Tejaswee

1 Like

Hi Tejaswee,

If you try cleaning your docker image up and trying again does that help?

docker-compose down
docker-compose up
cd config/default
medic-conf --url=https://medic:password@localhost --accept-self-signed-certs csv-to-docs upload-docs

If that still doesn’t work can you check to see if the conflicting document exists in your system? In
your above example that would be:

curl -k http://medic:password@localhost/medic/00a37402-7bc9-5619-92b0-99ade2056cb2

Hi Stefan,

Thanks for your response. Cleaning the docker image gave the same error. And the output of the curl command is below
C:\Users\nithi\OneDrive\Desktop\cht-core\config\default>curl -k http://medic:password@localhost/medic/00a37402-7bc9-5619-92b0-99ade2056cb2

301 Moved Permanently

301 Moved Permanently


nginx/1.13.6 Does this mean the data is already in my local instance?

Thanks,
Tejaswee

Hi Tejaswee,

Try the same curl command with https.

curl -k https://medic:password@localhost/medic/00a37402-7bc9-5619-92b0-99ade2056cb2

Hi Bernard, Stefan,

Thank you for the commands. The second does show the data
curl -k https://medic:password@localhost/medic/00a37402-7bc9-5619-92b0-99ade2056cb2
{“_id”:“00a37402-7bc9-5619-92b0-99ade2056cb2”,“_rev”:“2-f9664ee96e59c6280a5ad0d6ccdaea49”,“type”:“person”,“parent”:{“_id”:“93a84a5d-79b1-5dd2-b3da-7bdf2cc37a15”,“parent”:{“_id”:“2112ab72-448a-50bb-a15d-0b19d2927ab7”}},“name”:“Carla Cotte”,“sex”:“female”,“date_of_birth”:“1987-01-01”,“phone”:“+9779841645872”,“reported_date”:1544031155715,“imported_date”:“2020-02-23T23:54:13.156Z”,“patient_id”:“43813”}

does this mean the data is already uploaded or it is present in my CHT folder? I am still getting the same error “Document update conflit” though.
FYI, the OS I am running is Windows 10. If the requirements are different for it.

Thanks for your time,
Tejaswee

Hi All,

I tried the same above instructions to upload the test data onto reference application on macOS, noticed something interesting. First time I run medic-conf --url=https://medic:password@localhost --accept-self-signed-certs csv-to-docs upload-docs it does say all 25 docs uploaded successfully. But from 2nd time it gives the document conflict error. Is there a way I can clear what I uploaded?

Another thing is, even when it says it uploads all 25 documents correclty, I only see one or two instances of data uploaded, please see the picture attached. I expected the app to be filled with the data. Was it a mistake?

Third, Once I change a contact form/app form and try to recompile the configuration I get the following missing files error while doing
medic-conf --url=https://medic:password@localhost --accept-self-signed-certs
Please see attached pdf for errors.Error.pdf (124.9 KB)

Any clues what else can I

try?

Thanks,

Hello @Tejaswee_Katanguri, Sorry for the slow reply!

Is there a way I can clear what I uploaded?

There isn’t a great way to remove all these uploaded documents. The best way would be go delete them manually through a UI – CouchDB’s Fauxton should be available at https://localhost/_utils.

I expected the app to be filled with the data. Was it a mistake?

No mistake! But it isn’t the greatest data set… Sample data is the intent of the command. You should see a hierarchy of places on “People” tab, there are 13 people within that hierarchy of places, an offline user you can login as (eg. username: andra, pwd: Secret_1), and one report (as displayed on the report tab you’re seeing).

I get the following missing files error while doing

I suspect you’re encountering this bug Error when uploading forms using Windows CMD/Powershell using medic-conf 3.1.0 · Issue #300 · medic/cht-conf · GitHub. This is an active crashing bug in our latest medic-conf version affecting Windows (and I suspect possibly you on MacOS now). A fix for this bug is prioritized but no timeline can be given. Please bear with us while we get this fixed!

In the meantime, there are available workarounds:
Unconfirmed in MacOS, but apparently you can use a bash terminal.

Sorry, I don’t have MacOS so can’t verify these workarounds for your setup directly. Would you try either of these worksarounds and let me know if this works for you?

1 Like

Hey,

Can you clarify which issues you’re having with which operating systems?

The error pdf you linked is you trying to work in Windows right? I’m basing this off the file paths, as they look like windows paths not Unix ones, but I don’t know if One Drive somehow replicates Windows paths on MacOS.

Cheers,
Stefan

On:

I dusted off my Macbook, but was unfortunately unable to reproduce this. Can you give me the specs of your MacOS machine? Specifically I’m interested in the operating system version, and which file system you’re using (they recently changed this). If you open the Disk Utility app you can see which: the new one (that I’m using) is called APFS, and the old one is called MacOS Extended.

Thank you everyone for the help. The above issues have been resolved, the issue was with me trying to upload the same data twice and instead of overwriting it, it was complaining about duplicate data. The process is working fine on both Windows and macOS.

3 Likes