immich-app / immich

High performance self-hosted photo and video management solution.
https://immich.app
GNU Affero General Public License v3.0
45.08k stars 2.18k forks source link

[BUG] When loading immich for the first time, I don't see the Register User screen #327

Closed FrankelJb closed 2 years ago

FrankelJb commented 2 years ago

Describe the bug When I load immich for the first time, the application begins on "Welcome to IMMICH Web" screen. However, when I click "Getting Started", instead of being able to register a user, I am taken straight to the Login screen without offering to register an administrator. I have checked in the database and there are no users there yet. I have also dropped the db and recreated the entire stack with same result.

It would be useful to either have CLI tools to manually edit users or to allow the web UI to navigate to the register page.

Task List

To Reproduce Steps to reproduce the behavior:

  1. Navigate to Welcome to IMMICH Web
  2. Click on 'Getting Started'
  3. WebUI renders http://immich-web/auth/login

Expected behavior I expect to either be able to manually navigate to the register page or be able to manually add users from the CLI.

Screenshots N/A

Desktop (please complete the following information):

Additional context I am running this on k3s using the same stack as the docker-compose example. This could be related to routing but there are no errors in the logs or in the console to indicate the something is misconfigured.

alextran1502 commented 2 years ago

Please don't use the latest tag in your docker-compose file on the containers. Please use the release tag instead.

Refer to the latest docker-compose file

alextran1502 commented 2 years ago

. I have checked in the database and there are no users there yet. I have also dropped the db and recreated the entire stack with same result.

This indicates you probably have the wrong docker-compose file because the production file doesn't expose the database port.

FrankelJb commented 2 years ago

I’ve changed the images the use the release tag and the problem persists.

I’m using a shared db for immich, I can connect to it using the command line.

alextran1502 commented 2 years ago

Can you share your redacted docker-compose file? Can you try to shutdown all Immich's related containers and perform the pull for all of them then start them up again?

FrankelJb commented 2 years ago

I'm running on kubernetes, so I took the docker-compose and turned it into what kubernetes refers to as Deployments. These are containers running on the underlying container runtime but it uses the docker images provided. I've changed the tags to use release and they're all running without any errors.

image

This shows they're all running (the green dot) with the running image.

aruhier commented 2 years ago

@FrankelJb : it happened for me, because I've left the /api at the end of the VITE_SERVER_ENDPOINT. Try to remove it, as it is written for the nginx frontend, which I guess you didn't set.

However, I think that the web app should raise an error in this case, because /api/user/count (which the app checks to redirect to the register page) returns a 404.

alextran1502 commented 2 years ago

@aruhier Thank you

@FrankelJb Let's try what @aruhier suggesst

FrankelJb commented 2 years ago

Thanks for the suggestion @aruhier. I am using the VITE_SERVER_ENDPOINT. I've tried using the nginx proxy image and without using a different reverse proxy and the same flow occurs.

If I try and navigate to https://immich/api/user/count it returns {"userCount":0}.

FrankelJb commented 2 years ago

I think I solved the issue. I was pointing the VITE_SERVER_ENDPOINT at server:3001/api. I changed it to proxy:2283/apil and now I can login.

sjdrc commented 2 years ago

Hey @FrankelJb

I'm running on kubernetes, so I took the docker-compose and turned it into what kubernetes refers to as Deployments.

I'm interested in running this on kubernetes, would you mind sharing your manifests?

aruhier commented 2 years ago

@sjdrc: Sure, I've uploaded it here: immich_k8s.tar.gz

At first I've split the API ingress in a subdomain, but now that Immich relies on sharing the cookies between the API and the web service for the authentication, I've merged them into the same domain but with 2 different ingress. It's because the API endpoint needs to have a redirect.

Naming the services the way I've named them is important for some, because Immich hardcodes some of them for the connection between services (I don't remember exactly which ones, but I was a bit surprised at first).

sjdrc commented 2 years ago

@aruhier Thank you very much!

jagsdkp commented 1 year ago

@alextran1502 - I have deployed the package using the recommended approach () and when I tried to access the URL for the first time, I get internal error 500.

Could you please help me?

Error code 500 Internal Error

Verbose

{"message":"Internal Error"}

alextran1502 commented 1 year ago

@alextran1502 - I have deployed the package using the recommended approach () and when I tried to access the URL for the first time, I get internal error 500.

Could you please help me?

@JAg

Error code 500

Internal Error

Verbose

{"message":"Internal Error"}

@jagsdkp please open a separate issue with the required info as well as logs from server and microservice containers. If your set up is unique please also provide additional contexts so we can help you