Authorization doesnt work from DHIS2 App

I cloned the latest dhis2-core from github. I ran the debug mode of dhis-web-portal and I can access it from the browser at localhost:8080. I also successfully pass authorization at localhost:8080.

But when I want to do authentication for DHIS2 APP it gives me an error. Im following the tutorial here Getting started with DHIS2 | DHIS2 Developer Portal , with only exception that I have my local version of DHIS2 running.

The error is as follow:

  • WARN 2021-10-22T14:12:53,849 Could not find action or result: /dhis-web-commons-security/login.action ( [qtp213762292-234])
    IDJf8l0i6HGueU8DwQjnWW6UODUtVeAWxbhx03eQE4S90= com.opensymphony.xwork2.config.ConfigurationException: There is no Action mapped for action name login.
    at com.opensymphony.xwork2.DefaultActionProxy.prepare( ~[struts2-core-2.5.26.jar:2.5.26]
    at org.apache.struts2.factory.StrutsActionProxy.prepare( ~[struts2-core-2.5.26.jar:2.5.26]
    at org.apache.struts2.factory.StrutsActionProxyFactory.createActionProxy( ~[struts2-core-2.5.26.jar:2.5.26]
    at com.opensymphony.xwork2.DefaultActionProxyFactory.createActionProxy( ~[struts2-core-2.5.26.jar:2.5.26]
    at org.apache.struts2.dispatcher.Dispatcher.serviceAction( ~[struts2-core-2.5.26.jar:2.5.26]
    at org.apache.struts2.dispatcher.ExecuteOperations.executeAction( ~[struts2-core-2.5.26.jar:2.5.26]
    at org.apache.struts2.dispatcher.filter.StrutsPrepareAndExecuteFilter.doFilter( ~[struts2-core-2.5.26.jar:2.5.26]
    at org.eclipse.jetty.servlet.FilterHolder.doFilter( ~[jetty-servlet-9.4.38.v20210224.jar:9.4.38.v20210224]
    at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter( ~[jetty-servlet-9.4.38.v20210224.jar:9.4.38.v20210224]
    at org.hisp.dhis.servlet.filter.AppOverrideFilter.doFilterInternal( ~[dhis-web-commons-2.38-SNAPSHOT.jar:?]
    at org.springframework.web.filter.OncePerRequestFilter.doFilter( ~[spring-web-5.3.6.jar:5.3.6]
    at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate( ~[spring-web-5.3.6.jar:5.3.6]
    at org.springframework.web.filter.DelegatingFilterProxy.doFilter( ~[spring-web-5.3.6.jar:5.3.6]
    at org.eclipse.jetty.servlet.FilterHolder.doFilter( ~[jetty-servlet-9.4.38.v20210224.jar:9.4.38.v20210224]
    at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter( ~[jetty-servlet-9.4.38.v20210224.jar:9.4.38.v20210224]
    at org.hisp.dhis.we

Hi @Daler :tada: welcome to the community!

Sorry you’re facing this issue! I followed the guide step-by-step and the default app was authorized and the local instance of DHIS2 is 2.35.0, so may I ask what is the version of the DHIS2 instance that you are using? Would you try different versions (latest versions) do you see the same issue? The other point I want to get to is does this happen even with the most basic app or is it with this app specifically?


Dear @Gassim,

Thank you for your follow-up. I have the latest DHIS2 instance and that would be 2.38. I generated the simple DHIS2 APP using that tutorial link.

I think the authorization link changed in the latest version. DHIS2 APP, which I generated using d2 cli tries to connect with the link /dhis-web-commons-security/login.action
BUT when I open the local build of DHIS2 the login link is different and looks like dhis-web-commons/security/login.action

Is there anyone from dev team or anyone else faced this issue, so that we can confirm this?

You’re welcome!

Would you try using the latest stable release and see if you are still facing this issue?

And you could still take screenshots and describe the issue in a Jira bug issue with the version number of the instance that you are currently using.


@Daler Can you try in 2.37 (now stable)? I would like to see if you get the same error as in 2.38.
I’m seeing this issue too on core-dev (Docker image) which is currently 2.38. I just created an empty app on port 3000 and when I try to authenticate (against my localhost on port 8080) I get:

`Could not find action or result: /dhis-web-commons-security/login.action ( [http-nio-8080-exec-7])`
` com.opensymphony.xwork2.config.ConfigurationException: There is no Action mapped for action name login.`

I will keep investigating @Daler and keep you posted.


I fixed it and in my case the issue was not having localhost:3000 in the CORS allow list in the System Settings of the DHIS2 instance. Austin explains it here:

Could this be your issue here?


@german Thanks a lot for your support. I had this CORS thing added but it was not working. I dont know what changed but today I tried it and its working now, though I have not touch it since then.