MutinyWallet / mutiny-deploy

4 stars 1 forks source link

Unable to update (mutiny-web crashes) #6

Closed ghost closed 4 months ago

ghost commented 5 months ago

Wanted to test the new UI, so I ran my usual steps:

  1. git pull && docker-compose pull
  2. docker-compose up -d
image

Busy digging but just wanted to flag in the meantime

ghost commented 5 months ago

docker --version Docker version 26.0.0, build 2ae903e

benthecarman commented 5 months ago

hmm it works for me, maybe try docker-compose down and then docker system prune

ghost commented 5 months ago

I simply did docker-compose down followed by docker-compose up -d and that didn't result in the error.

Not sure if I should rather close this and open a new issue, buuuut... I now seem to have the new UI! Although it seems i18n strings aren't resolving... safari issue perhaps?

image

benthecarman commented 5 months ago

hmm that's weird, seems images aren't loading either. It loads correctly when I deploy from my laptop. Maybe try restarting again or going into settings and setting an explicit language

ghost commented 5 months ago

Thanks for the assist!

Neither of those worked :-\

I'm running docker-compose up now so that I can see logs, and seems there are some useful ones:

nginx_1     | 2024/04/02 18:08:02 [error] 25#25: *6 open() "/etc/nginx/html/mutiny-pixel-logo.png" failed (2: No such file or directory), client: REDACTED, server: , request: "GET /mutiny-pixel-logo.png HTTP/1.0", host: "REDACTED", referrer: "REDACTED"

also

nginx_1     | 2024/04/02 18:08:02 [error] 25#25: *8 open() "/etc/nginx/html/i18n/en.json" failed (2: No such file or directory), client: REDACTED, server: , request: "GET /i18n/en.json HTTP/1.0", host: "REDACTED", referrer: "https://REDACTED"
benthecarman commented 5 months ago

@futurepaul do you know what this could be?

futurepaul commented 5 months ago

Either the files in the /dist/public folder aren't being copied correctly, or they aren't being served? https://github.com/MutinyWallet/mutiny-web/blob/master/Dockerfile#L39

ghost commented 5 months ago

Is it safe to tear down my server setup and spin up a fresh instance? All the state is client-side (in the browser when using the PWA), right?

benthecarman commented 5 months ago

I'd recommend downloading your state file. It is in the emergency kit.

ghost commented 5 months ago

Before trying the nuclear option, I'm wondering whether it could be related to using the hidden site hosting config https://github.com/MutinyWallet/mutiny-deploy/blob/master/docs/hidden-site.md

ghost commented 5 months ago

I'd recommend downloading your state file. It is in the emergency kit.

@benthecarman I haven't dug into the internals of mutiny at all, so please bear with me 😅 Is it correct that 100% of my node's state is client-side? Like what's in the Postgres container, stuff like tx history, metadata etc?

i.e. is the below procedure safe:

  1. Download state file
  2. Tear down server (equivalent of sudo rm -rf /)
  3. Spin up new server
  4. Restore state file
ghost commented 5 months ago

@futurepaul FYI it seems the files were copied correctly. Tempted to tear down the whole thing at this point.

image

benthecarman commented 5 months ago

Yeah everything is in your state file. The postgres server and stuff is just your encrypted cloud storage.

ghost commented 5 months ago

Thanks. Unfortunately no luck, but believe I made some progress with this issue. Here's the procedure I followed:

  1. docker stop $(docker ps -aq)
  2. docker system prune -a --volumes
  3. git pull && docker-compose up -d

Same output as per screenshots above.

I then undid the hidden site setup i.e. reverted to https://myserver.com instead of https://myserver.com/hidden-path and everything works nicely.

So it does seem as if this is an issue with the hidden path config. Not sure what to do at this point, I might try digging into the hidden path config a bit but yeah, would be cool if you could perhaps test the hidden path setup on your side @benthecarman to see if it's still supported.

If there's a better way to self-host that isn't just "here's authless infra for everyone" I'm also open to switching to that.

benthecarman commented 4 months ago

Sorry about this @shyfire131 but was able to figure this out. We migrated some of how our translations work and this was missing from the special nginx config for hidden sites. I updated our docs, you need to add these magical couple characters

https://github.com/MutinyWallet/mutiny-deploy/commit/b139568aa741d8f69ca22755848a9670c5fd9404