damongolding / immich-kiosk

Immich Kiosk is a lightweight slideshow for running on kiosk devices and browsers that uses Immich as a data source.
GNU Affero General Public License v3.0
540 stars 19 forks source link

Error retrieving image #206

Open mikk92 opened 2 days ago

mikk92 commented 2 days ago

Describe the bug I'm having trouble getting immich-kiosk to work. The error says "selecting image: getting person image count: unexpected status code: 401

To Reproduce The error is the same when I'm trying an album or person via the config.yaml or via URL parameter.

Your Kiosk version 0.13.1

Your Kiosk installation

Your Kiosk ENV or config file

# Clock
show_time: false # true or false
time_format: 24 # 12 or 24
show_date: false # true or false
date_format: YYYY/MM/DD

# Kiosk behaviour
refresh: 60 # in seconds
disable_screensaver: false # Ask browser to request a lock that prevents device screens from dimming or locking.

# Asset sources
show_archived: false # Allow assets marked as archived to be displayed.

# ID(s) of person or people to display
person:
  -"538d22a5-2e28-44f8-ba9b-7d38be8f9807"

# ID(s) of album or albums to display
#album:
#  -"c3dba8a9-7e8a-4155-9bea-e153ae835d22"

# UI
disable_ui: false # this is just a shortcut for all ui elements (show_time, show_date, show_image_time, show_image_date)
frameless: false # remove border around image and rounded corners.
hide_cursor: false # Hide cursor/mouse via CSS.
font_size: 100 # the base font size as a percentage. OMIT the % character
background_blur: true # display a blurred version of image as background
theme: fade # which theme to use. fade or solid
layout: single # which layout to use. single, splitview or splitview-landscape

# Sleep mode
# sleep_start: 22 # sleep mode start time
# sleep_end: 7 # sleep mode end time

# Transition options
transition: none # cross-fade, fade or none
fade_transition_duration: 1 # in seconds
cross_fade_transition_duration: 1 # in seconds

# Image display settings
show_progress: false # display a progress bar
image_fit: contain # how the image fits the screen. Options are none, contain and cover
image_effect: none
image_effect_amount: 120
use_original_image: false # use the original file.

# Image METADATA
show_image_time: false # true or false
image_time_format: 24 # 12 or 24
show_image_date: false # true or false
image_date_format: YYYY-MM-DD
show_image_description: false
show_image_exif: false
show_image_location: false
hide_countries:
  - "country to hide"
show_image_id: false

# weather:
#   - name: london
#     lat: 51.5285262
#     lon: -0.2663999
#     api: ""
#     unit: metric
#     lang: en

# options that can NOT be changed via url params
kiosk:
  port: 3000
  watch_config: true
  fetched_assets_size: 10
  http_timeout: 20
  cache: true # cache select api calls
  pre_fetch: true # fetch assets in the background
  asset_weighting: true # use weighting when picking assets

Desktop :

damongolding commented 2 days ago

401 is a auth error. Just double check your Immich URL and Immich api key are correct.

mikk92 commented 5 hours ago

Thank you for the hint. This could be resolved. Now I'm getting a timeout:

22:01:04 ERRO Request failed, retrying attempt=1 URL=http://xxx/api/albums/ded717df-cc60-4e0f-9f97-329aa5a06232err="Get \"http://xxx/api/albums/ded717df-cc60-4e0f-9f97-329aa5a06232\": dial tcp xxx: i/o timeout"
22:01:35 ERRO Request failed, retrying attempt=2 URL=http://xxx/api/albums/ded717df-cc60-4e0f-9f97-329aa5a06232err="Get \"http://xxx/api/albums/ded717df-cc60-4e0f-9f97-329aa5a06232\": dial tcp xxx: i/o timeout"
22:01:37 ERRO Request failed: max retries exceeded
22:01:37 ERRO Couldn't read error body="" url=http://xxx/api/albums/ded717df-cc60-4e0f-9f97-329aa5a06232

My current config File:

# Clock
show_time: false # true or false
time_format: 24 # 12 or 24
show_date: false # true or false
date_format: YYYY/MM/DD

# Kiosk behaviour
refresh: 60 # in seconds
disable_screensaver: false # Ask browser to request a lock that prevents device screens from dimming or locking.

# Asset sources
show_archived: false # Allow assets marked as archived to be displayed.

# ID(s) of person or people to display
#person:
#  - 538d22a5-2e28-44f8-ba9b-7d38be8f9807

# ID(s) of album or albums to display
album:
  - ded717df-cc60-4e0f-9f97-329aa5a06232

# UI
disable_ui: false # this is just a shortcut for all ui elements (show_time, show_date, show_image_time, show_image_date)
frameless: false # remove border around image and rounded corners.
hide_cursor: false # Hide cursor/mouse via CSS.
font_size: 100 # the base font size as a percentage. OMIT the % character
background_blur: true # display a blurred version of image as background
theme: fade # which theme to use. fade or solid
layout: single # which layout to use. single, splitview or splitview-landscape

# Sleep mode
# sleep_start: 22 # sleep mode start time
# sleep_end: 7 # sleep mode end time

# Transition options
transition: none # cross-fade, fade or none
fade_transition_duration: 1 # in seconds
cross_fade_transition_duration: 1 # in seconds

# Image display settings
show_progress: false # display a progress bar
image_fit: contain # how the image fits the screen. Options are none, contain and cover
image_effect: none
image_effect_amount: 120
use_original_image: false # use the original file.

# Image METADATA
show_image_time: false # true or false
image_time_format: 24 # 12 or 24
show_image_date: false # true or false
image_date_format: YYYY-MM-DD
show_image_description: false
show_image_exif: false
show_image_location: false
hide_countries:
  - "country to hide"
show_image_id: false

# weather:
#   - name: london
#     lat: 51.5285262
#     lon: -0.2663999
#     api: ""
#     unit: metric
#     lang: en

# options that can NOT be changed via url params
kiosk:
  port: 3000
  watch_config: true
  fetched_assets_size: 100
  http_timeout: 30
  cache: true # cache select api calls
  pre_fetch: true # fetch assets in the background
  asset_weighting: true # use weighting when picking assets

When I open the URL with chrome the request succeeds.

damongolding commented 5 hours ago

Are you seeing any errors in the Immich container?

I assume you aren't seeing the json payload when you navigate to that url in Chrome? You would need to send the API key with the request.

If you remove/comment out the album ID (or any people ids) does Kiosk work as expected?

mikk92 commented 4 hours ago

In Immich container I do see the request failed logs.

In Chrome I do in fact see the json paylod. Chrome must retrieve the API key in some cache. In Edge the same url results in 401.

WIthout any album or person ID I don't see any errors in the container log and the kiosk page display the flower logo and the navigation buttoms.

Edit: The query for a random image results in a i/o timeout.