immich-app / immich

High performance self-hosted photo and video management solution.
https://immich.app
GNU Affero General Public License v3.0
53.16k stars 2.81k forks source link

Web: Pressing escape immediately after viewing an asset from the asset grid breaks the asset viewer #9906

Closed Snowknight26 closed 6 months ago

Snowknight26 commented 6 months ago

The bug

If you get the timing correct, pressing escape right after attempting to view a photo from the Photos page gets you into a broken state where the asset viewer is showing the slideshow but you can't exit it because a JavaScript error occurred.

https://github.com/immich-app/immich/assets/5608270/81160970-7625-41db-b90d-08b8c0b22804

The OS that Immich Server is running on

Ubuntu 24.04 LTS

Version of Immich Server

v1.105.1 (380ed966d844b6c4ce5e08cc9d7d690d96e8bfa4)

Version of Immich Mobile App

N/A

Platform with the issue

Your docker-compose.yml content

N/A

Your .env content

N/A

Reproduction steps

1. Navigate to Photos
2. Click on a photo
3. Press Escape

Relevant log output

[utils.ts]:handlePromiseError TypeError: progressBar.restart is not a function TypeError: progressBar.restart is not a function
    at Array.<anonymous> (slideshow-bar.svelte:54:21)
    at Object.set (chunk-GRQJ6R46.js?v=4bad376c:30:35)
    at Object.set (slideshow.store.ts:60:21)
    at set_store_value (chunk-SGFLL5OL.js?v=4bad376c:181:9)
    at handleStopSlideshow (asset-viewer.svelte:496:54)
    at asset-viewer.svelte:208:28
    at Object.subscribe2 [as subscribe] (chunk-GRQJ6R46.js?v=4bad376c:46:5)
    at asset-viewer.svelte:202:48

(anonymous) @ utils.ts:281
Promise.catch (async)
handlePromiseError @ utils.ts:281
(anonymous) @ asset-viewer.svelte:208
subscribe2 @ chunk-GRQJ6R46.js?v=4bad376c:46
(anonymous) @ asset-viewer.svelte:202
await in (anonymous) (async)
run @ chunk-SGFLL5OL.js?v=4bad376c:30
(anonymous) @ chunk-SGFLL5OL.js?v=4bad376c:2136
flush @ chunk-SGFLL5OL.js?v=4bad376c:1333
update2 @ chunk-SGFLL5OL.js?v=4bad376c:1720
(anonymous) @ chunk-SGFLL5OL.js?v=4bad376c:1728
Promise.then (async)
handle_promise @ chunk-SGFLL5OL.js?v=4bad376c:1725
create_if_block @ asset-grid.svelte:454
update @ asset-grid.svelte:483
update_slot_base @ chunk-SGFLL5OL.js?v=4bad376c:128
update @ portal.svelte:55
update @ chunk-SGFLL5OL.js?v=4bad376c:1351
flush @ chunk-SGFLL5OL.js?v=4bad376c:1317
Promise.then (async)
schedule_update @ chunk-SGFLL5OL.js?v=4bad376c:1291
make_dirty @ chunk-SGFLL5OL.js?v=4bad376c:2159
(anonymous) @ chunk-SGFLL5OL.js?v=4bad376c:2196
(anonymous) @ asset-grid.svelte:43
set @ chunk-GRQJ6R46.js?v=4bad376c:30
setAsset @ asset-viewing.store.ts:11
assetClickHandler @ asset-date-group.svelte:89
func @ asset-date-group.svelte:177
func @ asset-date-group.svelte:149
thumbnailClickedHandler @ thumbnail.svelte:67

Additional information

Above error was on commit 380ed966d844b6c4ce5e08cc9d7d690d96e8bfa4.

anudeepreddy commented 6 months ago

This is no longer reproducible, #9929 fixed this too.