Hello, I’m a newbie in CHT, I have managed to install it on my local computer but I’m having an issue in uploading contacts.
After a successful installation I was able to access the instance via this URL https://127-0-0-1.local-ip.medicmobile.org:10443/#/messages
Hi @Kenyuri can you see if localhost is actually running by entering https://localhost/ in Incognito mode in browser? Just wondering if you are seeing cached page.
@Kenyuri To start the developer CHT instance, run docker-compose , prepending the needed environment variables. Assuming you are following the tutorial (App Developer Hosting in CHT 4.x | Community Health Toolkit), for the local setup you can run following in the terminal:
CHT_COMPOSE_PROJECT_NAME=app-devl COUCHDB_SECRET=foo DOCKER_CONFIG_PATH=${PWD} COUCHDB_DATA=${PWD}/couchd CHT_COMPOSE_PATH=${PWD} COUCHDB_USER=medic COUCHDB_PASSWORD=password docker-compose up
After your developer CHT instance is up, can you try again the command mentioned earlier and see if it resolves the issue?
can you see if localhost is actually running by entering https://localhost/ in Incognito mode in browser?
Just to confirm before completely deciding the instance is down, did you connect to https://localhost:10443/? (with the port) That is where I would expect to see the instance you can also access at https://127-0-0-1.local-ip.medicmobile.org:10443
Assuming the instance is actually up, I have some further thoughts:
node@78021f0ad5dc:/workspaces/cht-project
Are you using the VS Code Dev Container as your IDE? If so, I think that might explain why you can access the instance from your browser (not running inside the container) vs your VS Code terminal (which is running inside a container). In the VS Code dev container, localhost (and also 127.0.0.1 I think) will resolve to the container itself and not to your actual host.
The docs for connecting to a local instance do mention connecting via the ...local-ip.medicmobile.org adapter, but I think that might need to have the local ip address of your host machine in the URL (e.g. something like https://192-168-1-34.local-ip.medicmobile.org:10443 and not https://127-0-0-1..... Can you try replacing 127-0-0-1 with your actual local ip address for your host (but using - instand of .). Then see if you can connect to that URL via your browser still. If that works, try running the cht command again in VS Code.
Couple of followup questions:
How did you start your CHT instance? (Which docs were you following?)
I am curious where the https://127-0-0-1.... originated from…
What operating system are you running? (This might affect Docker networking shenanigans…)
(Also, for more information on what is going on with the local-ip.medicmodile.org stuff, you can check out this page, but the TLDR is that it basically provides DNS records (and TLS certs) for local ip addresses. So, 192-168-1-34.local-ip.medicmobile.org is resolved to 192.168.1.34.)