Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Countly Dashboard does not show styles and action buttons #4556

Open
nav064 opened this issue Sep 20, 2023 · 4 comments
Open

Countly Dashboard does not show styles and action buttons #4556

nav064 opened this issue Sep 20, 2023 · 4 comments

Comments

@nav064
Copy link

nav064 commented Sep 20, 2023

Hi there!
I had installed Countly v 23.06.12.
The installation proceeds fine and no specific errors on countly/log/*.log.

After signing up for my account at https://<my_server_name>/setup
I'm automatically redirected to https://<my_server_name>/dashboard.
Note: I have enabled https on my nginx config. Also I have a proxy_pass to http://localhost:6001 as per countly/frontend/express/config.js as well on nginx config.

I'm seeing this page. (Check this attached image)
Screenshot from 2023-09-20 12-31-29

Seeing lot of errors like these on the developer tools console

...

Refused to execute script from 'https://api.samyojya.com/javascripts/min/countly.lib.js?23.06.12' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.

...

Refused to apply style from 'https://api.samyojya.com/stylesheets/main.min.css?23.06.12' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled.

...

Could not establish connection. Receiving end does not exist., sendMessage, [{"type":"CS_ASK_BG_8422","uid":"ipcp_1695193921459_227","cmd":"CS_ACTIVATE_ME","args":{}}]

Questions:

  1. Do we need to set something on the browser config?
  2. Is it possible it's because of any recent patches on countly or browser ?

Steps to Reproduce (for bugs)

  1. Install countly using
    sudo wget -qO- http://c.ly/install | bash

  2. Start mongo
    sudo service mongod start

  3. Start countly
    sudo countly start

I'm using Google Chrome (v 117.0.5938.88) on Ubuntu 22.04

@nav064 nav064 changed the title Countly Dashboard does not show styles Countly Dashboard does not show styles and action buttons Sep 20, 2023
@ar2rsawseen
Copy link
Member

Hello
It looks like it can load all the files except the production-minified files.
It may have had some problems minifying files.

You can try to re-minify production files again by running:

countly task dist-all

and providing us with the output if there are errors
or you can disable production mode and view the dashboard in development mode by running the command

countly config "frontend.production" false

@nav064
Copy link
Author

nav064 commented Sep 20, 2023

I am using a machine which has 1G RAM.
So running OOM for prod build.
Trying the dev mode @ar2rsawseen.
Now, it is looking like the app creation is failing with 404.
GET https://api.samyojya.com/i/apps/create?args=%7B%22timezone%22%3A%22Asia%2FCalcutta%22%2C%22key%22%3A%22d204981641a921bbab50e0a5b1184be5dad906e6%22%2C%22name%22%3A%22samyojya%22%2C%22type%22%3A%22web%22%2C%22country%22%3A%22IN%22%7D 404 (Not Found)

Mongo DB seems to be OK.
Double-checked that countly/frontend/express/public/javascripts/countly.config.js is OK.
May be it's something on the frontend express app? Should I look for something on countly/log/countly-api.log ? It seems to log lot of jobs.

@ar2rsawseen
Copy link
Member

ah yes, unfortunately, Sass and Uglify need lots of resources to build their things. So Dev mode is the way to go.

For app creation, it looks like /i/apps/create endpoint goes to the dashboard process on 6001 port, all endpoints that start with /i or /o should go to API workers on 3001 port, which usually indicate bad nginx config
It should look like this:
https://github.com/Countly/countly-server/blob/master/bin/config/nginx.server.conf#L8-L38

@nav064
Copy link
Author

nav064 commented Sep 21, 2023

Thanks for this, @ar2rsawseen.
That explains.
Strangely, my nginx error_log does not show a thing!
I copied the .conf to my nginx conf.
That does the rest of the magic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants