Targets are disabled for admin users. If you need to see targets, login as a normal user

How do l login in as a normal user user on the web app?

2 Likes

Hi @Clifford_Junior_Mthe

You need to create an offline user from the admin section and log in using that user.
The links below should help guide you in that process:

https://docs.communityhealthtoolkit.org/apps/concepts/users/
https://docs.communityhealthtoolkit.org/apps/tutorials/contact-and-users-1/
https://docs.communityhealthtoolkit.org/apps/tutorials/contact-and-users-2/

2 Likes

Hello derick,
I have created two offline users, a CHW and a CHW Supervisor. However, when I try to login with those users, I just get the message:


{“error”:“forbidden”,“reason”:“Insufficient privileges”}

I just need a way to test the forms and everything else before I think about building an android app. So I want to login on the web.

What URL are you loading when logged in as the offline user and seeing the forbidden error?
If you were redirected to /admin/<something>, the error is expected. Can you please try logging in from a fresh page (not after logging out as an admin)?

In the upcoming version, we will be removing the redirect from the logout when the username is changed (Remove redirect from log out. · Issue #6479 · medic/cht-core · GitHub) to specifically fix this error.

Dear Diana,

Thank you for your help.
I have tried a different browser to be absolutely sure (before Brave Browser, second login with Chrome).
On chrome I was sent to a “loading error, please check your connection - Try again”

In Brave, with the “error”: “forbidden” I was indeed redirected to
https://159.100.251.24/medic/_design/medic-admin/_rewrite/

The problem is not solved yet.

Hello Raf,

To debug this, we need more information about your installation: how have you installed the app? which version? are all services running? how does your configuration look like?

Also, can you please share browser logs? An error should be logged to give us an idea about which request is failing.

Dear diana,

Thank you. I have followed the tutorial to create a local instance:

Although I have installed it on a server: https://159.100.251.24/
(I did not change the password, so you could even check for yourself)

That means that the configuration is a blank project to begin with.

It was initially version 3.09 that I have upgraded with the GUI to 3.11.0

The error in the browser seems to be related to a missing SSL certificate? Do I need a valid SSL to login as CHW?
Errors in developer mode:

An SSL certificate error occurred when fetching the script.

main.js:1 Error bootstrapping DOMException: Failed to register a ServiceWorker for scope ('https://159.100.251.24/') with script ('https://159.100.251.24/service-worker.js'): An SSL certificate error occurred when fetching the script.

Hello @raf! Welcome to the CHT forum. We are glad to have you as part of our growing community.

Thank you for posting your question. We hope to support you however we can to resolve the challenges you are facing. To help us do that, and to make it easier for the rest of the community to access these discussions, we recommend that you create a new post if the issue you are facing is might be unrelated to the original post. For example, an SSL certificate error might affect more than just the creation of users.

If in doubt, feel free to reach out to us on the Forum Help & Feedback category and we will be happy to provide guidance and assistance. Thank you and happy discourse!

1 Like

Dear Samuel,

Thank you very much and sorry. The next time, I will create a new topic when I see that the issues diverges from the previous posts.

This time it is no longer necessary because I have solved it.
Once I have installed a valid SSL/TSL certificate, I could log in as a CHW Supervisor.

I am surprised to see that a encrypted connection is mandatory for non-admin users to login, but now I will know.

1 Like