immich_duplicate_finder: Cannot connect to immich server

If I try to connect to my server with FAISS Index/DB, I always get this result:

HTTP error occurred: 404 Client Error: Not Found for url: https://ABCDEF.duckdns.org/api/asset/ HTTP error occurred: 404 Client Error: Not Found for url: https://ABCDEF.duckdns.org/api/asset/

Docker is unhealty and reports this:

 You can now view your Streamlit app in your browser.

0.0%
0.0%
0.0%
0.0%
0.0%
0.0%
0.0%
0.0%
0.0%
0.0%
0.0%
0.0%
0.0%
0.0%
0.1%
0.1%
0.1%
0.1%
0.1%
0.1%
0.1%
0.1%
0.1%
0.1%
0.1%
0.1%
0.1%
0.1%
0.1%
0.1%
0.1%
0.1%
0.1%
0.1%
0.1%
0.1%
0.1%
0.1%
0.1%
0.1%
0.1%
0.1%
0.1%
0.1%
0.2%
0.2%
0.2%
0.2%
0.2%
0.2%
0.2%
0.2%
0.2%
0.2%
0.2%
0.2%
0.2%
0.2%
0.2%
0.2%
0.2%
0.2%
0.2%
0.2%
0.2%
0.2%
0.2%
0.2%
0.2%
0.2%
0.2%
0.2%
0.2%
0.3%
0.3%
0.3%
0.3%
0.3%
0.3%
0.3%
0.3%
0.3%
0.3%
0.3%
0.3%
0.3%
0.3%
0.3%
0.3%
0.3%
0.3%
0.3%
0.3%
0.3%
0.3%
0.3%
0.3%
0.3%
0.3%
0.3%
0.3%
0.3%
0.3%
0.4%
0.4%
0.4%
0.4%
0.4%
0.4%
0.4%
0.4%
0.4%
0.4%
0.4%
0.4%
0.4%
0.4%
0.4%
0.4%
0.4%
0.4%
0.4%
0.4%
0.4%
0.4%
0.4%
0.4%
0.4%
0.4%
0.4%
0.4%
0.4%
0.5%
0.5%
0.5%
0.5%
0.5%
0.5%
0.5%
0.5%
0.5%
0.5%
0.5%
0.5%
0.5%
0.5%
0.5%
0.5%
[...]
100.0%
100.0%
100.0%
100.0%
/usr/local/lib/python3.12/site-packages/urllib3/connectionpool.py:1099: InsecureRequestWarning: Unverified HTTPS request is being made to host 'ABCDEF.duckdns.org'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#tls-warnings
  warnings.warn(
Downloading: "https://download.pytorch.org/models/resnet152-f82ba261.pth" to /root/.cache/torch/hub/checkpoints/resnet152-f82ba261.pth

I use nginx proxy manager, but what I need to do in order to get it running?

About this issue

Most upvoted comments

Hi! I noticed this project may no longer be actively maintained or compatible with the latest versions of Immich.

Just wanted to share an alternative I’ve been working on:
👉 immich-mediakit

  • AI-powered similarity detection to help clean up duplicates and near-duplicates
  • Batch media operations for organizing large libraries more efficiently
  • A focus on stability, simplicity (Python-based), and extensibility

Many tools in this space are either outdated or broken — this project aims to be a drop-in replacement for users still looking for a working solution.

If this post isn’t appropriate, feel free to remove it — just wanted to share in case it’s helpful to others 🙏
Feedback and contributions are always welcome!

While we wait for a new version, I inform you that on my profile is available the fork of the project in which the only difference is that I have reported the changes to the api.py file (you could also just download that and replace) reported by the users @derpderpington and @itribs in this thread.

update: 2024-10-06

Hey I got this working but had to update two more lines to get the deleting to work. See below to remove the “-” and add the “+” line in the api.py. deleteAsset method -url = f"{immich_server_url}/api/asset" +url = f"{immich_server_url}/api/assets" updateAsset method -url = f"{immich_server_url}/api/asset/{asset_id}" # Ensure the URL is constructed correctly +url = f"{immich_server_url}/api/assets/{asset_id}" # Ensure the URL is constructed correctly

as a personal temporary solution for myself: Comment out the ‘fetchAssets’ method in ‘api.py’ and add the following code:

@st.cache_data(show_spinner=True) 
def fetchAssets(immich_server_url, api_key, timeout, type):
    if 'fetch_message' not in st.session_state:
        st.session_state['fetch_message'] = ""
    message_placeholder = st.empty()

    assets = []

    base_url = immich_server_url.rstrip('/')
    asset_paths_url = f"{base_url}/api/view/folder/unique-paths"
    asset_info_url = f"{base_url}/api/view/folder"

    response = requests.get(asset_paths_url, headers={'Accept': 'application/json', 'x-api-key': api_key}, verify=False, timeout=timeout)
    response.raise_for_status()
    if response.status_code == 200:
        paths = response.json()
    else:
        st.session_state['fetch_message'] = 'Received an empty response.'
        paths = []

    for path in paths:
        if path:
            response = requests.get(f'{asset_info_url}?path={path}', headers={'Accept': 'application/json', 'x-api-key': api_key}, verify=False, timeout=timeout)
            if response.status_code == 200:
                assets.extend(response.json())
    
    assets = [asset for asset in assets if asset.get("type") == type]                       
    st.session_state['fetch_message'] = 'Assets fetched successfully!'
    message_placeholder.text(st.session_state['fetch_message'])

    return assets

update: 2024-10-06

modify the getImage function. find:

response = requests.request("GET", f"{immich_server_url}/api/asset/thumbnail/{asset_id}?format=JPEG", headers={'Accept': 'application/octet-stream','x-api-key': api_key}, data={})

replace:

response = requests.request("GET", f"{immich_server_url}/api/assets/{asset_id}/thumbnail?size=thumbnail", headers={'Accept': 'application/octet-stream','x-api-key': api_key}, data={})

I am getting exactly same error, immich version v1.111.0

HTTP error occurred: 404 Client Error: Not Found for url: http://192.168.XX.XX:2283/api/asset/ No assets found or failed to fetch assets.