# \[Bug 1595071\] \[NEW\] Self Registration Captcha not	working

**URL:** <https://community.dhis2.org/t/bug-1595071-new-self-registration-captcha-not-working/33120>\
**Category:** Support - Assistance technique\
**Created:** [22 June 2016 08:01 UTC](https://community.dhis2.org/t/bug-1595071-new-self-registration-captcha-not-working/33120 "2016-06-22T08:01:43Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![evert](https://dhis2.b-cdn.net/letter_avatar_proxy/v4/letter/e/e99b99/32.png) [@evert](https://community.dhis2.org/u/evert)\
**Post date:** [22 June 2016 08:01 UTC](https://community.dhis2.org/t/bug-1595071-new-self-registration-captcha-not-working/33120/1 "2016-06-22T08:01:43Z")

</div>

Public bug reported:

When self registration Captcha is on, the create button goes grey after  
pressing the create button and nothing is being processed and only stays  
on that screen.

When self registration Captcha is turned off the create button works  
fine.

\*\* Affects: dhis2  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Importance: Undecided  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Status: New

\*\* Attachment added: "Captcha 2.23 After Pressing Create.png"  
&nbsp;&nbsp;&nbsp;[https://bugs.launchpad.net/bugs/1595071/+attachment/4688348/+files/Captcha%202.23%20After%20Pressing%20Create.png](https://bugs.launchpad.net/bugs/1595071/+attachment/4688348/+files/Captcha%202.23%20After%20Pressing%20Create.png)

> **···**
>
> --  
> You received this bug notification because you are a member of DHIS 2  
> developers, which is subscribed to DHIS.  
> [https://bugs.launchpad.net/bugs/1595071](https://bugs.launchpad.net/bugs/1595071)
> 
> Title:  
> &nbsp;&nbsp;Self Registration Captcha not working
> 
> Status in DHIS:  
> &nbsp;&nbsp;New
> 
> Bug description:  
> &nbsp;&nbsp;When self registration Captcha is on, the create button goes grey  
> &nbsp;&nbsp;after pressing the create button and nothing is being processed and  
> &nbsp;&nbsp;only stays on that screen.
> 
> &nbsp;&nbsp;When self registration Captcha is turned off the create button works  
> &nbsp;&nbsp;fine.
> 
> To manage notifications about this bug go to:  
> [https://bugs.launchpad.net/dhis2/+bug/1595071/+subscriptions](https://bugs.launchpad.net/dhis2/+bug/1595071/+subscriptions)

---

<div class="post-metadata">

**Author:** ![Halvdan\_Hoem\_Grellan](https://dhis2.b-cdn.net/letter_avatar_proxy/v4/letter/h/ecae2f/32.png) [@Halvdan\_Hoem\_Grellan](https://community.dhis2.org/u/Halvdan_Hoem_Grellan)\
**Post date:** [22 June 2016 15:54 UTC](https://community.dhis2.org/t/bug-1595071-new-self-registration-captcha-not-working/33120/2 "2016-06-22T15:54:04Z")

</div>

I am not able to reproduce this on 2.23 or 2.24 (development branch).

What browser are you using? Could you perhaps open the browser console  
and check if anything happens in the "console" or "network" tab? Any  
errors should be marked in read (at least in Firefox and Chrome).

If you are unsure about how to open the console please refer to

> <https://webmasters.stackexchange.com/questions/8525/how-do-i-open-the-javascript-console-in-different-browsers>

javascript-console-in-different-browsers

Thanks!

\*\* Changed in: dhis2  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Status: New =\> Incomplete

> **···**
>
> --  
> You received this bug notification because you are a member of DHIS 2  
> developers, which is subscribed to DHIS.  
> [https://bugs.launchpad.net/bugs/1595071](https://bugs.launchpad.net/bugs/1595071)
> 
> Title:  
> &nbsp;&nbsp;Self Registration Captcha not working
> 
> Status in DHIS:  
> &nbsp;&nbsp;Incomplete
> 
> Bug description:  
> &nbsp;&nbsp;When self registration Captcha is on, the create button goes grey  
> &nbsp;&nbsp;after pressing the create button and nothing is being processed and  
> &nbsp;&nbsp;only stays on that screen.
> 
> &nbsp;&nbsp;When self registration Captcha is turned off the create button works  
> &nbsp;&nbsp;fine.
> 
> To manage notifications about this bug go to:  
> [https://bugs.launchpad.net/dhis2/+bug/1595071/+subscriptions](https://bugs.launchpad.net/dhis2/+bug/1595071/+subscriptions)

---

<div class="post-metadata">

**Author:** ![evert](https://dhis2.b-cdn.net/letter_avatar_proxy/v4/letter/e/e99b99/32.png) [@evert](https://community.dhis2.org/u/evert)\
**Post date:** [23 June 2016 07:14 UTC](https://community.dhis2.org/t/bug-1595071-new-self-registration-captcha-not-working/33120/3 "2016-06-23T07:14:42Z")

</div>

Thank you Halvdan Hoem Grelland (halvdanhg),

We are using both Chrome and Mozilla and both are giving the same  
issues.

These are the following errors that I receive once I click the create  
button:

jquery.min.js:2 POST [http://197.189.252.38:8080/cserv/api/account](http://197.189.252.38:8080/cserv/api/account) 500  
(Internal Server Error)send @ jquery.min.js:2ajax @  
jquery.min.js:2accountSubmitHandler @ account.js:85handle @  
jquery.validate.js:72(anonymous function) @  
jquery.validate.js:92dispatch @ jquery.min.js:2h @ jquery.min.js:2

VM702:1 Uncaught SyntaxError: Unexpected token \< in JSON at position  
0error @ account.js:93k @ jquery.min.js:2fireWith @ jquery.min.js:2y @  
jquery.min.js:2d @ jquery.min.js:2

> **···**
>
> --  
> You received this bug notification because you are a member of DHIS 2  
> developers, which is subscribed to DHIS.  
> [https://bugs.launchpad.net/bugs/1595071](https://bugs.launchpad.net/bugs/1595071)
> 
> Title:  
> &nbsp;&nbsp;Self Registration Captcha not working
> 
> Status in DHIS:  
> &nbsp;&nbsp;Incomplete
> 
> Bug description:  
> &nbsp;&nbsp;When self registration Captcha is on, the create button goes grey  
> &nbsp;&nbsp;after pressing the create button and nothing is being processed and  
> &nbsp;&nbsp;only stays on that screen.
> 
> &nbsp;&nbsp;When self registration Captcha is turned off the create button works  
> &nbsp;&nbsp;fine.
> 
> To manage notifications about this bug go to:  
> [https://bugs.launchpad.net/dhis2/+bug/1595071/+subscriptions](https://bugs.launchpad.net/dhis2/+bug/1595071/+subscriptions)

---

<div class="post-metadata">

**Author:** ![Halvdan\_Hoem\_Grellan](https://dhis2.b-cdn.net/letter_avatar_proxy/v4/letter/h/ecae2f/32.png) [@Halvdan\_Hoem\_Grellan](https://community.dhis2.org/u/Halvdan_Hoem_Grellan)\
**Post date:** [23 June 2016 08:35 UTC](https://community.dhis2.org/t/bug-1595071-new-self-registration-captcha-not-working/33120/4 "2016-06-23T08:35:06Z")

</div>

I tried self-registering on that URL and got the same issue. It spits  
out a stack trace in the response which contains a Java security error.

In short: your Tomcat is misconfigured and it cannot resolve the Java  
keystore to use for the HTTPS connection to Google's recaptcha servers.  
This causes the request to fail, which is why the registration screen is  
unresponsive.

For you reference, here's the interesting part (the full error you will  
find in your server logs):

java.lang.RuntimeException: Unexpected error:  
java.security.InvalidAlgorithmParameterException: the trustAnchors  
parameter must be non-empty

Though the error could be handled better for the user, this is a Tomcat  
issue and not a DHIS2 bug. Will close this one.

\*\* Changed in: dhis2  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Status: Incomplete =\> Invalid

> **···**
>
> --  
> You received this bug notification because you are a member of DHIS 2  
> developers, which is subscribed to DHIS.  
> [https://bugs.launchpad.net/bugs/1595071](https://bugs.launchpad.net/bugs/1595071)
> 
> Title:  
> &nbsp;&nbsp;Self Registration Captcha not working
> 
> Status in DHIS:  
> &nbsp;&nbsp;Invalid
> 
> Bug description:  
> &nbsp;&nbsp;When self registration Captcha is on, the create button goes grey  
> &nbsp;&nbsp;after pressing the create button and nothing is being processed and  
> &nbsp;&nbsp;only stays on that screen.
> 
> &nbsp;&nbsp;When self registration Captcha is turned off the create button works  
> &nbsp;&nbsp;fine.
> 
> To manage notifications about this bug go to:  
> [https://bugs.launchpad.net/dhis2/+bug/1595071/+subscriptions](https://bugs.launchpad.net/dhis2/+bug/1595071/+subscriptions)

---

<div class="post-metadata">

**Author:** ![evert](https://dhis2.b-cdn.net/letter_avatar_proxy/v4/letter/e/e99b99/32.png) [@evert](https://community.dhis2.org/u/evert)\
**Post date:** [23 June 2016 11:37 UTC](https://community.dhis2.org/t/bug-1595071-new-self-registration-captcha-not-working/33120/5 "2016-06-23T11:37:40Z")

</div>

Dear Halvdan,

We have deployed ssl and tested.We can access data visualizer and it works on ssl.  
We do not see any issues with our Tomcat setup and we are still having issues with this.  
We would like to know what is causing this problem. I can give you login details to our server, are you willing to have a look for us.

> **···**
>
> --  
> You received this bug notification because you are a member of DHIS 2  
> developers, which is subscribed to DHIS.  
> [https://bugs.launchpad.net/bugs/1595071](https://bugs.launchpad.net/bugs/1595071)
> 
> Title:  
> &nbsp;&nbsp;Self Registration Captcha not working
> 
> Status in DHIS:  
> &nbsp;&nbsp;Invalid
> 
> Bug description:  
> &nbsp;&nbsp;When self registration Captcha is on, the create button goes grey  
> &nbsp;&nbsp;after pressing the create button and nothing is being processed and  
> &nbsp;&nbsp;only stays on that screen.
> 
> &nbsp;&nbsp;When self registration Captcha is turned off the create button works  
> &nbsp;&nbsp;fine.
> 
> To manage notifications about this bug go to:  
> [https://bugs.launchpad.net/dhis2/+bug/1595071/+subscriptions](https://bugs.launchpad.net/dhis2/+bug/1595071/+subscriptions)

---

<div class="post-metadata">

**Author:** ![Lars](https://dhis2.b-cdn.net/user_avatar/community.dhis2.org/lars/32/34166_2.png) [@Lars](https://community.dhis2.org/u/Lars)\
**Post date:** [23 June 2016 12:07 UTC](https://community.dhis2.org/t/bug-1595071-new-self-registration-captcha-not-working/33120/6 "2016-06-23T12:07:29Z")

</div>

Hi Evert,

yes it does seem like you have an issue with the Tomcat setup - have a look  
at this thread:

> <https://stackoverflow.com/questions/4764611/java-security-invalidalgorithmparameterexception-the-trustanchors-parameter-mus>

invalidalgorithmparameterexception-the-trustanchors-parameter-mus

Lars

> **···**
>
> On Thu, Jun 23, 2016 at 1:37 PM, evert.bothma \<evert@hisp.org\> wrote:
> 
> > Dear Halvdan,
> > 
> > We have deployed ssl and tested.We can access data visualizer and it works  
> > on ssl.  
> > We do not see any issues with our Tomcat setup and we are still having  
> > issues with this.  
> > We would like to know what is causing this problem. I can give you login  
> > details to our server, are you willing to have a look for us.
> > 
> > --  
> > You received this bug notification because you are a member of DHIS 2  
> > developers, which is subscribed to DHIS.  
> > [https://bugs.launchpad.net/bugs/1595071](https://bugs.launchpad.net/bugs/1595071)
> > 
> > Title:  
> > &nbsp;&nbsp;Self Registration Captcha not working
> > 
> > Status in DHIS:  
> > &nbsp;&nbsp;Invalid
> > 
> > Bug description:  
> > &nbsp;&nbsp;When self registration Captcha is on, the create button goes grey  
> > &nbsp;&nbsp;after pressing the create button and nothing is being processed and  
> > &nbsp;&nbsp;only stays on that screen.
> > 
> > &nbsp;&nbsp;When self registration Captcha is turned off the create button works  
> > &nbsp;&nbsp;fine.
> > 
> > To manage notifications about this bug go to:  
> > [https://bugs.launchpad.net/dhis2/+bug/1595071/+subscriptions](https://bugs.launchpad.net/dhis2/+bug/1595071/+subscriptions)
> > 
> > \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_  
> > Mailing list: [DHIS 2 developers in Launchpad](https://launchpad.net/~dhis2-devs)  
> > Post to : dhis2-devs@lists.launchpad.net  
> > Unsubscribe : [DHIS 2 developers in Launchpad](https://launchpad.net/~dhis2-devs)  
> > More help : [ListHelp - Launchpad Help](https://help.launchpad.net/ListHelp)
> 
> --  
> Lars Helge Øverland  
> Lead developer, DHIS 2  
> University of Oslo  
> Skype: larshelgeoverland  
> lars@dhis2.org  
> [http://www.dhis2.org](http://www.dhis2.org) \<[https://www.dhis2.org/&gt](https://www.dhis2.org/&gt);
> 
> --  
> You received this bug notification because you are a member of DHIS 2  
> developers, which is subscribed to DHIS.  
> [https://bugs.launchpad.net/bugs/1595071](https://bugs.launchpad.net/bugs/1595071)
> 
> Title:  
> &nbsp;&nbsp;Self Registration Captcha not working
> 
> Status in DHIS:  
> &nbsp;&nbsp;Invalid
> 
> Bug description:  
> &nbsp;&nbsp;When self registration Captcha is on, the create button goes grey  
> &nbsp;&nbsp;after pressing the create button and nothing is being processed and  
> &nbsp;&nbsp;only stays on that screen.
> 
> &nbsp;&nbsp;When self registration Captcha is turned off the create button works  
> &nbsp;&nbsp;fine.
> 
> To manage notifications about this bug go to:  
> [https://bugs.launchpad.net/dhis2/+bug/1595071/+subscriptions](https://bugs.launchpad.net/dhis2/+bug/1595071/+subscriptions)

---

<div class="post-metadata">

**Author:** ![Halvdan\_Hoem\_Grellan](https://dhis2.b-cdn.net/letter_avatar_proxy/v4/letter/h/ecae2f/32.png) [@Halvdan\_Hoem\_Grellan](https://community.dhis2.org/u/Halvdan_Hoem_Grellan)\
**Post date:** [23 June 2016 12:19 UTC](https://community.dhis2.org/t/bug-1595071-new-self-registration-captcha-not-working/33120/7 "2016-06-23T12:19:07Z")

</div>

I am not referring to SSL for your domain.

The recaptcha functionality is dependent on doing a server-to-server web  
request to Google's recaptcha servers. Your Tomcat instance fails to set up  
the HTTPS connection to said server because it cannot resolve any root  
certificates (which would be in the aforementioned keystore) from which to  
establish trust (aka. trust anchors).

The link in Lars' reply should explain this in more detail.

> **···**
>
> On Thu, Jun 23, 2016 at 1:37 PM, evert.bothma \<evert@hisp.org\> wrote:
> 
> > Dear Halvdan,
> > 
> > We have deployed ssl and tested.We can access data visualizer and it works  
> > on ssl.  
> > We do not see any issues with our Tomcat setup and we are still having  
> > issues with this.  
> > We would like to know what is causing this problem. I can give you login  
> > details to our server, are you willing to have a look for us.
> > 
> > --  
> > You received this bug notification because you are a member of DHIS 2  
> > developers, which is subscribed to DHIS.  
> > [https://bugs.launchpad.net/bugs/1595071](https://bugs.launchpad.net/bugs/1595071)
> > 
> > Title:  
> > &nbsp;&nbsp;Self Registration Captcha not working
> > 
> > Status in DHIS:  
> > &nbsp;&nbsp;Invalid
> > 
> > Bug description:  
> > &nbsp;&nbsp;When self registration Captcha is on, the create button goes grey  
> > &nbsp;&nbsp;after pressing the create button and nothing is being processed and  
> > &nbsp;&nbsp;only stays on that screen.
> > 
> > &nbsp;&nbsp;When self registration Captcha is turned off the create button works  
> > &nbsp;&nbsp;fine.
> > 
> > To manage notifications about this bug go to:  
> > [https://bugs.launchpad.net/dhis2/+bug/1595071/+subscriptions](https://bugs.launchpad.net/dhis2/+bug/1595071/+subscriptions)
> > 
> > \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_  
> > Mailing list: [DHIS 2 developers in Launchpad](https://launchpad.net/~dhis2-devs)  
> > Post to : dhis2-devs@lists.launchpad.net  
> > Unsubscribe : [DHIS 2 developers in Launchpad](https://launchpad.net/~dhis2-devs)  
> > More help : [ListHelp - Launchpad Help](https://help.launchpad.net/ListHelp)
> 
> --  
> Halvdan Hoem Grelland  
> Software developer, DHIS 2  
> University of Oslo  
> [http://www.dhis2.org](http://www.dhis2.org) \<[https://www.dhis2.org/&gt](https://www.dhis2.org/&gt);
> 
> --  
> You received this bug notification because you are a member of DHIS 2  
> developers, which is subscribed to DHIS.  
> [https://bugs.launchpad.net/bugs/1595071](https://bugs.launchpad.net/bugs/1595071)
> 
> Title:  
> &nbsp;&nbsp;Self Registration Captcha not working
> 
> Status in DHIS:  
> &nbsp;&nbsp;Invalid
> 
> Bug description:  
> &nbsp;&nbsp;When self registration Captcha is on, the create button goes grey  
> &nbsp;&nbsp;after pressing the create button and nothing is being processed and  
> &nbsp;&nbsp;only stays on that screen.
> 
> &nbsp;&nbsp;When self registration Captcha is turned off the create button works  
> &nbsp;&nbsp;fine.
> 
> To manage notifications about this bug go to:  
> [https://bugs.launchpad.net/dhis2/+bug/1595071/+subscriptions](https://bugs.launchpad.net/dhis2/+bug/1595071/+subscriptions)

---

<div class="post-metadata">

**Author:** ![evert](https://dhis2.b-cdn.net/letter_avatar_proxy/v4/letter/e/e99b99/32.png) [@evert](https://community.dhis2.org/u/evert)\
**Post date:** [23 June 2016 13:05 UTC](https://community.dhis2.org/t/bug-1595071-new-self-registration-captcha-not-working/33120/8 "2016-06-23T13:05:11Z")

</div>

Dear Halvdan and Lars,

Thank you very very much for your assistance. We managed to get a solution from the link that Lars gave us.  
We ran the command update-ca-certificates -f. This updates and refreshes the certificates in /etc/ssl/certs.  
It is working 100%.

Again I want to say thank you.

> **···**
>
> --  
> You received this bug notification because you are a member of DHIS 2  
> developers, which is subscribed to DHIS.  
> [https://bugs.launchpad.net/bugs/1595071](https://bugs.launchpad.net/bugs/1595071)
> 
> Title:  
> &nbsp;&nbsp;Self Registration Captcha not working
> 
> Status in DHIS:  
> &nbsp;&nbsp;Invalid
> 
> Bug description:  
> &nbsp;&nbsp;When self registration Captcha is on, the create button goes grey  
> &nbsp;&nbsp;after pressing the create button and nothing is being processed and  
> &nbsp;&nbsp;only stays on that screen.
> 
> &nbsp;&nbsp;When self registration Captcha is turned off the create button works  
> &nbsp;&nbsp;fine.
> 
> To manage notifications about this bug go to:  
> [https://bugs.launchpad.net/dhis2/+bug/1595071/+subscriptions](https://bugs.launchpad.net/dhis2/+bug/1595071/+subscriptions)
