Seeking help with identifying possible solution in a bug after installing a fresh instance of 2.35.1

Has anyone faced this issue and can advise on how to solve it?

We recently installed a fresh 2.35.1 instance (the stable and dev), once we sign-in (using the default usr/pwd admin:district), DHIS2 gets stuck on the dashboard loading animation:
image
Without anything in the catalina log, however the below is in the browser console logs:

/api/32/staticContent/logo_banner:1 Failed to load resource: the server responded with a status of 404 ()
136.68ccf293.chunk.js:2 Mixed Content: The page at 'https://<mydomain>/dhis-web-dashboard/#/' was loaded over HTTPS, but requested an insecure resource 'http://<mydomain>/api/32/dashboards?fields=id%2Cname%2CdisplayName%2Cdescription%2CdisplayDescription%2Cfavorite%2Cuser%5Bid%2CdisplayName~rename(name)%5D%2Ccreated%2ClastUpdated%2Caccess%2CdashboardItems%5Bid%5D&paging=false'. This request has been blocked; the content must be served over HTTPS.
(anonymous) @ 136.68ccf293.chunk.js:2
/dhis-web-dashboard/static/js/136.68ccf293.chunk.js:2 Server connection error: TypeError: Failed to fetch
(anonymous) @ /dhis-web-dashboard/static/js/136.68ccf293.chunk.js:2
/dhis-web-dashboard/static/js/app.e842ce73.chunk.js:1 Error:  Server connection failed for API request: GET http://<mydomain>/api/32/dashboards?fields=id%2Cname%2CdisplayName%2Cdescription%2CdisplayDescription%2Cfavorite%2Cuser%5Bid%2CdisplayName~rename(name)%5D%2Ccreated%2ClastUpdated%2Caccess%2CdashboardItems%5Bid%5D&paging=false
/dhis-web-dashboard/static/js/app.e842ce73.chunk.js:1 Uncaught (in promise) TypeError: Cannot read property 'toArray' of undefined
    at /dhis-web-dashboard/static/js/app.e842ce73.chunk.js:1
/api/32/userDataStore/dashboard:1 Failed to load resource: the server responded with a status of 404 ()
/dhis-web-dashboard/static/js/136.68ccf293.chunk.js:2 API request failed with status 404 
 Request: GET ../api/32/userDataStore/dashboard
(anonymous) @ /dhis-web-dashboard/static/js/136.68ccf293.chunk.js:2

Is this a misconfiguration somehow somewhere?
is this related to my browser? proxy? firewall?

Any idea on how we can identify the problem, solve it and avoid it in the future?
P.S: I’m using google chrome and also tried firefox and edge and have cleared cookies and offline files.

similar error in firefox:

unreachable code after return statement
2 map.js:2:1005889
Blocked loading mixed active content “http://<mydomain>/api/32/dashboards?fields=id%2Cname%2Cdisp…2ClastUpdated%2Caccess%2CdashboardItems%5Bid%5D&paging=false”
136.68ccf293.chunk.js:2:38074
Server connection error: TypeError: "NetworkError when attempting to fetch resource."
    value https://<mydomain>/dhis-web-dashboard/static/js/136.68ccf293.chunk.js:2
    value https://<mydomain>/dhis-web-dashboard/static/js/136.68ccf293.chunk.js:2
    value https://<mydomain>/dhis-web-dashboard/static/js/136.68ccf293.chunk.js:2
    value https://<mydomain>/dhis-web-dashboard/static/js/136.68ccf293.chunk.js:2
    t https://<mydomain>/dhis-web-dashboard/static/js/app.e842ce73.chunk.js:1
136.68ccf293.chunk.js:2:38905
Error:  Server connection failed for API request: GET http://<mydomain>/api/32/dashboards?fields=id%2Cname%2CdisplayName%2Cdescription%2CdisplayDescription%2Cfavorite%2Cuser%5Bid%2CdisplayName~rename(name)%5D%2Ccreated%2ClastUpdated%2Caccess%2CdashboardItems%5Bid%5D&paging=false app.e842ce73.chunk.js:1:93712
TypeError: t is undefined
app.e842ce73.chunk.js:1:96954
API request failed with status 404 
 Request: GET ../api/32/userDataStore/dashboard 5 136.68ccf293.chunk.js:2:38524
Error (apiGetControlBarRows):  
Object { httpStatus: "Not Found", httpStatusCode: 404, status: "ERROR", message: "The namespace 'dashboard' was not found." }

I also noticed these errors while starting the server: (maybe they are related?)

 ERROR Unable to create file dhis.log java.io.IOException: Permission denied
        at java.io.UnixFileSystem.createFileExclusively(Native Method)
        at java.io.File.createNewFile(File.java:1014)
 ERROR Could not create plugin of type class org.apache.logging.log4j.core.appender.RollingFileAppender for element RollingFile: java.lang.IllegalStateException: ManagerFactory [org.apache.logging.log4j.core.appender.rolling.RollingFileManager$RollingFileManagerFactory@559d28f5] unable to create manager for [dhis.log] with data [org.apache.logging.log4j.core.appender.rolling.RollingFileManager$FactoryData@6c9d585d[pattern=dhis.log%i, append=true, bufferedIO=true, bufferSize=8192, policy=CompositeTriggeringPolicy(policies=[SizeBasedTriggeringPolicy(size=26214400)]), strategy=DefaultRolloverStrategy(min=1, max=3, useMax=true), advertiseURI=null, layout=* %-5p %d{ISO8601} %m (%F [%t])%n %X{sessionId}, filePermissions=null, fileOwner=null]] java.lang.IllegalStateException: ManagerFactory [org.apache.logging.log4j.core.appender.rolling.RollingFileManager$RollingFileManagerFactory@559d28f5] unable to create manager for [dhis.log] with data [org.apache.logging.log4j.core.appender.rolling.RollingFileManager$FactoryData@6c9d585d[pattern=dhis.log%i, append=true, bufferedIO=true, bufferSize=8192, policy=CompositeTriggeringPolicy(policies=[SizeBasedTriggeringPolicy(size=26214400)]), strategy=DefaultRolloverStrategy(min=1, max=3, useMax=true), advertiseURI=null, layout=* %-5p %d{ISO8601} %m (%F [%t])%n %X{sessionId}, filePermissions=null, fileOwner=null]]
        at org.apache.logging.log4j.core.appender.AbstractManager.getManager(AbstractManager.java:115)
        at org.apache.logging.log4j.core.appender.OutputStreamManager.getManager(OutputStreamManager.java:114)
ERROR Unable to invoke factory method in class org.apache.logging.log4j.core.appender.RollingFileAppender for element RollingFile: java.lang.IllegalStateException: No factory method found for class org.apache.logging.log4j.core.appender.RollingFileAppender java.lang.IllegalStateException: No factory method found for class org.apache.logging.log4j.core.appender.RollingFileAppender
        at org.apache.logging.log4j.core.config.plugins.util.PluginBuilder.findFactoryMethod(PluginBuilder.java:234)

Also i couldn’t replicate in play.dhis2.org

@dhis2-platform

Please post your dhis.conf file here (WITHOUT YOUR POSTGRESQL CREDENTIALS AND ENCRYPTION SECRETS).
Are you operating via a reverse proxy (NGINX/Apache)?

Yes indeed I’m behind reverse proxy nginx

OK, that looks fine, could you post your /etc/nginx/nginx.conf file (and any relevant includes)? Alternatively confirm that NGINX is redirecting all http traffic to https. Also, your tomcat/conf/server.xml file - please post your http port connector section (default is port 8080).

Thanks

Nginx.conf

user www-data;
worker_processes auto;
pid /run/nginx.pid;
include /etc/nginx/modules-enabled/*.conf;

events {
        worker_connections 768;
        # multi_accept on;
}

http {
	##
  # Basic Settings
  ##

  sendfile on;
  tcp_nopush on;
  tcp_nodelay on;
  keepalive_timeout 65;
  types_hash_max_size 2048;
  # server_tokens off;

  # server_names_hash_bucket_size 64;
  # server_name_in_redirect off;

  include /etc/nginx/mime.types;
  default_type application/octet-stream;

  ##
  # SSL Settings
  ##

  ssl_protocols TLSv1 TLSv1.1 TLSv1.2; # Dropping SSLv3, ref: POODLE
  ssl_prefer_server_ciphers on;

  ##
  # Logging Settings
  ##

  access_log /var/log/nginx/access.log;
  error_log /var/log/nginx/error.log;

  ##
  # Gzip Settings
  ##

  gzip on; # Enables compression, incl Web API content-types
  gzip_types
    "application/json;charset=utf-8" application/json
    "application/javascript;charset=utf-8" application/javascript text/javascript
    "application/xml;charset=utf-8" application/xml text/xml
    "text/css;charset=utf-8" text/css
    "text/plain;charset=utf-8" text/plain;
  # gzip_vary on;
  # gzip_proxied any;
  # gzip_comp_level 6;
  # gzip_buffers 16 8k;
  # gzip_http_version 1.1;
  # gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;

  ##
  # Virtual Host Configs
  ##

  ##include /etc/nginx/conf.d/*.conf;
  include /etc/nginx/sites-enabled/*;
}

Nginx enabled site file:

server {
#    listen 443 ssl;
    server_name <domain name>;
#    ssl_certificate /etc/letsencrypt/live/<domain name>/fullchain.pem;
#    ssl_certificate_key /etc/letsencrypt/live/<domain name>/privkey.pem;
    client_max_body_size 10M;

    # Proxy pass to servlet container

    location / {
      proxy_pass                http://localhost:8080/;
      proxy_redirect            off;
      proxy_set_header          Host               $host;
      proxy_set_header          X-Real-IP          $remote_addr;
      proxy_set_header          X-Forwarded-For    $proxy_add_x_forwarded_for;
      proxy_set_header          X-Forwarded-Proto  http;
      proxy_buffer_size         128k;
      proxy_buffers             8 128k;
      proxy_busy_buffers_size   256k;
      proxy_cookie_path         ~*^/(.*) "/$1; SameSite=Lax";
    }
  
    listen 443 ssl; # managed by Certbot
    ssl_certificate /etc/letsencrypt/live/<domain name>/fullchain.pem; # managed by Certbot
    ssl_certificate_key /etc/letsencrypt/live/<domain name>/privkey.pem; # managed by Certbot
    include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
    ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot

}
server {
    if ($host = <domain name>) {
        return 301 https://$host$request_uri;
    } # managed by Certbot


    listen               80;
    server_name <domain name>;
    return 404; # managed by Certbot


}

Server.xml:

<?xml version="1.0" encoding="UTF-8"?>
<!--
  Licensed to the Apache Software Foundation (ASF) under one or more
  contributor license agreements.  See the NOTICE file distributed with
  this work for additional information regarding copyright ownership.
  The ASF licenses this file to You under the Apache License, Version 2.0
  (the "License"); you may not use this file except in compliance with
  the License.  You may obtain a copy of the License at

      http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
-->
<!-- Note:  A "Server" is not itself a "Container", so you may not
     define subcomponents such as "Valves" at this level.
     Documentation at /docs/config/server.html
 -->
<Server port="8005" shutdown="SHUTDOWN">
  <Listener className="org.apache.catalina.startup.VersionLoggerListener" />
  <!-- Security listener. Documentation at /docs/config/listeners.html
  <Listener className="org.apache.catalina.security.SecurityListener" />
  -->
  <!--APR library loader. Documentation at /docs/apr.html -->
  <Listener className="org.apache.catalina.core.AprLifecycleListener" SSLEngine="on" />
  <!-- Prevent memory leaks due to use of particular java/javax APIs-->
  <Listener className="org.apache.catalina.core.JreMemoryLeakPreventionListener" />
  <Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />
  <Listener className="org.apache.catalina.core.ThreadLocalLeakPreventionListener" />

  <!-- Global JNDI resources
       Documentation at /docs/jndi-resources-howto.html
  -->
  <GlobalNamingResources>
    <!-- Editable user database that can also be used by
         UserDatabaseRealm to authenticate users
    -->
    <Resource name="UserDatabase" auth="Container"
              type="org.apache.catalina.UserDatabase"
              description="User database that can be updated and saved"
              factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
              pathname="conf/tomcat-users.xml" />
  </GlobalNamingResources>

  <!-- A "Service" is a collection of one or more "Connectors" that share
       a single "Container" Note:  A "Service" is not itself a "Container",
       so you may not define subcomponents such as "Valves" at this level.
       Documentation at /docs/config/service.html
   -->
  <Service name="Catalina">

    <!--The connectors can use a shared executor, you can define one or more named thread pools-->
    <!--
    <Executor name="tomcatThreadPool" namePrefix="catalina-exec-"
        maxThreads="150" minSpareThreads="4"/>
    -->


    <!-- A "Connector" represents an endpoint by which requests are received
         and responses are returned. Documentation at :
         Java HTTP Connector: /docs/config/http.html
         Java AJP  Connector: /docs/config/ajp.html
         APR (HTTP/AJP) Connector: /docs/apr.html
         Define a non-SSL/TLS HTTP/1.1 Connector on port 8080
    -->
    <Connector address="localhost" port="8080" protocol="HTTP/1.1"
               connectionTimeout="20000"
               redirectPort="8443"
               relaxedQueryChars="[,]" />
    <!-- A "Connector" using the shared thread pool-->
    <!--
    <Connector executor="tomcatThreadPool"
               port="8080" protocol="HTTP/1.1"
               connectionTimeout="20000"
               redirectPort="8443" />
    -->
    <!-- Define a SSL/TLS HTTP/1.1 Connector on port 8443
         This connector uses the NIO implementation. The default
         SSLImplementation will depend on the presence of the APR/native
         library and the useOpenSSL attribute of the
         AprLifecycleListener.
         Either JSSE or OpenSSL style configuration may be used regardless of
         the SSLImplementation selected. JSSE style configuration is used below.
    -->
    <!--
    <Connector port="8443" protocol="org.apache.coyote.http11.Http11NioProtocol"
               maxThreads="150" SSLEnabled="true">
        <SSLHostConfig>
            <Certificate certificateKeystoreFile="conf/localhost-rsa.jks"
                         type="RSA" />
        </SSLHostConfig>
    </Connector>
    -->
    <!-- Define a SSL/TLS HTTP/1.1 Connector on port 8443 with HTTP/2
         This connector uses the APR/native implementation which always uses
         OpenSSL for TLS.
         Either JSSE or OpenSSL style configuration may be used. OpenSSL style
         configuration is used below.
    -->
    <!--
    <Connector port="8443" protocol="org.apache.coyote.http11.Http11AprProtocol"
               maxThreads="150" SSLEnabled="true" >
        <UpgradeProtocol className="org.apache.coyote.http2.Http2Protocol" />
        <SSLHostConfig>
            <Certificate certificateKeyFile="conf/localhost-rsa-key.pem"
                         certificateFile="conf/localhost-rsa-cert.pem"
                         certificateChainFile="conf/localhost-rsa-chain.pem"
                         type="RSA" />
        </SSLHostConfig>
    </Connector>
    -->

    <!-- Define an AJP 1.3 Connector on port 8009 -->
    <!--
    <Connector port="8009" protocol="AJP/1.3" redirectPort="8443" />
    -->


    <!-- An Engine represents the entry point (within Catalina) that processes
         every request.  The Engine implementation for Tomcat stand alone
         analyzes the HTTP headers included with the request, and passes them
         on to the appropriate Host (virtual host).
         Documentation at /docs/config/engine.html -->

    <!-- You should set jvmRoute to support load-balancing via AJP ie :
    <Engine name="Catalina" defaultHost="localhost" jvmRoute="jvm1">
    -->
    <Engine name="Catalina" defaultHost="localhost">

      <!--For clustering, please take a look at documentation at:
          /docs/cluster-howto.html  (simple how to)
          /docs/config/cluster.html (reference documentation) -->
      <!--
      <Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster"/>
      -->

      <!-- Use the LockOutRealm to prevent attempts to guess user passwords
           via a brute-force attack -->
      <Realm className="org.apache.catalina.realm.LockOutRealm">
        <!-- This Realm uses the UserDatabase configured in the global JNDI
             resources under the key "UserDatabase".  Any edits
             that are performed against this UserDatabase are immediately
             available for use by the Realm.  -->
        <Realm className="org.apache.catalina.realm.UserDatabaseRealm"
               resourceName="UserDatabase"/>
      </Realm>

      <Host name="localhost"  appBase="webapps"
            unpackWARs="true" autoDeploy="true">

        <!-- SingleSignOn valve, share authentication between web applications
             Documentation at: /docs/config/valve.html -->
        <!--
        <Valve className="org.apache.catalina.authenticator.SingleSignOn" />
        -->

        <!-- Access log processes all example.
             Documentation at: /docs/config/valve.html
             Note: The pattern used is equivalent to using pattern="common" -->
        <Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
               prefix="localhost_access_log" suffix=".txt"
               pattern="%h %l %u %t &quot;%r&quot; %s %b" />

      </Host>
    </Engine>
  </Service>
</Server>

1 Like

Hi @SDKAAA

Sorry for the slow response. Could you try adding the scheme to the connector in the server.xml file?

Note: I don’t know if this will help, but we had a similar issue a little while ago - I only saw it on one server, and not everyone else could see the issue, but after the update above I didn’t get the issue again.

2 Likes

thanks @phil and @Edward_Robinson
i actually managed to initiate the isolation of the problem:
when i am using the certs and https as installed by certbot it doesn’t work;
however when i use http only it works.
so maybe it is something in this direction?
appreciate your support.

content of /etc/letsencrypt/options-ssl-nginx.conf : (last line trimmed obviously because it is too long)

ssl_session_cache shared:le_nginx_SSL:1m;
ssl_session_timeout 1440m;

ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_prefer_server_ciphers on;

ssl_ciphers "ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:D$


Probably there is your error?
Have you verified that this has been replaced and/or that your certificates are there?

You mean < domain name >?
Those i edited manually before publishing here.
And yes they do exist and the server provides access through https until right after login, where I believe some requests are being done http only which could be what is creating the problem.
Anyone has an idea?

HTTP working
HTTPS not working
So I reinstalled everything from scratch and still facing the same problem: dhis2 loads and gets stuck up until after sign in while using https; but works fine on http and on localhost:8080 (through SSH tunneling)

I have prepared all of the files and logs and configurations and versions and can send privately in the hope that someone will be able to assist :pray:

There are some errors in catalina that i believe are not related but please do let me know.

I believe the problem lies in the console errors that exist in the https but not the http:

136.68ccf293.chunk.js:2 Mixed Content: The page at 'https://mydomain/dhis-web-dashboard/#/' was loaded over HTTPS, but requested an insecure resource 'http://mydomain/api/32/dashboards?fields=id%2Cname%2CdisplayName%2Cdescription%2CdisplayDescription%2Cfavorite%2Cuser%5Bid%2CdisplayName~rename(name)%5D%2Ccreated%2ClastUpdated%2Caccess%2CdashboardItems%5Bid%5D&paging=false'. This request has been blocked; the content must be served over HTTPS.
(anonymous) @ 136.68ccf293.chunk.js:2
value @ 136.68ccf293.chunk.js:2
value @ 136.68ccf293.chunk.js:2
value @ 136.68ccf293.chunk.js:2
(anonymous) @ dashboards.js:5
Promise.then (async)
(anonymous) @ dashboards.js:5
(anonymous) @ 136.68ccf293.chunk.js:2
fetchDashboards @ App.js:68
componentDidMount @ App.js:19
is @ 137.c42d494d.chunk.js:2
pl @ 137.c42d494d.chunk.js:2
t.unstable_runWithPriority @ 137.c42d494d.chunk.js:2
Ur @ 137.c42d494d.chunk.js:2
fl @ 137.c42d494d.chunk.js:2
Js @ 137.c42d494d.chunk.js:2
(anonymous) @ 137.c42d494d.chunk.js:2
t.unstable_runWithPriority @ 137.c42d494d.chunk.js:2
Ur @ 137.c42d494d.chunk.js:2
Vr @ 137.c42d494d.chunk.js:2
Br @ 137.c42d494d.chunk.js:2
Zs @ 137.c42d494d.chunk.js:2
mo @ 137.c42d494d.chunk.js:2
(anonymous) @ 136.68ccf293.chunk.js:2
async function (async)
(anonymous) @ 136.68ccf293.chunk.js:2
Promise.then (async)
(anonymous) @ 136.68ccf293.chunk.js:2
rs @ 137.c42d494d.chunk.js:2
gl @ 137.c42d494d.chunk.js:2
t.unstable_runWithPriority @ 137.c42d494d.chunk.js:2
Ur @ 137.c42d494d.chunk.js:2
ml @ 137.c42d494d.chunk.js:2
Js @ 137.c42d494d.chunk.js:2
(anonymous) @ 137.c42d494d.chunk.js:2
t.unstable_runWithPriority @ 137.c42d494d.chunk.js:2
Ur @ 137.c42d494d.chunk.js:2
Vr @ 137.c42d494d.chunk.js:2
q @ 137.c42d494d.chunk.js:2
k.port1.onmessage @ 137.c42d494d.chunk.js:2
136.68ccf293.chunk.js:2 Server connection error: TypeError: Failed to fetch
(anonymous) @ 136.68ccf293.chunk.js:2
Promise.catch (async)
(anonymous) @ 136.68ccf293.chunk.js:2
value @ 136.68ccf293.chunk.js:2
value @ 136.68ccf293.chunk.js:2
value @ 136.68ccf293.chunk.js:2
(anonymous) @ dashboards.js:5
Promise.then (async)
(anonymous) @ dashboards.js:5
(anonymous) @ 136.68ccf293.chunk.js:2
fetchDashboards @ App.js:68
componentDidMount @ App.js:19
is @ 137.c42d494d.chunk.js:2
pl @ 137.c42d494d.chunk.js:2
t.unstable_runWithPriority @ 137.c42d494d.chunk.js:2
Ur @ 137.c42d494d.chunk.js:2
fl @ 137.c42d494d.chunk.js:2
Js @ 137.c42d494d.chunk.js:2
(anonymous) @ 137.c42d494d.chunk.js:2
t.unstable_runWithPriority @ 137.c42d494d.chunk.js:2
Ur @ 137.c42d494d.chunk.js:2
Vr @ 137.c42d494d.chunk.js:2
Br @ 137.c42d494d.chunk.js:2
Zs @ 137.c42d494d.chunk.js:2
mo @ 137.c42d494d.chunk.js:2
(anonymous) @ 136.68ccf293.chunk.js:2
async function (async)
(anonymous) @ 136.68ccf293.chunk.js:2
Promise.then (async)
(anonymous) @ 136.68ccf293.chunk.js:2
rs @ 137.c42d494d.chunk.js:2
gl @ 137.c42d494d.chunk.js:2
t.unstable_runWithPriority @ 137.c42d494d.chunk.js:2
Ur @ 137.c42d494d.chunk.js:2
ml @ 137.c42d494d.chunk.js:2
Js @ 137.c42d494d.chunk.js:2
(anonymous) @ 137.c42d494d.chunk.js:2
t.unstable_runWithPriority @ 137.c42d494d.chunk.js:2
Ur @ 137.c42d494d.chunk.js:2
Vr @ 137.c42d494d.chunk.js:2
q @ 137.c42d494d.chunk.js:2
k.port1.onmessage @ 137.c42d494d.chunk.js:2
index.js:4 Error:  Server connection failed for API request: GET http://mydomain/api/32/dashboards?fields=id%2Cname%2CdisplayName%2Cdescription%2CdisplayDescription%2Cfavorite%2Cuser%5Bid%2CdisplayName~rename(name)%5D%2Ccreated%2ClastUpdated%2Caccess%2CdashboardItems%5Bid%5D&paging=false
dashboards.js:35 Uncaught (in promise) TypeError: Cannot read property 'toArray' of undefined
    at dashboards.js:35
(anonymous) @ dashboards.js:35
async function (async)
(anonymous) @ dashboards.js:8
(anonymous) @ 136.68ccf293.chunk.js:2
fetchDashboards @ App.js:68
componentDidMount @ App.js:19
is @ 137.c42d494d.chunk.js:2
pl @ 137.c42d494d.chunk.js:2
t.unstable_runWithPriority @ 137.c42d494d.chunk.js:2
Ur @ 137.c42d494d.chunk.js:2
fl @ 137.c42d494d.chunk.js:2
Js @ 137.c42d494d.chunk.js:2
(anonymous) @ 137.c42d494d.chunk.js:2
t.unstable_runWithPriority @ 137.c42d494d.chunk.js:2
Ur @ 137.c42d494d.chunk.js:2
Vr @ 137.c42d494d.chunk.js:2
Br @ 137.c42d494d.chunk.js:2
Zs @ 137.c42d494d.chunk.js:2
mo @ 137.c42d494d.chunk.js:2
(anonymous) @ 136.68ccf293.chunk.js:2
async function (async)
(anonymous) @ 136.68ccf293.chunk.js:2
Promise.then (async)
(anonymous) @ 136.68ccf293.chunk.js:2
rs @ 137.c42d494d.chunk.js:2
gl @ 137.c42d494d.chunk.js:2
t.unstable_runWithPriority @ 137.c42d494d.chunk.js:2
Ur @ 137.c42d494d.chunk.js:2
ml @ 137.c42d494d.chunk.js:2
Js @ 137.c42d494d.chunk.js:2
(anonymous) @ 137.c42d494d.chunk.js:2
t.unstable_runWithPriority @ 137.c42d494d.chunk.js:2
Ur @ 137.c42d494d.chunk.js:2
Vr @ 137.c42d494d.chunk.js:2
q @ 137.c42d494d.chunk.js:2
k.port1.onmessage @ 137.c42d494d.chunk.js:2

About DHIS2:

System info
Current user	admin
Version	2.35.1
Build revision	bca7d7b
Build date	December 14, 2020, 13:25
Jasper reports version	6.3.1
User agent	Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.104 Safari/537.36
Server date	January 27, 2021, 24:07
Last analytics table generation	Never
Environment variable	DHIS2_HOME
System ID	c958bade-a1d2-449f-83d9-b97bd67206fa
Last monitoring success	Never
External configuration directory	/home/dhisusr/config
File store provider	filesystem
Java opts	-Xmx3600m -Xms2000m -Djdk.tls.ephemeralDHKeySize=2048 -Djava.protocol.handler.pkgs=org.apache.catalina.webresources -Dorg.apache.catalina.security.SecurityListener.UMASK=0027
Java version	1.8.0_275
Java vendor	Private Build
OS name	Linux
OS architecture	amd64
OS version	4.15.0-134-generic
Memory info	Mem Total in JVM: 2543 Free in JVM: 1776 Max Limit: 3200
CPU cores	4
Calendar	iso8601

Database
Spatial support	true

server hosted on behind HyperV on a physical server in our premises with available RAM: 10GB: 2 for OS 4 for psql and 4 for tomcat

Thank you in advance for your help.
We are trying to set this server within the Lebanese Red Cross for the Disaster Management in Beirut following the explosion that happened in Beirut on 04 Aug 2020.

list of files prepared for helping in comparison:
image

Hi @SDKAAA ,

Send me a PM with your config and I’ll try to set up an equivalent env to test.
(I take it you tried the tomcat scheme setting I mentioned?).

Kind regards,
Phil

I just wanted to report back on this thread that after looking more closely at @SDKAAA 's configuration we found the cause of this issue. It is actually visible in the nginx config posted above; the problem is the line setting the protocol to http:

      proxy_set_header          X-Forwarded-Proto  http;

This needs to be https, or the line omitted altogether.

regards,
Phil

3 Likes

Dear @phil ,

I am also facing same issue in 2.36.7 version and i am use window server.

Thanks and Regards

Mithilesh Kumar Thakur

Hi @Mithilesh_Kumar_Thak
Please add more info about the issue! If it’s the same issue could you please check where the proxy_set_header is and change it to X-Forwarded-Proto https;

Thanks @phil! (:

I hope it works! Thanks!

1 Like

I was facing same issue and this save my life! thanks @phil

1 Like

Thank you, you saved me

1 Like