Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Followers page results in error 500 #9883

Closed
szbalint opened this Issue Jan 20, 2019 · 3 comments

Comments

Projects
None yet
2 participants
@szbalint
Copy link

szbalint commented Jan 20, 2019

Expected behaviour

No 500 error.

Actual behaviour

When opening the followers tab on the profile page, a 500 error happens.

Specifications

The actual error from the logs is:

method=GET path=/api/v1/accounts/1/followers format=html controller=Api::V1::Accounts::FollowerAccountsController action=index status=500 error='ActiveRecord::StatementInvalid: PG::UndefinedColumn: ERROR:  column accounts.statuses_count does not exist

This started happening in 2.7.

@szbalint

This comment has been minimized.

Copy link
Author

szbalint commented Jan 20, 2019

The full query is:

LINE 1: ...t0_r26, "accounts"."header_remote_url" AS t0_r27, "accounts"...
                                                             ^
SELECT "accounts"."username" AS t0_r0, "accounts"."domain" AS t0_r1, "accounts"."secret" AS t0_r2, "accounts"."private_key" AS t0_r3, "accounts"."public_key" AS t0_r4, "accounts"."remote_url" AS t0_r5, "accounts"."salmon_url" AS t0_r6, "accounts"."hub_url" AS t0_r7, "accounts"."created_at" AS t0_r8, "accounts"."updated_at" AS t0_r9, "accounts"."note" AS t0_r10, "accounts"."display_name" AS t0_r11, "accounts"."uri" AS t0_r12, "accounts"."url" AS t0_r13, "accounts"."avatar_file_name" AS t0_r14, "accounts"."avatar_content_type" AS t0_r15, "accounts"."avatar_file_size" AS t0_r16, "accounts"."avatar_updated_at" AS t0_r17, "accounts"."header_file_name" AS t0_r18, "accounts"."header_content_type" AS t0_r19, "accounts"."header_file_size" AS t0_r20, "accounts"."header_updated_at" AS t0_r21, "accounts"."avatar_remote_url" AS t0_r22, "accounts"."subscription_expires_at" AS t0_r23, "accounts"."silenced" AS t0_r24, "accounts"."suspended" AS t0_r25, "accounts"."locked" AS t0_r26, "accounts"."header_remote_url" AS t0_r27, "accounts"."statuses_count" AS t0_r28, "accounts"."followers_count" AS t0_r29, "accounts"."following_count" AS t0_r30, "accounts"."last_webfingered_at" AS t0_r31, "accounts"."inbox_url" AS t0_r32, "accounts"."outbox_url" AS t0_r33, "accounts"."shared_inbox_url" AS t0_r34, "accounts"."followers_url" AS t0_r35, "accounts"."protocol" AS t0_r36, "accounts"."id" AS t0_r37, "accounts"."memorial" AS t0_r38, "accounts"."moved_to_account_id" AS t0_r39, "accounts"."featured_collection_url" AS t0_r40, "accounts"."fields" AS t0_r41, "accounts"."actor_type" AS t0_r42, "accounts"."discoverable" AS t0_r43, "accounts"."also_known_as" AS t0_r44, "follows"."created_at" AS t1_r0, "follows"."updated_at" AS t1_r1, "follows"."account_id" AS t1_r2, "follows"."id" AS t1_r3, "follows"."target_account_id" AS t1_r4, "follows"."show_reblogs" AS t1_r5, "follows"."uri" AS t1_r6, "account_stats"."id" AS t2_r0, "account_stats"."account_id" AS t2_r1, "account_stats"."statuses_count" AS t2_r2, "account_stats"."following_count" AS t2_r3, "account_stats"."followers_count" AS t2_r4, "account_stats"."created_at" AS t2_r5, "account_stats"."updated_at" AS t2_r6, "account_stats"."last_status_at" AS t2_r7 FROM "accounts" LEFT OUTER JOIN "follows" ON "follows"."account_id" = "accounts"."id" LEFT OUTER JOIN "account_stats" ON "account_stats"."account_id" = "accounts"."id" WHERE "follows"."target_account_id" = $1 AND "accounts"."id" IN ($2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $20, $21, $22, $23, $24, $25, $26, $27, $28, $29, $30, $31, $32, $33, $34, $35, $36, $37, $38, $39, $40, $41) ORDER BY "follows"."id" DESC' duration=76.89 view=0.00 db=8.27
@Gargron

This comment has been minimized.

Copy link
Member

Gargron commented Jan 20, 2019

Run db migrations, restart Mastodon

@szbalint

This comment has been minimized.

Copy link
Author

szbalint commented Jan 20, 2019

Ah, final restart was missing. Could you please amend the 2.7 release notes to include step
5. restart Mastodon processes again ?

@Gargron Gargron closed this Jan 20, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.