Pulsarr icon indicating copy to clipboard operation
Pulsarr copied to clipboard

[BUG] ERROR: Failed to fetch dashboard statistics SqlLiteError after upgrade to latest version v0.8.4

Open NoLife141 opened this issue 11 months ago โ€ข 4 comments

Bug Description

after upgrade from 0.8.3 -> 0.8.4, I got internal server error for watchlist

Steps To Reproduce

  1. upgrade docker from 0.8.3 -> 0.8.4
  2. after login, I got internal server error for the watchlist.

Expected Behavior

loading watchlist correctly

Screenshots

Image

Environment

  • Pulsarr Version: v0.8.4
  • Deployment: Docker
  • OS: Debian 13
  • Browser: Chrome 143

Logs

pulsarr | [13:59:13 UTC] ERROR: Failed to fetch dashboard statistics pulsarr | route: "GET /v1/stats/all" pulsarr | error: { pulsarr | "message": "select watchlist_items.title, watchlist_items.guids, MIN(watchlist_items.thumb) as thumb, GROUP_CONCAT(DISTINCT u.name, '||') as user_names, count() as count from watchlist_items left join users as u on watchlist_items.user_id = u.id where type = 'show' and added >= '2025-11-29 13:59:13.261' group by watchlist_items.title, watchlist_items.guids order by count desc limit 10 - DISTINCT aggregates must have exactly one argument", pulsarr | "name": "SqliteError", pulsarr | "type": "Error", pulsarr | "stack": pulsarr | SqliteError: select watchlist_items.title, watchlist_items.guids, MIN(watchlist_items.thumb) as thumb, GROUP_CONCAT(DISTINCT u.name, '||') as user_names, count() as count from watchlist_items left join users as u on watchlist_items.user_id = u.id where type = 'show' and added >= '2025-11-29 13:59:13.261' group by watchlist_items.title, watchlist_items.guids order by count desc limit 10 - DISTINCT aggregates must have exactly one argument pulsarr | at Database.prepare (/app/node_modules/better-sqlite3/lib/methods/wrappers.js:5:21) pulsarr | at Client_BetterSQLite3._query (/app/node_modules/knex/lib/dialects/better-sqlite3/index.js:35:34) pulsarr | at executeQuery (/app/node_modules/knex/lib/execution/internal/query-executioner.js:37:17) pulsarr | at Client_BetterSQLite3.query (/app/node_modules/knex/lib/client.js:154:12) pulsarr | at Runner.query (/app/node_modules/knex/lib/execution/runner.js:141:36) pulsarr | at ensureConnectionCallback (/app/node_modules/knex/lib/execution/internal/ensure-connection-callback.js:13:17) pulsarr | at Runner.ensureConnection (/app/node_modules/knex/lib/execution/runner.js:318:20) pulsarr | at process.processTicksAndRejections (node:internal/process/task_queues:103:5) pulsarr | at async Runner.run (/app/node_modules/knex/lib/execution/runner.js:30:19) pulsarr | at async DatabaseService.getMostWatchlistedShows (file:///app/dist/services/database/methods/analytics.js:68:21) pulsarr | "code": "SQLITE_ERROR" pulsarr | } pulsarr | [13:59:13 UTC] ERROR: Internal server error occurred pulsarr | reqId: "req-19" pulsarr | request: { pulsarr | "id": "req-19", pulsarr | "method": "GET", pulsarr | "path": "/v1/stats/all", pulsarr | "route": "/v1/stats/all" pulsarr | } pulsarr | err: { pulsarr | "message": "Unable to fetch dashboard statistics", pulsarr | "name": "InternalServerError", pulsarr | "status": 500, pulsarr | "statusCode": 500, pulsarr | "type": "Error", pulsarr | "stack": pulsarr | InternalServerError: Unable to fetch dashboard statistics pulsarr | at Object.internalServerError (/app/node_modules/@fastify/sensible/lib/httpErrors.js:137:12) pulsarr | at _Reply.sensibleInternalServerError [as internalServerError] (/app/node_modules/@fastify/sensible/index.js:55:44) pulsarr | at Object. (file:///app/dist/routes/v1/stats/stats.js:67:26) pulsarr | at process.processTicksAndRejections (node:internal/process/task_queues:103:5) pulsarr | }

NoLife141 avatar Dec 29 '25 14:12 NoLife141

๐Ÿ“ CodeRabbit Plan Mode

Generate an implementation plan and prompts that you can use with your favorite coding agent.

  • [ ] Create Plan
Examples

๐Ÿ”— Similar Issues

Related Issues

  • https://github.com/jamcalli/Pulsarr/issues/769
  • https://github.com/jamcalli/Pulsarr/issues/173
  • https://github.com/jamcalli/Pulsarr/issues/466
  • https://github.com/jamcalli/Pulsarr/issues/302
๐Ÿ”— Related PRs

jamcalli/Pulsarr#813 - fix(database): prevent status regression during metadata refresh [merged]

๐Ÿ‘ค Suggested Assignees

๐Ÿงช Issue enrichment is currently in open beta.

You can configure auto-planning by selecting labels in the issue_enrichment configuration.

To disable automatic issue enrichment, add the following to your .coderabbit.yaml:

issue_enrichment:
  auto_enrich:
    enabled: false

๐Ÿ’ฌ Have feedback or questions? Drop into our discord!

coderabbitai[bot] avatar Dec 29 '25 14:12 coderabbitai[bot]

Same issue here.

Corresponding Log Entry:

[15:18:26 UTC] ERROR: Internal server error occurred reqId: "req-a1" request: { "id": "req-a1", "method": "GET", "path": "/v1/stats/all", "route": "/v1/stats/all" } err: { "message": "Unable to fetch dashboard statistics", "name": "InternalServerError", "status": 500, "statusCode": 500, "type": "Error", "stack": InternalServerError: Unable to fetch dashboard statistics at Object.internalServerError (/app/node_modules/@fastify/sensible/lib/httpErrors.js:137:12) at _Reply.sensibleInternalServerError [as internalServerError] (/app/node_modules/@fastify/sensible/index.js:55:44) at Object. (file:///app/dist/routes/v1/stats/stats.js:67:26) at process.processTicksAndRejections (node:internal/process/task_queues:103:5) }

DrButcher2112 avatar Dec 29 '25 15:12 DrButcher2112

Hey @NoLife141

Thanks for reporting. The stats function has a bug in the sqlite branch. I'll push a hot fix shortly.

jamcalli avatar Dec 29 '25 17:12 jamcalli

Should be all fixed and released!

jamcalli avatar Dec 29 '25 19:12 jamcalli