Unable to load the application with a CHW user

Hello,
I’m trying to build an App with the cht-core.
I have upload contact and app forms.
But when I try to connect to the app with a chw account, I get this error:
An SSL certificate error occurred when fetching the script.

inbox.js:3 Error bootstrapping DOMException: Failed to register a ServiceWorker for scope (‘https://34.211.232.55/’) with script (‘https://34.211.232.55/service-worker.js’): An SSL certificate error occurred when fetching the script.

See below images

2 Likes

Hi @diallotafsir52, welcome to the community.

We are trying to solve the issue similar to what you are facing and it is being tracked here in the cht-core repo.

Meanwhile, you can use a workaround that we suggest for testing the app locally to get around the valid SSL requirement for service workers:

  1. Create a ngrok account at https://ngrok.com/
  2. Follow instructions on downloading and linking your computer (server) to your ngrok account.
  3. Start ngrok by executing: ./ngrok http 443 from your server

Then you should be able to access the app from the https:// URL provided by ngrok and use your CHW account to log in.

If the above method with ngrok does not work, please try a similar service serveo following this guide.

Thanks

3 Likes

Had the same issue and ngrok works. Thanks!

1 Like

Thank you. Ngrok works for me.

1 Like

Try using Mozilla Firefox. The chrome related SSL Enforcement for self-signed certificates isn’t enforced on Mozilla Firefox.

2 Likes

Hi,

As of now, ngrok is not working on forwarding, any thoughts on this one?

@binod , @diana

Thanks.

I am re-developing the app, and when I tried the ngrok to connect to a “offline user”, it cannot go the site anymore, and an error occur like DNS_PROBE error.

Hi,
I’ve recently used ngrok successfully with CHT.
Could you please provide additional details to help understand the setup and troubleshoot any potential issues? It would be helpful if you could share the specific commands you executed, any error logs or output you received, and screenshots or other visual aids that could illustrate the process you followed. Providing as much relevant information as possible will assist in effectively debugging and resolving any challenges you might be facing.
Thanks.

2 Likes