glanceapp / glanceapp/community-widgets

Immich Stats not working

Open
#259 1 comment 0 reactions 0 assignees View on GitHub
bug report
Dominant language
Go
Stars
872
Forks
175
Avg merge
6d 13h
Merged PRs (30d)
9

Description

### Widget link

https://github.com/glanceapp/community-widgets/tree/main/widgets/immich-stats

### Description

Hi 👋
I’m trying to display Immich server statistics in Glance using the custom-api widget, based on the official community widget example, but I’m running into template evaluation errors and can’t get the stats to render.

**Setup**
- Glance version: v0.8.4 (binary, Linux amd64)
- Immich version: v2.5.x (Docker)
- Immich API endpoint: `/api/server/statistics`
- Auth: x-api-key header (API key works and endpoint returns valid JSON)

**What I’ve tried**
- Using .JSON.photos, .JSON.Int "photos", and similar variants
- Confirmed the API returns valid JSON
- Confirmed the API key and endpoint work outside Glance
- Restarted Glance and validated config loads without syntax errors

**Error shown in Glance UI / logs**
```
template: executing at <.JSON.photos>:
can't evaluate field photos in type glance.decoratedJSONResult
```

Any guidance or a working example would be greatly appreciated.
Thanks for all the work on Glance

Contributor guide

Open the contributing guide

Research direction

Start with the linked Immich Stats widget and compare its template access with the response from /api/server/statistics, using the reported decoratedJSONResult error as the starting point. Done means a working example renders the returned statistics in Glance v0.8.4 with the x-api-key setup.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
api
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.