[GH-ISSUE #1537] Error 500 on home #873

Closed
opened 2026-02-26 02:34:29 +03:00 by kerem · 3 comments
Owner

Originally created by @tomdoo on GitHub (Oct 20, 2022).
Original GitHub issue: https://github.com/koel/koel/issues/1537

Describe the bug
Error 500 on Home

To reproduce
Steps to reproduce the behavior:

  1. Go to 'Home'
  2. See error

Error message

SQLSTATE[42803]: Grouping error: 7 ERROR:  column "interactions.play_count" must appear in the GROUP BY clause or be used in an aggregate functionLINE 1: ... not in ($2, $3) group by "artists"."id" order by "play_coun...                                                             ^ (SQL: select "artists".* from "artists" left join "songs" on "artists"."id" = "songs"."artist_id" left join "interactions" on "interactions"."song_id" = "songs"."id" and "interactions"."user_id" = 1 where "artists"."id" not in (1, 2) group by "artists"."id" order by "play_count" desc limit 6)

Environment

  • Koel version v6.3.0
Originally created by @tomdoo on GitHub (Oct 20, 2022). Original GitHub issue: https://github.com/koel/koel/issues/1537 **Describe the bug** Error 500 on Home **To reproduce** Steps to reproduce the behavior: 1. Go to 'Home' 2. See error **Error message** ``` SQLSTATE[42803]: Grouping error: 7 ERROR: column "interactions.play_count" must appear in the GROUP BY clause or be used in an aggregate functionLINE 1: ... not in ($2, $3) group by "artists"."id" order by "play_coun... ^ (SQL: select "artists".* from "artists" left join "songs" on "artists"."id" = "songs"."artist_id" left join "interactions" on "interactions"."song_id" = "songs"."id" and "interactions"."user_id" = 1 where "artists"."id" not in (1, 2) group by "artists"."id" order by "play_count" desc limit 6) ``` **Environment** - Koel version v6.3.0
kerem closed this issue 2026-02-26 02:34:29 +03:00
Author
Owner

@phanan commented on GitHub (Oct 22, 2022):

Can't seem to reproduce this. Please give more details.

<!-- gh-comment-id:1287894123 --> @phanan commented on GitHub (Oct 22, 2022): Can't seem to reproduce this. Please give more details.
Author
Owner

@MarS0K commented on GitHub (Oct 23, 2022):

  • Koel 6.4.0.
  • PostgreSQL 13.8 (Debian 13.8-1.pgdg110+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 10.2.1-6) 10.2.1 20210110, 64-bit
  • nginx/1.23.2

Снимок экрана 2022-10-23 101730

PostgreSQL Logs:
2022-10-23 03:16:53.984 UTC [4538] ERROR: column "interactions.play_count" must appear in the GROUP BY clause or be used in an aggregate function at character 265
2022-10-23 0 3:16:53.984 UTC [4538] STATEMENT: select "artists".* from "artists" left join "songs" on "artists"."id" = "songs"."artist_id" left join "interactions" on "interactions"."song_id" = "songs"."id" and "interactions"."user_id" = $1 where "artists"."id" not in ($2, $3) group by "artists"."id" order by "play_count" desc limit 6

There was no error before Koel 6.3.0.

<!-- gh-comment-id:1287994069 --> @MarS0K commented on GitHub (Oct 23, 2022): - Koel 6.4.0. - PostgreSQL 13.8 (Debian 13.8-1.pgdg110+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 10.2.1-6) 10.2.1 20210110, 64-bit - nginx/1.23.2 ![Снимок экрана 2022-10-23 101730](https://user-images.githubusercontent.com/21670519/197371793-4f64282d-a44c-40c3-85e8-85cd7dbc46a5.png) PostgreSQL Logs: `2022-10-23 03:16:53.984 UTC [4538] ERROR: column "interactions.play_count" must appear in the GROUP BY clause or be used in an aggregate function at character 265` `2022-10-23 0 3:16:53.984 UTC [4538] STATEMENT: select "artists".* from "artists" left join "songs" on "artists"."id" = "songs"."artist_id" left join "interactions" on "interactions"."song_id" = "songs"."id" and "interactions"."user_id" = $1 where "artists"."id" not in ($2, $3) group by "artists"."id" order by "play_count" desc limit 6` There was no error before Koel 6.3.0.
Author
Owner

@phanan commented on GitHub (Oct 23, 2022):

Closed in #1538.

<!-- gh-comment-id:1288060611 --> @phanan commented on GitHub (Oct 23, 2022): Closed in #1538.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/koel-koel#873
No description provided.