dashy icon indicating copy to clipboard operation
dashy copied to clipboard

[BUG] Dashy 3.0.0 not loading despite complete build

Open allesauseinerhand opened this issue 1 year ago • 37 comments
trafficstars

Environment

Self-Hosted (Docker)

System

Docker 26.0.0 (Portainer 2.19.4)

Version

3.0.0

Describe the problem

Thank you for the new and promising update to 3.0.0. But it seems, I have some trouble to get it to work:

  1. I changed the port from 80 to 8080 and the volume from /app/public to /app/user-data
  2. I pulled the new image and started the container
  3. The state of the container is healthy
  4. The logs seem to be fine too ("Config file is valid, no issues found"; "Using Dashy V-3.0.0. Update Check Complete"; "Build complete. The dist directory is ready to be deployed."). The only thing, that I'm not sure, if this is OK: the last line in the logs is "Check out deployment instructions at https://cli.vuejs.org/guide/deployment.html"
  5. When I try to open the service in the browser, it shows "Loading" for some seconds and then presents me with a message "It looks like something's gone wrong... This is likely caused by the app source not being found at the current domain. If you need additional support, check the browser console then raise a ticket"

Additional info

I attached the screenshot with the error message, the full logs and my docker compose instructions.

2024-04-20_15h11_29 _dashy_logs.txt dashy_docker_compose.txt

Please tick the boxes

allesauseinerhand avatar Apr 20 '24 13:04 allesauseinerhand

Can you paste the browser console output?

How long have you waited after the error message appeared, sometimes refreshing the page also resolved the issue.

CrazyWolf13 avatar Apr 20 '24 13:04 CrazyWolf13

Hi Tobias, thanks for looking at the issue. Here is the browser console output just logged after entering the url. It doesn't change when the error message appears. So probably no client-side problem.

[ContentMain] ContentMain.js:5 [ContentService] document.readyState: loading ContentMain.js:5 [ContentService.SetContentInitData] target: { TabId: 662559308, FrameId: 0}

allesauseinerhand avatar Apr 20 '24 13:04 allesauseinerhand

How long have you waited after the error message appeared, sometimes refreshing the page also resolved the issue.

I have waited several minutes, I did refresh (F5) and I tried in Chrome (Guest Mode) and MS Edge

allesauseinerhand avatar Apr 20 '24 16:04 allesauseinerhand

I changed my config to look like yours (with my paths) and had no issues with the 3.0 changes, loaded fine. I did need to map /app/public/ inside the container to get the icons to show up properly; possibly they would work inside user-data/ also. User-data/ needs the conf.yml file, and public/ needs fonts/, img/, item-icons/, etc. The docs on the 3.0 upgrade aren't... great so this took a couple mins to figure out properly.

My volumes line:

    volumes:
     - /opt/dashy/user-data/:/app/user-data/
     - /opt/dashy/public/:/app/public/

On a side note, man, dashy takes a crazy long time to start up. My relatively simple dashboard takes 55 seconds! I'm not running a rPi4 or anything underpowered either, it's a 7500T mini-desktop with tons of RAM and free CPU.

2024-04-20T16:58:21.719069075Z  DONE  Compiled successfully in 54820ms4:58:21 PM	 

rodalpho avatar Apr 20 '24 17:04 rodalpho

@rodalpho Thank you for your time to add a solution, that worked for you. Sadly it doesn't work for me. I did now map the two volumes, but it didn't change anything with my problem.

volumes:
 - /dockerdata-fast/config/homepage/dashy_public_dir:/app/user-data
 - /dockerdata-fast/config/homepage/dashy_public_dir:/app/public

By the way, this is the content of my dashy_public_dir folder: 2024-04-20_19h41_26

A question about your logs: is the last line of your log also "Check out deployment instructions at https://cli.vuejs.org/guide/deployment.html" or is it something else?

allesauseinerhand avatar Apr 20 '24 17:04 allesauseinerhand

Hey @allesauseinerhand Sorry you're having issues. It looks like your config isn't being passed to Docker correctly - If you visit [dashy-url]/conf.yml what you you see? Maybe the issue is because initially the paths were wrong, and so the initial (and only) build happened without a config. In which case, starting fresh should resolve it.

Lissy93 avatar Apr 20 '24 18:04 Lissy93

Thanks @rodalpho

. I did need to map /app/public/ inside the container to get the icons to show up properly; possibly they would work inside user-data/ also. User-data/ needs the conf.yml file, and public/ needs fonts/, img/, item-icons/, etc.

Both /public and /user-data basically resolve to the same place. So you shouldn't need to pass both in, just put all your customized assets into user-data


The docs on the 3.0 upgrade aren't... great so this took a couple mins to figure out properly

Sorry about that (I'm not great at writing docs!), if you have suggestions about how I can make this clearer, I will update them :)

Lissy93 avatar Apr 20 '24 18:04 Lissy93

@allesauseinerhand Yes my logs end with that line.

@Lissy93 No problem, not intending to criticize! I would note the expected file and directory structure for /app/user-data/, that's what had me stalled for a minute. IE, "It should contain conf.yml as well as the fonts, img, item-icons, etc directories".

rodalpho avatar Apr 20 '24 18:04 rodalpho

@Lissy93 Moving all the files I had in /app/public to /app/user-data and removing the mapping in my docker-compose broke dashy, and the app made its own public directory somehow. So I'm reverting that.

rodalpho avatar Apr 20 '24 18:04 rodalpho

Hey @allesauseinerhand Sorry you're having issues. It looks like your config isn't being passed to Docker correctly - If you visit [dashy-url]/conf.yml what you you see?

Hi @Lissy93 : Thanks for helping me with this. When I load this url, the conf.yml-file is showed in the browser as it probably should be.

But I supposed to found the reason, why it didn't work initially, which could help others with the same problem too: I use simple auth in the conf.yml:

appConfig:
  auth:
    users:
      - user: USERNAMECHANGED
        hash: HASHCHANGED
        type: admin
    enableGuestAccess: false

I now tried to enter [dashy_url]/login and then I see my dashboard. When I then enter again [dashy_url] the error is there again. So, next I went again to [dashy_url]/login, then logged out, logged in again. But even then, when I open [dashy_url], the same error comes up again. Next, I tried to delete the above auth-section in the config. But even then it doesn't work. I've at least now a workaround (entering [dashy_url]/login instead of [dashy_url]. But do you have any idea, what could be the reason for this strange behaviour?

allesauseinerhand avatar Apr 20 '24 18:04 allesauseinerhand

So two breaking changes on the docker image (2.1.2 -> 3.0.0) that it'd be great to have an in-built work around for, better start-up messaging around, or better documentation around these changes.

Thanks for all the work on this!

port 80 became port 8080 /app/public/conf.yml became /app/user-data/conf.yml

$ git diff services/dashy.yml
diff --git a/ansible/docker/services/dashy.yml b/ansible/docker/services/dashy.yml
index fe8f7ca..8195054 100644
--- a/ansible/docker/services/dashy.yml
+++ b/ansible/docker/services/dashy.yml
@@ -23,7 +23,8 @@
         state: started
         restart_policy: unless-stopped
         ports:
-          - '8989:80'
+          - '8989:8080'
         volumes:
-          - /root/data/dashy/config/conf.yml:/app/public/conf.yml
+          - /root/data/dashy/config/conf.yml:/app/user-data/conf.yml
           - /root/data/dashy/item-icons/:/app/public/item-icons/
+       # 2.1.2 and earlier was port 80 and conf.yml in /app/public, 3.0.0 it became 8080 and /app/user-data/conf.yml


tdeppner avatar Apr 20 '24 23:04 tdeppner

@tdeppner

It has been documented here:

https://github.com/Lissy93/dashy/discussions/1537 https://github.com/Lissy93/dashy/discussions/1529 And with a note on the main readme: image

Let us know if we should add any guide anywhere else.

CrazyWolf13 avatar Apr 21 '24 09:04 CrazyWolf13

So two breaking changes on the docker image (2.1.2 -> 3.0.0) that it'd be great to have an in-built work around for, better start-up messaging around, or better documentation around these changes.

I would have loved to be able to implement an automatic workaround for this, but it's unfortunately not possible.


No problem, not intending to criticize! I would note the expected file and directory structure for /app/user-data/, that's what had me stalled for a minute. IE, "It should contain conf.yml as well as the fonts, img, item-icons, etc directories".

Thanks for the feedback @rodalpho. Here are clearer docs, outlining structure of the user-data directory. Not merged yet, but will be included soon when I finish #1542


Just to check, is anyone still having issues getting 3.0.0 running?

Lissy93 avatar Apr 21 '24 22:04 Lissy93

I would have loved to be able to implement an automatic workaround for this, but it's unfortunately not possible.

Understood. Maybe a WARN message on docker start up if /app/public/conf.yml exists that might ask if this was intended, reference this bug, encourage folks the "new" location is /app/user-data, etc?

Just to check, is anyone still having issues getting 3.0.0 running?

It's fine for me, no concerns.

Thank you for a great product, and quick support. :)

tdeppner avatar Apr 21 '24 23:04 tdeppner

Understood. Maybe a WARN message on docker start up if /app/public/conf.yml exists that might ask if this was intended, reference this bug, encourage folks the "new" location is /app/user-data, etc?

Thanks @tdeppner - good feedback, I've implemented a build-time check in Docker that displays a lil message if there's a config issue, and for client-side issues I've made an update which will show exactly what the problem is. Both will be included when I merge #1542 later this week.

image


I'm going to close this ticket now, but if anyone is still having issues here, let me know below and I'll reopen.

Lissy93 avatar Apr 22 '24 00:04 Lissy93

Hi Alicia

Probably my previous message about the workaround was misleading, as you thought the problem is solved now. But it is still not working the normal way: When I go to [dashy_url] I still see the same error message as I showed in the first post of this thread. Only going to [dashy_url]/login leads me to the dashboard. Do you have any idea, what the reason could be or what information I should provide to find the rootcause of the problem?

allesauseinerhand avatar Apr 22 '24 08:04 allesauseinerhand

Hi to everybody. I got the exact same problem while opening Dashy without "/login". But there are two differences in my configs, I set "enableGuestAccess" to "true" and I enabled ssl with self-signed certificates, passing the 443 Port to Docker. With the "/login" link, i get to the Login page without a problem. Then I can open my Dashboard by entering my admin login data or by following the link to visit my Dashboard as a guest. Both methods are doing fine there, but I can`t open it with the normal "dashy-IP:port".

KetaiDenwa avatar Apr 24 '24 22:04 KetaiDenwa

Same issue here after upgrading my installation from v2 to v3. I'm not doing any authenication in Dashy at all. I use HTTP BASIC AUTH on my reverse proxy in front of Dashy. (Using Caddy)

[!TIP] I Can confirm the workaround with https://<url.to.my.dashy.instance>/login is working.

Issuse persists after completely trashing the existing container and image and recreating it from scratch to make sure everything is fully rebuilt from scratch. Hence I assume it's unrelated to upgrading from v2.

Unrelated to this issue, just a data point:
Starting the container takes several minutes and grabs 3+ vCores and over 4GB in the process during application build. About 10 Minutes after start it settles around 2.5GB RAM usage with little CPU usage when idle.

MacLemon avatar Apr 28 '24 12:04 MacLemon

Has anyone got any browser logs of this issue? As I'm struggling to recreate it I mean client-side logs, not server-side logs- here's how to view browser logs.

Lissy93 avatar Apr 28 '24 19:04 Lissy93

So I've just spun up a test vm with the default config, except I added basic auth.

When guest-acces is false, I get straight redirected to http://ip/login When guest-acces is true I get straight to the dashboard

RAM enableGuestAccess: trueusage for me was 1.5GB with 4.5GB assigned. CPU was 40% at max with 2 cores

So for me everything is working fine.

CrazyWolf13 avatar Apr 28 '24 19:04 CrazyWolf13

Try again now, I've pushed some updates in 3.0.1, everything should be resolved. If not, share the content of your browser logs, so I can debug further.

Lissy93 avatar Apr 29 '24 00:04 Lissy93

I am still required to go to /login else I have the generic loading page with 3.0.1

I have a screenshot of my console when I load the page here

Screenshot 2024-04-29 at 12 37 29 AM

Kirkland-gh avatar Apr 29 '24 04:04 Kirkland-gh

I have a screenshot of my console when I load the page here

Could you copy+paste them? I cannot seem to open that image.

CrazyWolf13 avatar Apr 29 '24 05:04 CrazyWolf13

I also have to add the /login to get the gui to load. Doesn't show much in the console: image

But when I add /login then it shows error 404 and then loads the page. image

HakanP avatar Apr 29 '24 07:04 HakanP

I have a screenshot of my console when I load the page here

Could you copy+paste them? I cannot seem to open that image.

I used a screen shot to show that my console is blank of everything but a favcon.ico loading error.

Kirkland-gh avatar Apr 29 '24 13:04 Kirkland-gh

@HakanP - this looks like a config issue. Could you share your config file?

@Kirkland-gh - This does look like a bug, but I'm not able to recreate it just yet, could you also share the relevant parts of your config so I can try with that?

Lissy93 avatar Apr 29 '24 14:04 Lissy93

  auth:
    enableGuestAccess: false
    users: []
    enableKeycloak: true
    keycloak:
      serverUrl: https://keycloak.example.com
      realm: example-realm
      clientId: example-clientid
      legacySupport: false

Kirkland-gh avatar Apr 29 '24 14:04 Kirkland-gh

That "Something gone wrong...."-page is if i just go to the dashy page by ip:port. If I then add /login then the page works and look just fine, so shouldn't be the config I think. I also don't have any authentication enabled.

HakanP avatar Apr 29 '24 15:04 HakanP

Has anyone got any browser logs of this issue? As I'm struggling to recreate it I mean client-side logs, not server-side logs- here's how to view browser logs.

Attached are two logs: index.log for when visiting url (showing error screen), login.log for when visiting url/login (showing login screen). And also I attached my docker compose file and my dashy conf (shortened and masked) index.log login.log docker-conf.txt dashy_conf.txt

allesauseinerhand avatar Apr 29 '24 17:04 allesauseinerhand

I have encountered the same issue with my Dashy. Attached is my config with sections removed/masked. Auth is not enabled.

  • Opening the dashboard directly (without /login) gives no logs whatsoever in the browser console, it's stuck at the main splash screen (and after a while the error message from the OP appears).
  • Accessing /login opens the dashboard properly (but doesn't fix the issue - it happens again when you refresh the page). Attached browser logs from this access (masked a bit).
  • Accessing /<anything that 404s> also allows access to the dashboard, with the difference that you have to click "Go back" on the 404 screen.

One thing I've noticed is that curl'ing the broken Dashy gives a broken index.html. It seems in my case the Dashy app is not being injected at all on the main / route (other than the timeout handler). On /login, I can see that the scripts/css are injected properly. Broken index.html attached. A locally deployed, freshly pulled image of Dashy does not exhibit this behavior; that is, curling both / and /login returns the same document (with Dashy scripts present).

I can do further testing with the broken setup if required.

conf.txt browser_logs_login.txt broken_index.html.txt

Muzuwi avatar Apr 29 '24 19:04 Muzuwi