Javascript error potentially crashing shared link page on slow connections for anonymous user #7198

Closed
opened 2026-02-05 12:51:44 +03:00 by OVERLORD · 0 comments
Owner

Originally created by @piscis on GitHub (Sep 14, 2025).

I have searched the existing issues, both open and closed, to make sure this is not a duplicate report.

  • Yes

The bug

When visiting a share link without being logged in to immich I get this javascript error:

C931-4d6.js:1 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'cast')

I think the problem is with this line:

0166e99d90/web/src/lib/utils/cast/gcast-destination.svelte.ts (L30)

it assumes that preferences is initialized hand has a cast key which is not the case for users that never have been logged in into immich.

I also noticed that this could potentially lead to a javascript error crashing the application because of the unhandled promise rejection with slow internet connections

The OS that Immich Server is running on

Docker / Ubuntu 24.04.3 LTS

Version of Immich Server

v1.142.0

Version of Immich Mobile App

v1.142.0

Platform with the issue

  • Server
  • Web
  • Mobile

Device make and model

No response

Your docker-compose.yml content

-

Your .env content

-

Reproduction steps

  1. Create a Share link
  2. open that share link in a incognito tab and make sure you are not logged into immich
  3. Visit the browser Console and look for an javascript error

Relevant log output

C931-4d6.js:1 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'cast')
    at J.initialize (C931-4d6.js:1:1282)
    at be.initialize (C931-4d6.js:1:5637)
    at C931-4d6.js:1:6565
    at Ce (C7AoV7bH.js:1:15395)
    at C7AoV7bH.js:1:23621
    at Vt (C7AoV7bH.js:1:12693)
    at Je (C7AoV7bH.js:1:13617)
    at Bn (C7AoV7bH.js:1:14051)
    at Pe (C7AoV7bH.js:1:13895)
    at Ht (C7AoV7bH.js:1:14718)

Additional information

I tried to disable chrome cast in user settings but it does not change anything.

Originally created by @piscis on GitHub (Sep 14, 2025). ### I have searched the existing issues, both open and closed, to make sure this is not a duplicate report. - [x] Yes ### The bug When visiting a share link without being logged in to immich I get this javascript error: ```text C931-4d6.js:1 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'cast') ``` I think the problem is with this line: https://github.com/immich-app/immich/blob/0166e99d90046252b4cb3e78077ef3519f0bc0ec/web/src/lib/utils/cast/gcast-destination.svelte.ts#L30 it assumes that preferences is initialized hand has a cast key which is not the case for users that never have been logged in into immich. I also noticed that this could potentially lead to a javascript error crashing the application because of the unhandled promise rejection with slow internet connections ### The OS that Immich Server is running on Docker / Ubuntu 24.04.3 LTS ### Version of Immich Server v1.142.0 ### Version of Immich Mobile App v1.142.0 ### Platform with the issue - [ ] Server - [x] Web - [ ] Mobile ### Device make and model _No response_ ### Your docker-compose.yml content ```YAML - ``` ### Your .env content ```Shell - ``` ### Reproduction steps 1. Create a Share link 2. open that share link in a incognito tab and make sure you are not logged into immich 3. Visit the browser Console and look for an javascript error ### Relevant log output ```shell C931-4d6.js:1 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'cast') at J.initialize (C931-4d6.js:1:1282) at be.initialize (C931-4d6.js:1:5637) at C931-4d6.js:1:6565 at Ce (C7AoV7bH.js:1:15395) at C7AoV7bH.js:1:23621 at Vt (C7AoV7bH.js:1:12693) at Je (C7AoV7bH.js:1:13617) at Bn (C7AoV7bH.js:1:14051) at Pe (C7AoV7bH.js:1:13895) at Ht (C7AoV7bH.js:1:14718) ``` ### Additional information I tried to disable chrome cast in user settings but it does not change anything.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: immich-app/immich#7198