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

Unable to load WebUI #90

Closed
stomko11 opened this issue Jan 5, 2024 · 29 comments
Closed

Unable to load WebUI #90

stomko11 opened this issue Jan 5, 2024 · 29 comments

Comments

@stomko11
Copy link

stomko11 commented Jan 5, 2024

Not sure what is going on - I am using docker image on my Unraid server. About 2 days ago, everything worked fine. Today, i was not able to load UI anymore. I thought OK - maybe something went wrong with the docker image. I redownloaded image, no luck. Tried resotirng backup of database from few days ago (multiple versions) - no luck either.
I decided to spin new docker image - but issue remains - when I open web page, it is just blank.

This is all I get in logs:

2024/01/05 20:41:08 /config/hammond.db
2024/01/05 20:41:08 Config Dir:  /config
2024/01/05 20:41:08 Assets Dir:  /assets

2024/01/05 20:41:08 /api/db/migrations.go:39 record not found
[0.078ms] [rows:0] SELECT * FROM `migrations` WHERE name="2022_03_08_13_16_AddVIN" ORDER BY `migrations`.`id` LIMIT 1
ALTER TABLE vehicles ADD COLUMN vin text

2024/01/05 20:41:08 /api/db/migrations.go:42 duplicate column name: vin
[0.008ms] [rows:0] ALTER TABLE vehicles ADD COLUMN vin text
[GIN] 2024/01/05 - 20:41:16 | 200 |    1.740205ms |  192.168.88.154 | GET      "/api/system/status"
[GIN] 2024/01/05 - 20:46:10 | 304 |    1.354889ms |  192.168.88.154 | GET      "/"
[GIN] 2024/01/05 - 20:46:10 | 200 |    1.633959ms |  192.168.88.154 | GET      "/api/system/status"

I did not have any other updates.
I also noticed that docker image has been updated yesterday, so I tried to use version before that - alfhou/hammond:v0.0.21 but result is the same. i am clueless.

Anyone has any idea?

@alienp4nda
Copy link
Collaborator

Would you mind providing your docker configuration you’re using? Be sure to remove any secrets you may have in your configuration.

@stomko11
Copy link
Author

stomko11 commented Jan 5, 2024

Not sure i can locate config in UI, as in unraid it is UI-based, but here is what i get when I do force update on docker image:

docker run
  -d
  --name='hammond'
  --net='br0'
  --ip='X.X.X.X'
  -e TZ="Europe/Budapest"
  -e HOST_OS="Unraid"
  -e HOST_HOSTNAME="Tower"
  -e HOST_CONTAINERNAME="hammond"
  -e 'TCP_PORT_3000'='3000'
  -e 'Community_Applications_Conversion'='true'
  -l net.unraid.docker.managed=dockerman
  -l net.unraid.docker.webui='http://[IP]:[PORT:3000]/'
  -v '/mnt/user/appdata/hammond/config':'/config':'rw'
  -v '/mnt/user/appdata/hammond/assets':'/assets':'rw' 'alfhou/hammond:latest'

It is literally just TCP port, and 2 paths for /config and /assets that I pass from host.
Interestingly, i tried downloading hammond on one of other unraid servers that I have around, that did not have hammond before. Same issue is happening there, just blank screen regardless if i use network type host, bridge, br0 or anything else (btw I use often br0 and assign IPs to my dockers)

@alienp4nda
Copy link
Collaborator

alienp4nda commented Jan 5, 2024 via email

@alienp4nda
Copy link
Collaborator

alienp4nda commented Jan 5, 2024 via email

@stomko11
Copy link
Author

stomko11 commented Jan 6, 2024

OK so i have tested bridge again - in the bridge mode it is using `-p '3000:3000/tcp' and it does not work anyway. I switched back to using br0 and assigned IP, and removed port completely - as with br0 it does not show any container value. Buth in both cases it is not loading anything.
I do not agree that according to the logs from docker, it does not seem like anything is connecting....
This is from docker logs, 192.168.88.154 is my client's IP:

GIN] 2024/01/06 - 01:21:23 | 200 |    2.116205ms |  192.168.88.154 | GET      "/api/system/status"
[GIN] 2024/01/06 - 01:21:33 | 304 |     564.052µs |  192.168.88.154 | GET      "/"
[GIN] 2024/01/06 - 01:21:33 | 200 |     236.149µs |  192.168.88.154 | GET      "/api/system/status"
[GIN] 2024/01/06 - 01:21:43 | 304 |    1.422493ms |  192.168.88.154 | GET      "/"
[GIN] 2024/01/06 - 01:21:43 | 200 |    1.452991ms |  192.168.88.154 | GET      "/api/system/status"

In the console, I get following:
image

image

Not sure if these errors I see there are any helpful

edit: i am definitely making connection to the hammond instance, as when I try to load it, I see logs, when for instance i navigate to some of my URLs from history (/vehicle/...) docker logs HTTP 200 code such as it would serve back the content, however my page in browser/incognito/PC/phone is blank.
I have tried various PCs, phones, browsers, nothing is changing the result...

When I try from older phone that I never used to access Hammond, it loads page header and favicon.
What bugs me is that this happened out of nowhere - the only thing that may have happened was that docker image was updated (i have auto update, so i can't tell whether it did or not) but still - if i use tag for specific version from before it was updated, it should fetch that version and in case new update caused it, it should work straight away with previous version, but it does not. This is what bugs me the most.

@alienp4nda
Copy link
Collaborator

alienp4nda commented Jan 6, 2024 via email

@Phaeton
Copy link

Phaeton commented Jan 6, 2024

I am seeing the exact same issue on a Debian host. Looks like the assets folder got cleared somehow. Reverting back to v0.0.21 got me back up and running.

@stomko11
Copy link
Author

stomko11 commented Jan 6, 2024

Yes, i can see both /assets and /conig from docker container, and I see the content that i should.
@Phaeton but how is docker image version relevant here? These 2 paths are mounted from host anyway, regardless of image.

btw - /assets is empty for me. But it is even with new install docker (and nothing works anyway, regardless if using :latest tag or alfhou/hammond:v0.0.21

I even tried docker run -d -p 3000:3000 --name=hammond alfhou/hammond without mounting any paths for testing, and it is acting the exact same way

I am clueless. I've got quite some experience with docker, unraid, and all that, and this is driving me nuts. Stopped working out of nowhere. I would understand if maybe my unraid instance got broken somehow. But it is not working on any other either.

@alienp4nda
Copy link
Collaborator

@stomko11 it's not you or your setup. My PR #89 I created yesterday will resolve this issue, which is that da.json was missing some commas.

If you'd like a workaround until the PR is merged let me know. You'd have to clone this repo, make the changes, and then build the image.

@stomko11
Copy link
Author

stomko11 commented Jan 6, 2024

I will wait until it is merged

@alienp4nda
Copy link
Collaborator

Just to clarify for anyone else reading this thread. The /asset folder will remain empty unless you utilize the Quick Entry feature.

da.json is transpiled into js chunks during the npm build process. Since it's currently malformed, this is causing issues but not failing during the build.

@thehijacker
Copy link

I have started fresh and too are getting issues with WebUI not loading. My docker compose:

  hammond:
    image: alfhou/hammond
    container_name: hammond
    volumes:
      - /mnt/usb_1/Docker/Hammond/config:/config
      - /mnt/usb_1/Docker/Hammond/data:/assets
    ports:
      - 3003:3000
    restart: unless-stopped

In browser console I get a:

app.159cdb8d.js:1 Uncaught Error: Cannot find module './da.json'
    at app.159cdb8d.js:1:9754
    at 21aa (app.159cdb8d.js:1:9832)
    at l (bootstrap:89:22)
    at s (locales sync [A-Za-z0-9-_,\s]+\.json$/:11:9)
    at i18n.js:13:28
    at Array.forEach (<anonymous>)
    at b (i18n.js:9:20)
    at 56d7 (i18n.js:22:15)
    at l (bootstrap:89:22)
    at 0 (app.159cdb8d.js:1:4229)

@alienp4nda
Copy link
Collaborator

PR #89 needs to be merged and then a new docker image built and published to docker hub.

@kazzaw
Copy link

kazzaw commented Jan 8, 2024

Yep - Also having the issue, aware of the PR. Just commenting so I get a notification when issue is closed

@stomko11
Copy link
Author

Is there an estimate when this will be merged? Basically I am stuck now, reverting to older image does not work for me.

@mada199122
Copy link

I have this issue too:(

@sebortner
Copy link

sebortner commented Jan 11, 2024 via email

@stomko11
Copy link
Author

For some reason, reverting to previous image does not work for me.

@alienp4nda
Copy link
Collaborator

If y'all don't mind building the docker image locally until @AlfHou is able to merge let me know. I'll provide the steps and help where I can. The changes aren't difficult and building is easy.

@mada199122
Copy link

Could you push a fixed image to docker hub please?

@alienp4nda
Copy link
Collaborator

I would if I could, but I don't have the permissions to do so.

@mada199122
Copy link

I think you should fork it to do so…

@alienp4nda
Copy link
Collaborator

@mada199122 it's only been a week since the PR was made. I think we can give Alf a bit more time. Again, if it's needed right now I can provide the steps to build it locally in the mean time.

@mada199122
Copy link

mada199122 commented Jan 11, 2024

Yep of course, just in case it remains unsolved for a longer period

@AlfHou
Copy link
Owner

AlfHou commented Jan 11, 2024

Sorry didn't see this issue before now. I think I need to fix my notification settings. I'll get the PR merged as soon as I get to my computer today.

Also, maybe I can look into letting @alienp4nda merge PRs and publish images as well. Hopefully the project will be a bit better maintained. Again, sorry for that

@AlfHou
Copy link
Owner

AlfHou commented Jan 11, 2024

The PR is merged, and a new image should be published. It seems to be working, but I'll leave the issue open until I get confirmation from more people.

Again, sorry. I should've tested the previous release better. I'll strive to not let it happen again.

@stomko11
Copy link
Author

I have tested now and it works for me. Thank you.

1 similar comment
@jonathanathe
Copy link

I have tested now and it works for me. Thank you.

@mada199122
Copy link

It works for me too!!! super thanks!!!

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

9 participants