API results not matching whats in database
Does anyone have any idea while I see two rows when querying the database directly as per below:
But when performing an API call to https://immich/api/search/metadata with:
I am getting 0 results:
13 Replies
:wave: Hey @Jack Brown,
Thanks for reaching out to us. Please carefully read this message and follow the recommended actions. This will help us be more effective in our support effort and leave more time for building Immich :immich:.
References
- Container Logs:
docker compose logs
docs
- Container Status: docker ps -a
docs
- Reverse Proxy: https://immich.app/docs/administration/reverse-proxy
- Code Formatting https://support.discord.com/hc/en-us/articles/210298617-Markdown-Text-101-Chat-Formatting-Bold-Italic-Underline#h_01GY0DAKGXDEHE263BCAYEGFJA
Checklist
I have...
1. :ballot_box_with_check: verified I'm on the latest release(note that mobile app releases may take some time).
2. :ballot_box_with_check: read applicable release notes.
3. :ballot_box_with_check: reviewed the FAQs for known issues.
4. :blue_square: reviewed Github for known issues.
5. :ballot_box_with_check: tried accessing Immich via local ip (without a custom reverse proxy).
6. :blue_square: uploaded the relevant information (see below).
7. :ballot_box_with_check: tried an incognito window, disabled extensions, cleared mobile app cache, logged out and back in, different browsers, etc. as applicable
(an item can be marked as "complete" by reacting with the appropriate number)
Information
In order to be able to effectively help you, we need you to provide clear information to show what the problem is. The exact details needed vary per case, but here is a list of things to consider:
- Your docker-compose.yml and .env files.
- Logs from all the containers and their status (see above).
- All the troubleshooting steps you've tried so far.
- Any recent changes you've made to Immich or your system.
- Details about your system (both software/OS and hardware).
- Details about your storage (filesystems, type of disks, output of commands like fdisk -l
and df -h
).
- The version of the Immich server, mobile app, and other relevant pieces.
- Any other information that you think might be relevant.
Please paste files and logs with proper code formatting, and especially avoid blurry screenshots.
Without the right information we can't work out what the problem is. Help us help you ;)
If this ticket can be closed you can use the /close
command, and re-open it later if needed.please show the full database output of those two rows you get
also please show the output of
SELECT * from public.user;
also what permissions did you give your API key?in database visibility = hidden, could that be it?
yep
what would cause that?
could be the video of a live photo
you should share all the queries I asked about if you want more info
To give more context of how I run into / found this issue:
1) I have existing Immich instance with external library only, I want to change from 'external' to normal / default / internal library.
2) To achieve this I navigated to folder of my external library and used immich cli import command
3) Once everything had been imported I then wanted to ensure I didn't lose all my immich albums when I removed my external library
4) I wrote a script that looped through all assets in albums, searched for the new asset and add new asset Id to album
5) End result should be that all albums have an asset count of DOUBLE the original, effectively each asset in album would be duplicated, one from external library and one internal.
6) A few albums had a couple of assets missing....the first one I found was for asset with file name '20220216_143303_79FC8348.heic'
7) I used database and could only find 1 asset with file name '20220216_143303_79FC8348.mov' which was external library
8) On my ubuntu instance I manually tried to import the file again but got the below:
9) I then got down this rabbit hole of fidning the file had been renamed to '.mov' and trying to figure out why......but maybe this isn't the case?
most likely a live photo based on what you said
they should have a heic + a mov for the motion
usually the same name
yes i have both
when I run
I only see the file from external library.....immich import CLI doesn't seem to import the .heic, I think because the checksum matches the same as .mov so it's seeing as duplicate
those two files should not have the same checksum, but tbh I do not know how we handle external live photos. I think they are only really supported via the app
anyway, that's definitely related to what is going on here just not sure how to piece it apart properly
well that's just an issue with your source data sorry to say, that does not make any sense to me
yes....that may be the case.... seems nothing to do with immich