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

Cannot see the posts on my profile page #107

Closed
honnip opened this issue Feb 9, 2025 · 6 comments
Closed

Cannot see the posts on my profile page #107

honnip opened this issue Feb 9, 2025 · 6 comments
Labels
bug Something isn't working

Comments

@honnip
Copy link
Contributor

honnip commented Feb 9, 2025

Image

But I can still see the posts at https://c.honnip.page/@honnip
I've migrated 0.3.5 to 0.4.6.

hollo(0.4.6) log:

 2월 09 20:50:16 antares hollo-start[1460]: 11:50:16.670 INF fedify·federation·http: 'OPTIONS' '/api/v1/timelines/home?limit=5&since_id=0194e9e3-e6b2-7d8d-962f-f7502bb9fdf4': 204
 2월 09 20:50:16 antares hollo-start[1460]: 11:50:16.693 INF fedify·federation·http: 'OPTIONS' '/api/v1/accounts/32e7bbc0-c574-42fd-8c3e-23856fbfd987/statuses?pinned=true': 204
 2월 09 20:50:16 antares hollo-start[1460]: 11:50:16.848 INF fedify·federation·http: 'GET' '/api/v1/timelines/home?limit=5&since_id=0194e9e3-e6b2-7d8d-962f-f7502bb9fdf4': 200
 2월 09 20:50:16 antares hollo-start[1460]: 11:50:16.873 WRN fedify·federation·actor: Actor dispatcher returned an actor with an id property that does not match the actor URI.  Set the property with Context.getActorUri(identifier).
 2월 09 20:50:16 antares hollo-start[1460]: 11:50:16.882 INF fedify·federation·http: 'GET' '/@honnip': 200
 2월 09 20:50:16 antares hollo-start[1460]: 11:50:16.996 INF fedify·federation·http: 'GET' '/@honnip/outbox': 200
 2월 09 20:50:17 antares hollo-start[1460]: 11:50:17.149 INF fedify·federation·http: 'GET' '/@honnip/outbox?cursor=0': 200
 2월 09 20:50:17 antares hollo-start[1460]: 11:50:17.470 WRN fedify·federation·actor: Actor dispatcher returned an actor with an id property that does not match the actor URI.  Set the property with Context.getActorUri(identifier).
 2월 09 20:50:17 antares hollo-start[1460]: 11:50:17.479 INF fedify·federation·http: 'GET' '/@honnip': 200
 2월 09 20:50:17 antares hollo-start[1460]: 11:50:17.504 ERR fedify·federation·http: An error occurred while serving request 'GET' 'http://c.honnip.page/api/v1/accounts/32e7bbc0-c574-42fd-8c3e-23856fbfd987/statuses?pinned=true': PostgresError: duplicate key value violates unique constraint "posts_actor_id_sharing_id_unique"
 2월 09 20:50:17 antares hollo-start[1460]:     at ErrorResponse (file:///nix/store/xjpiazi1wqhz21jiwmynpl7pnw038ila-hollo-0.4.6/node_modules/.pnpm/postgres@3.4.5/node_modules/postgres/src/connection.js:788:26)
 2월 09 20:50:17 antares hollo-start[1460]:     at handle (file:///nix/store/xjpiazi1wqhz21jiwmynpl7pnw038ila-hollo-0.4.6/node_modules/.pnpm/postgres@3.4.5/node_modules/postgres/src/connection.js:474:6)
 2월 09 20:50:17 antares hollo-start[1460]:     at Socket.data (file:///nix/store/xjpiazi1wqhz21jiwmynpl7pnw038ila-hollo-0.4.6/node_modules/.pnpm/postgres@3.4.5/node_modules/postgres/src/connection.js:315:9)
 2월 09 20:50:17 antares hollo-start[1460]:     at Socket.emit (node:events:507:28)
 2월 09 20:50:17 antares hollo-start[1460]:     at addChunk (node:internal/streams/readable:559:12)
 2월 09 20:50:17 antares hollo-start[1460]:     at readableAddChunkPushByteMode (node:internal/streams/readable:510:3)
 2월 09 20:50:17 antares hollo-start[1460]:     at Readable.push (node:internal/streams/readable:390:5)
 2월 09 20:50:17 antares hollo-start[1460]:     at Pipe.onStreamRead (node:internal/stream_base_commons:189:23)
 2월 09 20:50:17 antares hollo-start[1460]:     at Pipe.callbackTrampoline (node:internal/async_hooks:130:17) {
 2월 09 20:50:17 antares hollo-start[1460]:   severity_local: 'ERROR',
 2월 09 20:50:17 antares hollo-start[1460]:   severity: 'ERROR',
 2월 09 20:50:17 antares hollo-start[1460]:   code: '23505',
 2월 09 20:50:17 antares hollo-start[1460]:   detail: 'Key (actor_id, sharing_id)=(32e7bbc0-c574-42fd-8c3e-23856fbfd987, 0194c07c-a0ab-798c-85be-b0b00f5e5b18) already exists.',
 2월 09 20:50:17 antares hollo-start[1460]:   schema_name: 'public',
 2월 09 20:50:17 antares hollo-start[1460]:   table_name: 'posts',
 2월 09 20:50:17 antares hollo-start[1460]:   constraint_name: 'posts_actor_id_sharing_id_unique',
 2월 09 20:50:17 antares hollo-start[1460]:   file: 'nbtinsert.c',
 2월 09 20:50:17 antares hollo-start[1460]:   line: '666',
 2월 09 20:50:17 antares hollo-start[1460]:   routine: '_bt_check_unique'
 2월 09 20:50:17 antares hollo-start[1460]: }

postgresql(16.6) log:

 2월 09 20:56:29 antares postgres[32773]: [32773] ERROR:  duplicate key value violates unique constraint "posts_actor_id_sharing_id_unique"
 2월 09 20:56:29 antares postgres[32773]: [32773] DETAIL:  Key (actor_id, sharing_id)=(32e7bbc0-c574-42fd-8c3e-23856fbfd987, 0194c07c-a0ab-798c-85be-b0b00f5e5b18) already exists.
 2월 09 20:56:29 antares postgres[32773]: [32773] STATEMENT:  insert into "posts" ("id", "iri", "type", "actor_id", "application_id", "reply_target_id", "sharing_id", "quote_target_id", "visibility", "summary", "content_html", "content", "poll_id", "language", "tags", "emojis", "sensitive", "url", "preview_card", "replies_count", "shares_count", "likes_count", "idempotence_key", "published", "updated") values ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $20, $21, $22, $23, $24, $25) returning "id", "iri", "type", "actor_id", "application_id", "reply_target_id", "sharing_id", "quote_target_id", "visibility", "summary", "content_html", "content", "poll_id", "language", "tags", "emojis", "sensitive", "url", "preview_card", "replies_count", "shares_count", "likes_count", "idempotence_key", "published", "updated"
@dahlia dahlia added the bug Something isn't working label Feb 9, 2025
@dahlia
Copy link
Member

dahlia commented Feb 11, 2025

By the way, Hollo requires PostgreSQL 17 or higher.

@honnip
Copy link
Contributor Author

honnip commented Feb 13, 2025

It only happens if there is a post that I have boosted

@dahlia
Copy link
Member

dahlia commented Feb 13, 2025

What do you get when you run the following query directly against your database? (You can connect directly to your database with the psql command.)

SELECT count(*)
FROM posts
WHERE actor_id = '32e7bbc0-c574-42fd-8c3e-23856fbfd987'
  AND sharing_id = '0194c07c-a0ab-798c-85be-b0b00f5e5b18';

@honnip
Copy link
Contributor Author

honnip commented Feb 13, 2025

psql (16.6)
Type "help" for help.

hollo=> SELECT count(*)
FROM posts
WHERE actor_id = '32e7bbc0-c574-42fd-8c3e-23856fbfd987'
  AND sharing_id = '0194c07c-a0ab-798c-85be-b0b00f5e5b18';
 count 
-------
     1
(1 row)

For now the count is 0 because I've cancelled all boosts I think. When I boost that post again, it shows 1 (And the error reappears).

@dahlia dahlia closed this as completed in 29bf18a Feb 14, 2025
@dahlia
Copy link
Member

dahlia commented Feb 14, 2025

Released Hollo 0.4.7 and 0.5.1 which include the fix for this. Could you give it a try?

@honnip
Copy link
Contributor Author

honnip commented Feb 14, 2025

It works perfectly, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants