immich icon indicating copy to clipboard operation
immich copied to clipboard

[BUG] Info view of images has text "undefinedundefined" in geolocation

Open martyfuhry opened this issue 2 years ago • 6 comments

Description of the bug In the detail view of various images near the geolocation data. I'm not sure what is supposed to belong there, but the text "undefinedundefined" certainly suggests a bug. I believe the town, city, state, or region text belongs there, but I'm not positive.

To Reproduce Steps to reproduce the behavior:

  1. Select an image with location metadata.
  2. Select the Info button to see the map / associated metadata.
  3. You can see text "undefinedundefined" occasionally where geolocation data belongs (e.g., town, city, state).
  4. See error

Expected behavior I believe more geolocation data belongs here or else the text should be suppressed.

Screenshots

Web image

Mobile image

System

  • Phone OS [iOS, Android]: Either OS (Screenshot is from Android, but behavior is on both)
  • Server Version: 1.42.0
  • Mobile App Version: 1.42.0 build.65

Additional information You can also see some "null" text in e.g., the camera metadata, which should be cleaned up as well.

martyfuhry avatar Jan 24 '23 16:01 martyfuhry

Hello, do you have a test image that we can use for troubleshooting?

alextran1502 avatar Jan 24 '23 16:01 alextran1502

My guess is that it's an issue with the reverse geocoding done on the server. It looks like the client is receiving the text string "undefinedundefined" from the server as the value of it's exifInfo.state member.

Below is an example of an image I imported from Google Photos into my own self-hosted Immich server. Loads of my images have this issue, though, and the lat/lng is appropriately set.

This was a super cool apartment, too.

20160901_131655

martyfuhry avatar Jan 24 '23 17:01 martyfuhry

HMm here is the result from my instance

image

The mobile app also shows the same info. I guess this comes down to the REVERSE_GEOCODING_PRECISION setting in the .env file. I currently have mine set as 0. What is yours?

alextran1502 avatar Jan 24 '23 19:01 alextran1502

Well I apologize, I should have included my .env file... It was even there in the new issue template, but oh, I knew better.

DB_HOSTNAME=immich_postgres
DB_USERNAME=postgres
DB_PASSWORD=***
DB_DATABASE_NAME=immich
REDIS_HOSTNAME=immich_redis
UPLOAD_LOCATION=/nfs/photos
JWT_SECRET=***
PUBLIC_LOGIN_PAGE_MESSAGE=***
DISABLE_REVERSE_GEOCODING=false
REVERSE_GEOCODING_PRECISION=2
IMMICH_WEB_URL=http://immich-web:3000
IMMICH_SERVER_URL=http://immich-server:3001
IMMICH_MACHINE_LEARNING_URL=http://immich-machine-learning:3003

Looks like I've got it set to 2? I imagine that if I changed it to 0, I would likely have the same result as you, which is a great workaround for the moment.

If that's the case, then the bug should be triaged to suppress undefined reverse geocoding strings when the precision is insufficiently set as they are being emitted to the client.

martyfuhry avatar Jan 24 '23 19:01 martyfuhry

f that's the case, then the bug should be triaged to suppress undefined reverse geocoding strings when the precision is insufficiently set as they are being emitted to the client.

Correct. Just trying to replicate the same settings yours so I can fix that issue :P

alextran1502 avatar Jan 24 '23 19:01 alextran1502

when I saw this problem, I remembered having seen this same undefined information.

I went to look in the .env for REVERSE_GEOCODING_PRECISION=2 and in my case, it is commented and it even shows the geolocation, is that correct?

image

owmsoton avatar Jan 27 '23 01:01 owmsoton

I tested with this photo, specifically with REVERSE_GEOCODING_PRECISION=2, and it seems to be working as expected. I believe this issue has been fixed. Can re-open if it is not the case though.

jrasm91 avatar Aug 02 '23 01:08 jrasm91