agross/immich-duplicates

immich-duplicates-browser reports 404 not found for every asset

Closed this issue · 10 comments

Qhilm commented

Error I see for every picture under http://localhost:8080/:

ID 001be5c2-d6de-40be-aacd-3a12e0b4095c

{"status":404,"data":{"message":"Cannot GET /api/asset/001be5c2-d6de-40be-aacd-3a12e0b4095c","error":"Not Found","statusCode":404,"correlationId":"2xapx4ni"},"headers":{}}

If I load https://my.immich.url:port/api/asset/001be5c2-d6de-40be-aacd-3a12e0b4095c in a browser, I also get a 404.

What else could I test to troubleshoot this?

You can have a look at the setting page. I believe some URL is not configured correctly. I. E. the base URL ending in /api.

Qhilm commented

To make sure I am not having any typos, I copied the URL I have open in my browser when I log in, removed /photos at the end and replaced it with /api.

I still get a 404 not found for every single photo.

Qhilm commented

One more thing:

is --env IMMICH_URL=https://my.immich.url:12345 required if I have CORS configured? You seemed to indicate this in our last exchange, but the GUI of immich-duplicates-browser is saying:

so it seems to indicate that --env IMMICH_URL=https://my.immich.url:12345 is not required if CORS is configured?

To make sure I am not having any typos, I copied the URL I have open in my browser when I log in, removed /photos at the end and replaced it with /api.

IIRC there are 2 URLs on the setup screen, one for the API and one to display assets (likely called base URL, can't remember off the top of my head).

is --env IMMICH_URL=https://my.immich.url:12345 required if I have CORS configured?

As your said in #25 otherwise the container will not start, because nginx can't resolve the example URL's host. So yes, it is required, but not from a technical perspective since with CORS you likely don't use Immich's nginx-proxied API.

Qhilm commented

IIRC there are 2 URLs on the setup screen, one for the API and one to display assets (likely called base URL, can't remember off the top of my head).

Yes, there is the "API Endpoint URL" (first one) and "base URL" (which is not required if CORS has been configured).

I configured both anyway:

  • API Endpoint URL set to https://my.immich.url:12345/api
  • base URL set to https://my.immich.url:12345
Qhilm commented

Seems a new API was introduced in v1.106.1:

https://github.com/immich-app/immich/releases/tag/v1.106.1

Other projects have been impacted with similar symptoms:

immichFrame/ImmichFrame#86

Could it be this?

I configured both anyway:

These look good.

Seems a new API was introduced in v1.106.1:

New APIs won't be problematic, but some Immich release changed/moved the "asset details" API. I've made fixes (fa1b159) and the docker images are currently building. Please try again with the new ones.

66c02d6 also contains a fix where the default IMMICH_URL (baked into the docker image) won't cause the container to refuse to start up.

Qhilm commented

I pulled the latest image and I do not have the issue that the container refuses to start when the URL is not defined anymore.

Unfortunately, under http://localhost:8080, I see text like this:

ID 00067c0d-9a08-4861-95e2-54afcfc5e8cb
{}

where the pictures should be. The error "2 failed to load" is visible above it also. I tested firefox and chrome, same issue.

The docker container write log lines like this, I did not see an error:

172.17.0.1 - - [02/Sep/2024:15:09:07 +0000] "GET / HTTP/1.1" 200 432 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36"
Qhilm commented

Ignore – I had updated to DSM 7.2.2 and this undid all the changes I had made to enabled CORS, I had to enable it all over again.

It works as expected now. Thanks!